https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=270559
Kristof Provost <k...@freebsd.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |phi...@freebsd.org --- Comment #6 from Kristof Provost <k...@freebsd.org> --- Yes, I believe your analysis is correct, as is your proposed approach for fixing it. With a bit of poking I got my test case to fail as you described, and with the following patch it works again: diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c index 60a1683c74ae..5144da190a4f 100644 --- a/sys/net/if_bridge.c +++ b/sys/net/if_bridge.c @@ -389,7 +389,7 @@ static void bridge_linkcheck(struct bridge_softc *sc); /* The default bridge vlan is 1 (IEEE 802.1Q-2003 Table 9-2) */ #define VLANTAGOF(_m) \ - (_m->m_flags & M_VLANTAG) ? EVL_VLANOFTAG(_m->m_pkthdr.ether_vtag) : 1 + (_m->m_flags & M_VLANTAG) ? EVL_VLANOFTAG(_m->m_pkthdr.ether_vtag) : 0 static struct bstp_cb_ops bridge_ops = { .bcb_state = bridge_state_change, @@ -2783,10 +2783,6 @@ bridge_rtupdate(struct bridge_softc *sc, const uint8_t *dst, uint16_t vlan, dst[3] == 0 && dst[4] == 0 && dst[5] == 0) != 0) return (EINVAL); - /* 802.1p frames map to vlan 1 */ - if (vlan == 0) - vlan = 1; - /* * A route for this destination might already exist. If so, * update it, otherwise create a new one. @@ -3118,7 +3114,7 @@ bridge_rtnode_lookup(struct bridge_softc *sc, const uint8_t *addr, uint16_t vlan hash = bridge_rthash(sc, addr); CK_LIST_FOREACH(brt, &sc->sc_rthash[hash], brt_hash) { dir = bridge_rtnode_addr_cmp(addr, brt->brt_addr); - if (dir == 0 && (brt->brt_vlan == vlan || vlan == 0)) + if (dir == 0 && (brt->brt_vlan == vlan)) return (brt); if (dir > 0) return (NULL); I assume you've got something similar? Do you want to post a review or should I post this one? Either way, we should copy philip@, because I remember him working on enhancing the bridge's support for vlans, so he may have useful things to say. -- You are receiving this mail because: You are the assignee for the bug.