bridge: fix lookup for untagged packets in bridge_transmit()

b0e38a1373 improved if_bridge's ability to cope with different VLANs,
but it failed to update bridge_transmit() to cope with the new rule that
untagged packets are treated as having VLAN ID 0 (rather than 1, as used
to be the case).

Fix that oversight.

PR:		270559
Reviewed by:	kp
This commit is contained in:
Ben Wilber 2023-06-01 11:29:36 +02:00 committed by Kristof Provost
parent d187154750
commit fd7edfcdc3

View file

@ -2276,7 +2276,8 @@ bridge_transmit(struct ifnet *ifp, struct mbuf *m)
eh = mtod(m, struct ether_header *);
if (((m->m_flags & (M_BCAST|M_MCAST)) == 0) &&
(dst_if = bridge_rtlookup(sc, eh->ether_dhost, 1)) != NULL) {
(dst_if = bridge_rtlookup(sc, eh->ether_dhost, DOT1Q_VID_NULL)) !=
NULL) {
error = bridge_enqueue(sc, dst_if, m);
} else
bridge_broadcast(sc, ifp, m, 0);