summaryrefslogtreecommitdiff
path: root/sys/net/if_ethersubr.c
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2007-05-29 20:19:38 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2007-05-29 20:19:38 +0000
commitc3607619e4085e9171fba8aabba45501ed7de795 (patch)
tree45070a52edb3bb5552e10893a91063ef2a607024 /sys/net/if_ethersubr.c
parent39cad7c37c007fa76875f9956d2396df61367ca5 (diff)
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
Diffstat (limited to 'sys/net/if_ethersubr.c')
-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