summaryrefslogtreecommitdiff
path: root/sys/net/if_tokensubr.c
diff options
context:
space:
mode:
authorDaniel Hartmeier <dhartmei@cvs.openbsd.org>2003-08-18 11:01:42 +0000
committerDaniel Hartmeier <dhartmei@cvs.openbsd.org>2003-08-18 11:01:42 +0000
commit537fe9c0ea801f86b1002033d79dccddaa6b283c (patch)
tree34a8c3bd738504e02748e000ad30f86e0fd6079f /sys/net/if_tokensubr.c
parentb70b3b7d7332656d3fa96108aad1ec74228ecc8a (diff)
prevent looutput() feedback of broadcast/multicast packets if they are
pf routed. prevents a kernel lockup with some (non-sensical) route-to rules. report and debugging by mpech@. ok itojun@, henning@, mpech@.
Diffstat (limited to 'sys/net/if_tokensubr.c')
-rw-r--r--sys/net/if_tokensubr.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/net/if_tokensubr.c b/sys/net/if_tokensubr.c
index 302f27e03ec..e276780ee54 100644
--- a/sys/net/if_tokensubr.c
+++ b/sys/net/if_tokensubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_tokensubr.c,v 1.11 2003/06/02 23:28:12 millert Exp $ */
+/* $OpenBSD: if_tokensubr.c,v 1.12 2003/08/18 11:01:41 dhartmei Exp $ */
/* $NetBSD: if_tokensubr.c,v 1.7 1999/05/30 00:39:07 bad Exp $ */
/*
@@ -201,7 +201,8 @@ token_output(ifp, m0, dst, rt0)
riflen = (ntohs(rif->tr_rcf) & TOKEN_RCF_LEN_MASK) >> 8;
}
/* If broadcasting on a simplex interface, loopback a copy. */
- if ((m->m_flags & M_BCAST) && (ifp->if_flags & IFF_SIMPLEX))
+ if ((m->m_flags & M_BCAST) && (ifp->if_flags & IFF_SIMPLEX) &&
+ m_tag_find(m, PACKET_TAG_PF_ROUTED, NULL) == NULL)
mcopy = m_copy(m, 0, (int)M_COPYALL);
etype = htons(ETHERTYPE_IP);
break;