Skip to content

Commit 0a1868b

Browse files
elliotayreydavem330
authored andcommitted
net: bridge: mst: Check vlan state for egress decision
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: ec7328b ("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>
1 parent 250b8b8 commit 0a1868b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

net/bridge/br_forward.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ static inline int should_deliver(const struct net_bridge_port *p,
2525

2626
vg = nbp_vlan_group_rcu(p);
2727
return ((p->flags & BR_HAIRPIN_MODE) || skb->dev != p->dev) &&
28-
p->state == BR_STATE_FORWARDING && br_allowed_egress(vg, skb) &&
29-
nbp_switchdev_allowed_egress(p, skb) &&
28+
(br_mst_is_enabled(p->br) || p->state == BR_STATE_FORWARDING) &&
29+
br_allowed_egress(vg, skb) && nbp_switchdev_allowed_egress(p, skb) &&
3030
!br_skb_isolated(p, skb);
3131
}
3232

0 commit comments

Comments
 (0)