Skip to content

Commit 4db2a5e

Browse files
vladimirolteankuba-moo
authored andcommitted
net: dsa: fix dsa_port_vlan_filtering when global
The blamed refactoring commit changed a "port" iterator with "other_dp", but still looked at the slave_dev of the dp outside the loop, instead of other_dp->slave from the loop. As a result, dsa_port_vlan_filtering() would not call dsa_slave_manage_vlan_filtering() except for the port in cause, and not for all switch ports as expected. Fixes: d0004a0 ("net: dsa: remove the "dsa_to_port in a loop" antipattern from the core") Reported-by: Lucian Banu <[email protected]> Signed-off-by: Vladimir Oltean <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 1e53834 commit 4db2a5e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/dsa/port.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,7 @@ int dsa_port_vlan_filtering(struct dsa_port *dp, bool vlan_filtering,
799799
ds->vlan_filtering = vlan_filtering;
800800

801801
dsa_switch_for_each_user_port(other_dp, ds) {
802-
struct net_device *slave = dp->slave;
802+
struct net_device *slave = other_dp->slave;
803803

804804
/* We might be called in the unbind path, so not
805805
* all slave devices might still be registered.

0 commit comments

Comments
 (0)