summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorElliot Ayrey <elliot.ayrey@alliedtelesis.co.nz>2024-07-12 13:31:33 +1200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-08-03 08:59:48 +0200
commitf7fb60b5380a8232a9003a3c9f6c9f732829c699 (patch)
tree6853d7137cbb4de0eb7858ed5ecb5633bae1813a /net
parent12144069209eec7f2090ce9afa15acdcc2c2a537 (diff)
downloadlinux-stable-f7fb60b5380a8232a9003a3c9f6c9f732829c699.tar.gz
linux-stable-f7fb60b5380a8232a9003a3c9f6c9f732829c699.tar.bz2
linux-stable-f7fb60b5380a8232a9003a3c9f6c9f732829c699.zip
net: bridge: mst: Check vlan state for egress decision
[ Upstream commit 0a1868b93fad5938dbcca77286b25bf211c49f7a ] If a port is blocking in the common instance but forwarding in an MST instance, traffic egressing the bridge will be dropped because the state of the common instance is overriding that of the MST instance. Fix this by skipping the port state check in MST mode to allow checking the vlan state via br_allowed_egress(). This is similar to what happens in br_handle_frame_finish() when checking ingress traffic, which was introduced in the change below. Fixes: ec7328b59176 ("net: bridge: mst: Multiple Spanning Tree (MST) mode") Signed-off-by: Elliot Ayrey <elliot.ayrey@alliedtelesis.co.nz> Acked-by: Nikolay Aleksandrov <razor@blackwall.org> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net')
-rw-r--r--net/bridge/br_forward.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bridge/br_forward.c b/net/bridge/br_forward.c
index d97064d460dc..e19b583ff2c6 100644
--- a/net/bridge/br_forward.c
+++ b/net/bridge/br_forward.c
@@ -25,8 +25,8 @@ static inline int should_deliver(const struct net_bridge_port *p,
vg = nbp_vlan_group_rcu(p);
return ((p->flags & BR_HAIRPIN_MODE) || skb->dev != p->dev) &&
- p->state == BR_STATE_FORWARDING && br_allowed_egress(vg, skb) &&
- nbp_switchdev_allowed_egress(p, skb) &&
+ (br_mst_is_enabled(p->br) || p->state == BR_STATE_FORWARDING) &&
+ br_allowed_egress(vg, skb) && nbp_switchdev_allowed_egress(p, skb) &&
!br_skb_isolated(p, skb);
}