summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/ip6_output.c
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2014-10-14 09:52:25 +0000
committermpi <mpi@openbsd.org>2014-10-14 09:52:25 +0000
commit27ae666c98839b54ee31f46d4088ba4f1bccd084 (patch)
treed31864036956f5d7a0710856890ab05ec1501154 /sys/netinet6/ip6_output.c
parentsync (diff)
downloadwireguard-openbsd-27ae666c98839b54ee31f46d4088ba4f1bccd084.tar.xz
wireguard-openbsd-27ae666c98839b54ee31f46d4088ba4f1bccd084.zip
Use rtfree() instead of RTFREE(), NULLify some free'd route pointers and
kill the macro. ok mikeb@, henning@
Diffstat (limited to 'sys/netinet6/ip6_output.c')
-rw-r--r--sys/netinet6/ip6_output.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c
index 5b1dce4e0a2..357b9b3ddcb 100644
--- a/sys/netinet6/ip6_output.c
+++ b/sys/netinet6/ip6_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip6_output.c,v 1.159 2014/09/27 12:26:16 mpi Exp $ */
+/* $OpenBSD: ip6_output.c,v 1.160 2014/10/14 09:52:26 mpi Exp $ */
/* $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $ */
/*
@@ -958,10 +958,10 @@ reroute:
ip6stat.ip6s_fragmented++;
done:
- if (ro == &ip6route && ro->ro_rt) { /* brace necessary for RTFREE */
- RTFREE(ro->ro_rt);
+ if (ro == &ip6route && ro->ro_rt) {
+ rtfree(ro->ro_rt);
} else if (ro_pmtu == &ip6route && ro_pmtu->ro_rt) {
- RTFREE(ro_pmtu->ro_rt);
+ rtfree(ro_pmtu->ro_rt);
}
return (error);
@@ -1219,7 +1219,7 @@ ip6_getpmtu(struct route_in6 *ro_pmtu, struct route_in6 *ro,
if (ro_pmtu->ro_rt &&
((ro_pmtu->ro_rt->rt_flags & RTF_UP) == 0 ||
!IN6_ARE_ADDR_EQUAL(&sa6_dst->sin6_addr, dst))) {
- RTFREE(ro_pmtu->ro_rt);
+ rtfree(ro_pmtu->ro_rt);
ro_pmtu->ro_rt = NULL;
}
if (ro_pmtu->ro_rt == 0) {
@@ -2256,7 +2256,7 @@ ip6_clearpktopts(struct ip6_pktopts *pktopt, int optname)
pktopt->ip6po_tclass = -1;
if (optname == -1 || optname == IPV6_NEXTHOP) {
if (pktopt->ip6po_nextroute.ro_rt) {
- RTFREE(pktopt->ip6po_nextroute.ro_rt);
+ rtfree(pktopt->ip6po_nextroute.ro_rt);
pktopt->ip6po_nextroute.ro_rt = NULL;
}
if (pktopt->ip6po_nexthop)
@@ -2278,7 +2278,7 @@ ip6_clearpktopts(struct ip6_pktopts *pktopt, int optname)
free(pktopt->ip6po_rhinfo.ip6po_rhi_rthdr, M_IP6OPT, 0);
pktopt->ip6po_rhinfo.ip6po_rhi_rthdr = NULL;
if (pktopt->ip6po_route.ro_rt) {
- RTFREE(pktopt->ip6po_route.ro_rt);
+ rtfree(pktopt->ip6po_route.ro_rt);
pktopt->ip6po_route.ro_rt = NULL;
}
}