summaryrefslogtreecommitdiff
path: root/sys/netmpls
diff options
context:
space:
mode:
authorEsben Norby <norby@cvs.openbsd.org>2008-05-06 08:04:05 +0000
committerEsben Norby <norby@cvs.openbsd.org>2008-05-06 08:04:05 +0000
commit715f3069aea09faa3d9052dfd92b53f00dc89411 (patch)
tree9156281da8311a048af96dd00b9ebbd5b4748783 /sys/netmpls
parent066c7b9f8d4d7580b8870b49dd4eccf34a853056 (diff)
Drop all broadcast and multicast packets.
ok claudio@
Diffstat (limited to 'sys/netmpls')
-rw-r--r--sys/netmpls/mpls_input.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/netmpls/mpls_input.c b/sys/netmpls/mpls_input.c
index d92ceac9fc7..bf0ec69fbd5 100644
--- a/sys/netmpls/mpls_input.c
+++ b/sys/netmpls/mpls_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpls_input.c,v 1.8 2008/05/06 08:01:24 norby Exp $ */
+/* $OpenBSD: mpls_input.c,v 1.9 2008/05/06 08:04:04 norby Exp $ */
/*
* Copyright (c) 2008 Claudio Jeker <claudio@openbsd.org>
@@ -80,6 +80,12 @@ mpls_input(struct mbuf *m)
return;
}
+ /* drop all broadcast and multicast packets */
+ if (m->m_flags & (M_BCAST | M_MCAST)) {
+ m_freem(m);
+ return;
+ }
+
if (m->m_len < sizeof(*shim))
if ((m = m_pullup(m, sizeof(*shim))) == NULL)
return;