net: bridge: check port state before br_allowed_egress
If we make sure that br_allowed_egress is called only when we have BR_STATE_FORWARDING state then we can avoid a test later when we add per-vlan state. Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
9bbc8be29d
commit
ac0e932d0e
@ -25,7 +25,7 @@ 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) &&
|
||||
br_allowed_egress(vg, skb) && p->state == BR_STATE_FORWARDING &&
|
||||
p->state == BR_STATE_FORWARDING && br_allowed_egress(vg, skb) &&
|
||||
nbp_switchdev_allowed_egress(p, skb) &&
|
||||
!br_skb_isolated(p, skb);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user