aboutsummaryrefslogtreecommitdiff
path: root/sys/net/if_vlan.c
diff options
context:
space:
mode:
authorBill Fenner <fenner@FreeBSD.org>2001-10-06 05:02:11 +0000
committerBill Fenner <fenner@FreeBSD.org>2001-10-06 05:02:11 +0000
commit242c766b79a8977088a63512262d9f25adbe0893 (patch)
tree7ace8e979a1986dec7595db647c06671e48dbe7c /sys/net/if_vlan.c
parent887f6fb8d48c638cc027c126329e3aad026ac05d (diff)
downloadsrc-242c766b79a8977088a63512262d9f25adbe0893.tar.gz
src-242c766b79a8977088a63512262d9f25adbe0893.zip
- Fix typo in "didn't find tag in list" code -- != should have been ==.
This fixes the panic when receiving a packet with an unknown tag, and also allows reception of packets with known tags. - Allow overlapping tag number spaces when using multiple hardware-assisted VLAN parent devices (by comparing the parent interface in vlan_input_tag() just as in vlan_input() ). - fix typo in comment MFC after: 1 week
Notes
Notes: svn path=/head/; revision=84576
Diffstat (limited to 'sys/net/if_vlan.c')
-rw-r--r--sys/net/if_vlan.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c
index d84a4b987cc3..0f9cfff2e6ac 100644
--- a/sys/net/if_vlan.c
+++ b/sys/net/if_vlan.c
@@ -403,11 +403,12 @@ vlan_input_tag(struct ether_header *eh, struct mbuf *m, u_int16_t t)
for (ifv = LIST_FIRST(&ifv_list); ifv != NULL;
ifv = LIST_NEXT(ifv, ifv_list)) {
- if (ifv->ifv_tag == t)
+ if (m->m_pkthdr.rcvif == ifv->ifv_p
+ && ifv->ifv_tag == t)
break;
}
- if (ifv !=NULL || (ifv->ifv_if.if_flags & IFF_UP) == 0) {
+ if (ifv == NULL || (ifv->ifv_if.if_flags & IFF_UP) == 0) {
m_free(m);
return -1; /* So the parent can take note */
}
@@ -415,7 +416,7 @@ vlan_input_tag(struct ether_header *eh, struct mbuf *m, u_int16_t t)
/*
* Having found a valid vlan interface corresponding to
* the given source interface and vlan tag, run the
- * the real packet through ethert_input().
+ * the real packet through ether_input().
*/
m->m_pkthdr.rcvif = &ifv->ifv_if;
@@ -437,7 +438,7 @@ vlan_input(struct ether_header *eh, struct mbuf *m)
break;
}
- if (ifv != NULL || (ifv->ifv_if.if_flags & IFF_UP) == 0) {
+ if (ifv == NULL || (ifv->ifv_if.if_flags & IFF_UP) == 0) {
m_freem(m);
return -1; /* so ether_input can take note */
}