diff options
author | 2015-07-18 00:25:06 +0000 | |
---|---|---|
committer | 2015-07-18 00:25:06 +0000 | |
commit | 61fc5e7456542087ad3d486708abae7f4dded920 (patch) | |
tree | 9b7f4c8b4f767588d48a7f9140d83d6a457e1a82 | |
parent | Check for errors in the status register after performing a PCI configuration (diff) | |
download | wireguard-openbsd-61fc5e7456542087ad3d486708abae7f4dded920.tar.xz wireguard-openbsd-61fc5e7456542087ad3d486708abae7f4dded920.zip |
Packets that make it to ether_input that have M_VLANTAG set must be dropped.
vlan(4) clears M_VLANTAG when a tag matches but if the tag is still there
it means that the vlan is not configured on the interface.
Found with mpi@ and rzalamena@ while discussing various vlan troubles.
-rw-r--r-- | sys/net/if_ethersubr.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index a4c051cc802..c86a6314c79 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ethersubr.c,v 1.218 2015/07/17 21:58:07 rzalamena Exp $ */ +/* $OpenBSD: if_ethersubr.c,v 1.219 2015/07/18 00:25:06 claudio Exp $ */ /* $NetBSD: if_ethersubr.c,v 1.19 1996/05/07 02:40:30 thorpej Exp $ */ /* @@ -326,8 +326,10 @@ ether_input(struct ifnet *ifp, struct mbuf *m) /* * If packet has been filtered by the bpf listener, drop it now + * also HW vlan tagged packets that were not collected by vlan(4) + * must be dropped now. */ - if (m->m_flags & M_FILDROP) { + if (m->m_flags & (M_FILDROP | M_VLANTAG)) { m_freem(m); return (1); } |