diff options
Diffstat (limited to 'sys/netinet6')
-rw-r--r-- | sys/netinet6/ip6_forward.c | 4 | ||||
-rw-r--r-- | sys/netinet6/ip6_mroute.c | 4 | ||||
-rw-r--r-- | sys/netinet6/ip6_output.c | 7 | ||||
-rw-r--r-- | sys/netinet6/nd6.c | 13 | ||||
-rw-r--r-- | sys/netinet6/nd6.h | 6 | ||||
-rw-r--r-- | sys/netinet6/nd6_nbr.c | 4 |
6 files changed, 12 insertions, 26 deletions
diff --git a/sys/netinet6/ip6_forward.c b/sys/netinet6/ip6_forward.c index 6a7f32a00b0..809d379e22b 100644 --- a/sys/netinet6/ip6_forward.c +++ b/sys/netinet6/ip6_forward.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip6_forward.c,v 1.90 2016/05/02 09:30:47 mpi Exp $ */ +/* $OpenBSD: ip6_forward.c,v 1.91 2016/06/15 11:49:34 mpi Exp $ */ /* $KAME: ip6_forward.c,v 1.75 2001/06/29 12:42:13 jinmei Exp $ */ /* @@ -332,7 +332,7 @@ reroute: goto out; } - error = nd6_output(ifp, m, dst, rt); + error = ifp->if_output(ifp, m, sin6tosa(dst), rt); if (error) { ip6stat.ip6s_cantforward++; } else { diff --git a/sys/netinet6/ip6_mroute.c b/sys/netinet6/ip6_mroute.c index 51d504c15d7..bf6a9e0b38f 100644 --- a/sys/netinet6/ip6_mroute.c +++ b/sys/netinet6/ip6_mroute.c @@ -1429,10 +1429,6 @@ phyint_send6(struct ip6_hdr *ip6, struct mif6 *mifp, struct mbuf *m) dst6->sin6_len = sizeof(struct sockaddr_in6); dst6->sin6_family = AF_INET6; dst6->sin6_addr = ip6->ip6_dst; - /* - * We just call if_output instead of nd6_output here, since - * we need no ND for a multicast forwarded packet...right? - */ error = ifp->if_output(ifp, mb_copy, sin6tosa(&ro.ro_dst), NULL); } else { diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c index bac8542240a..4f7b9806383 100644 --- a/sys/netinet6/ip6_output.c +++ b/sys/netinet6/ip6_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip6_output.c,v 1.207 2016/05/19 11:34:40 jca Exp $ */ +/* $OpenBSD: ip6_output.c,v 1.208 2016/06/15 11:49:34 mpi Exp $ */ /* $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $ */ /* @@ -692,7 +692,7 @@ reroute: * transmit packet without fragmentation */ if (dontfrag || (!alwaysfrag && tlen <= mtu)) { /* case 1-a and 2-a */ - error = nd6_output(ifp, m, dst, ro->ro_rt); + error = ifp->if_output(ifp, m, sin6tosa(dst), ro->ro_rt); goto done; } @@ -767,7 +767,8 @@ reroute: m->m_nextpkt = 0; if (error == 0) { ip6stat.ip6s_ofragments++; - error = nd6_output(ifp, m, dst, ro->ro_rt); + error = ifp->if_output(ifp, m, sin6tosa(dst), + ro->ro_rt); } else m_freem(m); } diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c index 82d5a6b9dbc..01383bc63c0 100644 --- a/sys/netinet6/nd6.c +++ b/sys/netinet6/nd6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nd6.c,v 1.185 2016/06/08 12:57:58 mpi Exp $ */ +/* $OpenBSD: nd6.c,v 1.186 2016/06/15 11:49:34 mpi Exp $ */ /* $KAME: nd6.c,v 1.280 2002/06/08 19:52:07 itojun Exp $ */ /* @@ -1352,7 +1352,7 @@ fail: if (ln->ln_state == ND6_LLINFO_STALE) { /* - * XXX: since nd6_output() below will cause + * Since nd6_resolve() in ifp->if_output() will cause * state transition to DELAY and reset the timer, * we must set the timer now, although it is actually * meaningless. @@ -1366,7 +1366,7 @@ fail: * we assume ifp is not a p2p here, so just * set the 2nd argument as the 1st one. */ - nd6_output(ifp, n, satosin6(rt_key(rt)), rt); + ifp->if_output(ifp, n, rt_key(rt), rt); if (ln->ln_hold == n) { /* n is back in ln_hold. Discard. */ m_freem(ln->ln_hold); @@ -1489,13 +1489,6 @@ nd6_slowtimo(void *ignored_arg) } int -nd6_output(struct ifnet *ifp, struct mbuf *m0, struct sockaddr_in6 *dst, - struct rtentry *rt0) -{ - return (ifp->if_output(ifp, m0, sin6tosa(dst), rt0)); -} - -int nd6_resolve(struct ifnet *ifp, struct rtentry *rt0, struct mbuf *m, struct sockaddr *dst, u_char *desten) { diff --git a/sys/netinet6/nd6.h b/sys/netinet6/nd6.h index feaf704d139..44bce18a0ca 100644 --- a/sys/netinet6/nd6.h +++ b/sys/netinet6/nd6.h @@ -1,4 +1,4 @@ -/* $OpenBSD: nd6.h,v 1.61 2016/06/08 12:57:58 mpi Exp $ */ +/* $OpenBSD: nd6.h,v 1.62 2016/06/15 11:49:34 mpi Exp $ */ /* $KAME: nd6.h,v 1.95 2002/06/08 11:31:06 itojun Exp $ */ /* @@ -264,13 +264,9 @@ void nd6_llinfo_settimer(struct llinfo_nd6 *, int); void nd6_timer(void *); void nd6_purge(struct ifnet *); void nd6_nud_hint(struct rtentry *); -int nd6_resolve(struct ifnet *, struct rtentry *, - struct mbuf *, struct sockaddr *, u_char *); void nd6_rtrequest(struct ifnet *, int, struct rtentry *); int nd6_ioctl(u_long, caddr_t, struct ifnet *); void nd6_cache_lladdr(struct ifnet *, struct in6_addr *, char *, int, int, int); -int nd6_output(struct ifnet *, struct mbuf *, struct sockaddr_in6 *, - struct rtentry *); int nd6_resolve(struct ifnet *, struct rtentry *, struct mbuf *, struct sockaddr *, u_char *); int nd6_sysctl(int, void *, size_t *, void *, size_t); diff --git a/sys/netinet6/nd6_nbr.c b/sys/netinet6/nd6_nbr.c index 00a22e34df6..138e5eacc71 100644 --- a/sys/netinet6/nd6_nbr.c +++ b/sys/netinet6/nd6_nbr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nd6_nbr.c,v 1.103 2016/06/01 23:45:19 dlg Exp $ */ +/* $OpenBSD: nd6_nbr.c,v 1.104 2016/06/15 11:49:35 mpi Exp $ */ /* $KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $ */ /* @@ -875,7 +875,7 @@ nd6_na_input(struct mbuf *m, int off, int icmp6len) * we assume ifp is not a loopback here, so just set the 2nd * argument as the 1st one. */ - nd6_output(ifp, n, satosin6(rt_key(rt)), rt); + ifp->if_output(ifp, n, rt_key(rt), rt); if (ln->ln_hold == n) { /* n is back in ln_hold. Discard. */ m_freem(ln->ln_hold); |