summaryrefslogtreecommitdiff
path: root/sys/net/if_ethersubr.c
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2000-06-02 15:44:57 +0000
committerJason Wright <jason@cvs.openbsd.org>2000-06-02 15:44:57 +0000
commitbf83665ddbd53f75dca7fa74184049ed1fae5cc2 (patch)
treec1ae92f1d6a9dafddf5b00c400ff102b60bc06ee /sys/net/if_ethersubr.c
parent4082d2eaa57d2bdf9d2f6729921fad4cf2f32916 (diff)
vlan was consuming all vlan frames before they had a chance to be bridged.
Change the order of operations to be: ether_input() -> bridge_input() -> vlan_input() Also, only process vlan frames that are unicast for us or bcast/mcast.
Diffstat (limited to 'sys/net/if_ethersubr.c')
-rw-r--r--sys/net/if_ethersubr.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
index 58c8ae4edb0..7534a603006 100644
--- a/sys/net/if_ethersubr.c
+++ b/sys/net/if_ethersubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ethersubr.c,v 1.36 2000/06/02 00:36:41 jason Exp $ */
+/* $OpenBSD: if_ethersubr.c,v 1.37 2000/06/02 15:44:56 jason Exp $ */
/* $NetBSD: if_ethersubr.c,v 1.19 1996/05/07 02:40:30 thorpej Exp $ */
/*
@@ -573,16 +573,6 @@ ether_input(ifp, eh, m)
if (m->m_flags & (M_BCAST|M_MCAST))
ifp->if_imcasts++;
- etype = ntohs(eh->ether_type);
-
-#if NVLAN > 0
- if (etype == vlan_proto) {
- if (vlan_input(eh, m) < 0)
- ifp->if_data.ifi_noproto++;
- return;
- }
-#endif /* NVLAN > 0 */
-
#if NBRIDGE > 0
/*
* Tap the packet off here for a bridge, if configured and
@@ -613,6 +603,17 @@ ether_input(ifp, eh, m)
}
decapsulate:
+
+ etype = ntohs(eh->ether_type);
+
+#if NVLAN > 0
+ if (etype == vlan_proto) {
+ if (vlan_input(eh, m) < 0)
+ ifp->if_data.ifi_noproto++;
+ return;
+ }
+#endif /* NVLAN > 0 */
+
switch (etype) {
#ifdef INET
case ETHERTYPE_IP: