diff options
author | Renato Botelho <renato@netgate.com> | 2016-05-19 10:45:17 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2016-05-19 10:45:17 -0300 |
commit | 57a447a9c3cb69fb2e4f874104327cdc3203313a (patch) | |
tree | 5f882a4db4469e125c743f84b4f8998df4f015c3 /sys/netinet6 | |
parent | 5cf4da15d7c435594db5cc482d961f98986d0808 (diff) | |
parent | 0412106b46a9cffa2790ddc17339d96c0dc607c9 (diff) | |
download | FreeBSD-src-57a447a9c3cb69fb2e4f874104327cdc3203313a.zip FreeBSD-src-57a447a9c3cb69fb2e4f874104327cdc3203313a.tar.gz |
Merge remote-tracking branch 'origin/master' into devel-11
Diffstat (limited to 'sys/netinet6')
-rw-r--r-- | sys/netinet6/ip6_output.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c index f64d305..1f780bd6 100644 --- a/sys/netinet6/ip6_output.c +++ b/sys/netinet6/ip6_output.c @@ -149,10 +149,10 @@ static int ip6_insertfraghdr(struct mbuf *, struct mbuf *, int, static int ip6_insert_jumboopt(struct ip6_exthdrs *, u_int32_t); static int ip6_splithdr(struct mbuf *, struct ip6_exthdrs *); static int ip6_getpmtu(struct route_in6 *, int, - struct ifnet *, struct in6_addr *, u_long *, int *, u_int); + struct ifnet *, const struct in6_addr *, u_long *, int *, u_int); static int ip6_calcmtu(struct ifnet *, const struct in6_addr *, u_long, u_long *, int *); -static int ip6_getpmtu_ctl(u_int, struct in6_addr *, u_long *); +static int ip6_getpmtu_ctl(u_int, const struct in6_addr *, u_long *); static int copypktopts(struct ip6_pktopts *, struct ip6_pktopts *, int); @@ -313,7 +313,7 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, int alwaysfrag, dontfrag; u_int32_t optlen = 0, plen = 0, unfragpartlen = 0; struct ip6_exthdrs exthdrs; - struct in6_addr finaldst, src0, dst0; + struct in6_addr src0, dst0; u_int32_t zone; struct route_in6 *ro_pmtu = NULL; int hdrsplit = 0; @@ -338,7 +338,6 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, } } - finaldst = ip6->ip6_dst; bzero(&exthdrs, sizeof(exthdrs)); if (opt) { /* Hop-by-Hop options header */ @@ -727,8 +726,8 @@ again: *ifpp = ifp; /* Determine path MTU. */ - if ((error = ip6_getpmtu(ro_pmtu, ro != ro_pmtu, ifp, &finaldst, &mtu, - &alwaysfrag, fibnum)) != 0) + if ((error = ip6_getpmtu(ro_pmtu, ro != ro_pmtu, ifp, &ip6->ip6_dst, + &mtu, &alwaysfrag, fibnum)) != 0) goto bad; /* @@ -826,8 +825,10 @@ again: #endif error = netisr_queue(NETISR_IPV6, m); goto done; - } else + } else { + RO_RTFREE(ro); needfiblookup = 1; /* Redo the routing table lookup. */ + } } /* See if fib was changed by packet filter. */ if (fibnum != M_GETFIB(m)) { @@ -1237,7 +1238,7 @@ ip6_insertfraghdr(struct mbuf *m0, struct mbuf *m, int hlen, * Returns 0 on success. */ static int -ip6_getpmtu_ctl(u_int fibnum, struct in6_addr *dst, u_long *mtup) +ip6_getpmtu_ctl(u_int fibnum, const struct in6_addr *dst, u_long *mtup) { struct nhop6_extended nh6; struct in6_addr kdst; @@ -1271,7 +1272,7 @@ ip6_getpmtu_ctl(u_int fibnum, struct in6_addr *dst, u_long *mtup) */ static int ip6_getpmtu(struct route_in6 *ro_pmtu, int do_lookup, - struct ifnet *ifp, struct in6_addr *dst, u_long *mtup, + struct ifnet *ifp, const struct in6_addr *dst, u_long *mtup, int *alwaysfragp, u_int fibnum) { struct nhop6_basic nh6; |