diff options
author | Christian Weisgerber <naddy@cvs.openbsd.org> | 2010-06-03 16:15:01 +0000 |
---|---|---|
committer | Christian Weisgerber <naddy@cvs.openbsd.org> | 2010-06-03 16:15:01 +0000 |
commit | c79d3ee48afe01a1fdde546d24383316d3fc2a2b (patch) | |
tree | c9ca3b140cffaa97d9874bb337a635d674e4191d /sys/net/if_ethersubr.c | |
parent | a190b1bfa728e74bdb3b9f6990136aa5bae67a22 (diff) |
Add support for 802.1ad-style QinQ nested VLANs.
QinQ-compliant svlan (service VLAN) interfaces are implemented as
a new cloner type, use Ethernet type 0x88a8, and have a dedicated
VLAN tag hash to avoid ID conflicts. vlan(4) interfaces can be
stacked on top of svlan(4).
Originally from reyk@, input from claudio@ and deraadt@
ok claudio@
Diffstat (limited to 'sys/net/if_ethersubr.c')
-rw-r--r-- | sys/net/if_ethersubr.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index 0c40eccc614..a82b1c0a9c3 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ethersubr.c,v 1.143 2010/05/28 12:09:09 claudio Exp $ */ +/* $OpenBSD: if_ethersubr.c,v 1.144 2010/06/03 16:15:00 naddy Exp $ */ /* $NetBSD: if_ethersubr.c,v 1.19 1996/05/07 02:40:30 thorpej Exp $ */ /* @@ -613,8 +613,8 @@ ether_input(ifp0, eh, m) } #if NVLAN > 0 - if (((m->m_flags & M_VLANTAG) || etype == ETHERTYPE_VLAN) - && (vlan_input(eh, m) == 0)) + if (((m->m_flags & M_VLANTAG) || etype == ETHERTYPE_VLAN || + etype == ETHERTYPE_QINQ) && (vlan_input(eh, m) == 0)) return; #endif @@ -639,7 +639,8 @@ ether_input(ifp0, eh, m) #endif #if NVLAN > 0 - if ((m->m_flags & M_VLANTAG) || etype == ETHERTYPE_VLAN) { + if ((m->m_flags & M_VLANTAG) || etype == ETHERTYPE_VLAN || + etype == ETHERTYPE_QINQ) { /* The bridge did not want the vlan frame either, drop it. */ ifp->if_noproto++; m_freem(m); |