summaryrefslogtreecommitdiffstats
path: root/sys/netinet6
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2015-09-12 13:34:12 +0000
committermpi <mpi@openbsd.org>2015-09-12 13:34:12 +0000
commit7f3eeafaec4c5f150ce655d1a585e3df7f91e0f7 (patch)
treea86544ef806f8e09365bd489d08fc0627a4d691f /sys/netinet6
parentWrap <fts.h> and <ftw.h> so that internal calls to fts_*() go direct and (diff)
downloadwireguard-openbsd-7f3eeafaec4c5f150ce655d1a585e3df7f91e0f7.tar.xz
wireguard-openbsd-7f3eeafaec4c5f150ce655d1a585e3df7f91e0f7.zip
Introduce if_input_local() a function to feed local traffic back to
the protocol queues. It basically does what looutput() was doing but having a generic function will allow us to get rid of the loopback hack overwwritting the rt_ifp field of RTF_LOCAL routes. ok mikeb@, dlg@, claudio@
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/ip6_mroute.c4
-rw-r--r--sys/netinet6/ip6_output.c4
-rw-r--r--sys/netinet6/mld6.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/sys/netinet6/ip6_mroute.c b/sys/netinet6/ip6_mroute.c
index 6d5856f930c..c0a30cdbc75 100644
--- a/sys/netinet6/ip6_mroute.c
+++ b/sys/netinet6/ip6_mroute.c
@@ -1899,8 +1899,8 @@ pim6_input(struct mbuf **mp, int *offp, int proto)
}
#endif
- looutput(mif6table[reg_mif_num].m6_ifp, m,
- sin6tosa(&dst), NULL);
+ if_input_local(mif6table[reg_mif_num].m6_ifp, m,
+ dst->sin6_family);
/* prepare the register head to send to the mrouting daemon */
m = mcp;
diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c
index 80c27a46edd..af8ba3d0e10 100644
--- a/sys/netinet6/ip6_output.c
+++ b/sys/netinet6/ip6_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip6_output.c,v 1.185 2015/09/11 20:16:03 claudio Exp $ */
+/* $OpenBSD: ip6_output.c,v 1.186 2015/09/12 13:34:12 mpi Exp $ */
/* $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $ */
/*
@@ -3070,7 +3070,7 @@ ip6_mloopback(struct ifnet *ifp, struct mbuf *m, struct sockaddr_in6 *dst)
if (IN6_IS_SCOPE_EMBED(&ip6->ip6_dst))
ip6->ip6_dst.s6_addr16[1] = 0;
- (void)looutput(ifp, copym, sin6tosa(dst), NULL);
+ if_input_local(ifp, copym, dst->sin6_family);
}
/*
diff --git a/sys/netinet6/mld6.c b/sys/netinet6/mld6.c
index 0bca05f3e9d..d9aa23a6cb1 100644
--- a/sys/netinet6/mld6.c
+++ b/sys/netinet6/mld6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mld6.c,v 1.45 2015/09/11 08:17:06 claudio Exp $ */
+/* $OpenBSD: mld6.c,v 1.46 2015/09/12 13:34:12 mpi Exp $ */
/* $KAME: mld6.c,v 1.26 2001/02/16 14:50:35 itojun Exp $ */
/*
@@ -287,7 +287,7 @@ mld6_input(struct mbuf *m, int off)
* router, so discard reports sourced by me.
* Note that it is impossible to check IFF_LOOPBACK flag of
* ifp for this purpose, since ip6_mloopback pass the physical
- * interface to looutput.
+ * interface to if_input_local().
*/
if (m->m_flags & M_LOOP) /* XXX: grotty flag, but efficient */
break;