diff options
author | Esben Norby <norby@cvs.openbsd.org> | 2008-05-06 08:04:05 +0000 |
---|---|---|
committer | Esben Norby <norby@cvs.openbsd.org> | 2008-05-06 08:04:05 +0000 |
commit | 715f3069aea09faa3d9052dfd92b53f00dc89411 (patch) | |
tree | 9156281da8311a048af96dd00b9ebbd5b4748783 /sys/netmpls | |
parent | 066c7b9f8d4d7580b8870b49dd4eccf34a853056 (diff) |
Drop all broadcast and multicast packets.
ok claudio@
Diffstat (limited to 'sys/netmpls')
-rw-r--r-- | sys/netmpls/mpls_input.c | 8 |
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; |