summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornorby <norby@openbsd.org>2008-05-06 08:04:04 +0000
committernorby <norby@openbsd.org>2008-05-06 08:04:04 +0000
commit8aff85b2cafc93d7a6eb1aefd35f13ba6d84922a (patch)
treeec4bde53b9137714a46989798e705bf117aa0eaa
parentget rid of rtalloc, use rtalloc1 instead. (diff)
downloadwireguard-openbsd-8aff85b2cafc93d7a6eb1aefd35f13ba6d84922a.tar.xz
wireguard-openbsd-8aff85b2cafc93d7a6eb1aefd35f13ba6d84922a.zip
Drop all broadcast and multicast packets.
ok claudio@
-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;