Skip to content

Commit 7428022

Browse files
LGA1150davem330
authored andcommitted
net: dsa: mt7530: fix VLAN traffic leaks again
When a port leaves a VLAN-aware bridge, the current code does not clear other ports' matrix field bit. If the bridge is later set to VLAN-unaware mode, traffic in the bridge may leak to that port. Remove the VLAN filtering check in mt7530_port_bridge_leave. Fixes: 474a2dd ("net: dsa: mt7530: fix VLAN traffic leaks") Fixes: 83163f7 ("net: dsa: mediatek: add VLAN support for MT7530") Signed-off-by: DENG Qingfang <[email protected]> Reviewed-by: Vladimir Oltean <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent e0ba605 commit 7428022

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

drivers/net/dsa/mt7530.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1315,11 +1315,8 @@ mt7530_port_bridge_leave(struct dsa_switch *ds, int port,
13151315
/* Remove this port from the port matrix of the other ports
13161316
* in the same bridge. If the port is disabled, port matrix
13171317
* is kept and not being setup until the port becomes enabled.
1318-
* And the other port's port matrix cannot be broken when the
1319-
* other port is still a VLAN-aware port.
13201318
*/
1321-
if (dsa_is_user_port(ds, i) && i != port &&
1322-
!dsa_port_is_vlan_filtering(dsa_to_port(ds, i))) {
1319+
if (dsa_is_user_port(ds, i) && i != port) {
13231320
if (dsa_to_port(ds, i)->bridge_dev != bridge)
13241321
continue;
13251322
if (priv->ports[i].enable)

0 commit comments

Comments
 (0)