summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/net/pf.c4
-rw-r--r--sys/net/pf_norm.c4
-rw-r--r--sys/netinet6/ip6_forward.c4
-rw-r--r--sys/netinet6/ip6_mroute.c4
-rw-r--r--sys/netinet6/ip6_output.c7
-rw-r--r--sys/netinet6/nd6.c13
-rw-r--r--sys/netinet6/nd6.h6
-rw-r--r--sys/netinet6/nd6_nbr.c4
8 files changed, 16 insertions, 30 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c
index 960ac320b94..4a482e5baa7 100644
--- a/sys/net/pf.c
+++ b/sys/net/pf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf.c,v 1.976 2016/06/15 11:36:06 mikeb Exp $ */
+/* $OpenBSD: pf.c,v 1.977 2016/06/15 11:49:34 mpi Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -5762,7 +5762,7 @@ pf_route6(struct mbuf **m, struct pf_rule *r, int dir, struct ifnet *oifp,
ip6stat.ip6s_noroute++;
goto bad;
}
- nd6_output(ifp, m0, dst, rt);
+ ifp->if_output(ifp, m0, sin6tosa(dst), rt);
rtfree(rt);
} else {
icmp6_error(m0, ICMP6_PACKET_TOO_BIG, 0, ifp->if_mtu);
diff --git a/sys/net/pf_norm.c b/sys/net/pf_norm.c
index 1705b184a12..2b78bebe94f 100644
--- a/sys/net/pf_norm.c
+++ b/sys/net/pf_norm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf_norm.c,v 1.187 2016/06/15 11:36:06 mikeb Exp $ */
+/* $OpenBSD: pf_norm.c,v 1.188 2016/06/15 11:49:34 mpi Exp $ */
/*
* Copyright 2001 Niels Provos <provos@citi.umich.edu>
@@ -761,7 +761,7 @@ pf_refragment6(struct mbuf **m0, struct m_tag *mtag, struct sockaddr_in6 *dst,
if (ifp == NULL) {
ip6_forward(m, 0);
} else if ((u_long)m->m_pkthdr.len <= ifp->if_mtu) {
- nd6_output(ifp, m, dst, rt);
+ ifp->if_output(ifp, m, sin6tosa(dst), rt);
} else {
icmp6_error(m, ICMP6_PACKET_TOO_BIG, 0,
ifp->if_mtu);
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);