From fd7edfcdc3c329cdbd3f5e7a554f7153e805ab04 Mon Sep 17 00:00:00 2001 From: Ben Wilber Date: Thu, 1 Jun 2023 11:29:36 +0200 Subject: [PATCH] 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 --- sys/net/if_bridge.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c index 9fe915d3128..204fd3892c1 100644 --- a/sys/net/if_bridge.c +++ b/sys/net/if_bridge.c @@ -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);