summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhenning <henning@openbsd.org>2007-05-29 20:19:37 +0000
committerhenning <henning@openbsd.org>2007-05-29 20:19:37 +0000
commite8e86262ab3fc902e88ba703356fc5c809da52cf (patch)
treeb4d46a8f76842e11967d74930813717e82fd6a19
parentoops; (diff)
downloadwireguard-openbsd-e8e86262ab3fc902e88ba703356fc5c809da52cf.tar.xz
wireguard-openbsd-e8e86262ab3fc902e88ba703356fc5c809da52cf.zip
there was code inside
#if NPF > 0 to prevent feeding back the mbuf do looutput if we are on simplex interfaces and the packet has been routed by pf, whch can lead to a loop in weird corner cases. apparently nobody triggered these cases in ages, since pf.h was not included and thus NPF not defined and thus this code not compiled. ok theo
-rw-r--r--sys/net/if_ethersubr.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
index 9399c0f8b00..b6c9952a9e9 100644
--- a/sys/net/if_ethersubr.c
+++ b/sys/net/if_ethersubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ethersubr.c,v 1.108 2007/05/16 20:27:58 michele Exp $ */
+/* $OpenBSD: if_ethersubr.c,v 1.109 2007/05/29 20:19:37 henning Exp $ */
/* $NetBSD: if_ethersubr.c,v 1.19 1996/05/07 02:40:30 thorpej Exp $ */
/*
@@ -281,14 +281,9 @@ ether_output(ifp0, m0, dst, rt0)
if (!arpresolve(ac, rt, m, dst, edst))
return (0); /* if not yet resolved */
/* If broadcasting on a simplex interface, loopback a copy */
- if ((m->m_flags & M_BCAST) && (ifp->if_flags & IFF_SIMPLEX)) {
-#if NPF > 0
- struct pf_mtag *t;
-
- if ((t = pf_find_mtag(m)) == NULL || !t->routed)
-#endif
- mcopy = m_copy(m, 0, (int)M_COPYALL);
- }
+ if ((m->m_flags & M_BCAST) && (ifp->if_flags & IFF_SIMPLEX) &&
+ !m->m_pkthdr.pf.routed)
+ mcopy = m_copy(m, 0, (int)M_COPYALL);
etype = htons(ETHERTYPE_IP);
break;
#endif