Skip to content

Commit 474a2dd

Browse files
LGA1150davem330
authored andcommitted
net: dsa: mt7530: fix VLAN traffic leaks
PCR_MATRIX field was set to all 1's when VLAN filtering is enabled, but was not reset when it is disabled, which may cause traffic leaks: ip link add br0 type bridge vlan_filtering 1 ip link add br1 type bridge vlan_filtering 1 ip link set swp0 master br0 ip link set swp1 master br1 ip link set br0 type bridge vlan_filtering 0 ip link set br1 type bridge vlan_filtering 0 # traffic in br0 and br1 will start leaking to each other As port_bridge_{add,del} have set up PCR_MATRIX properly, remove the PCR_MATRIX write from mt7530_port_set_vlan_aware. Fixes: 83163f7 ("net: dsa: mediatek: add VLAN support for MT7530") Signed-off-by: DENG Qingfang <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 835744e commit 474a2dd

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

drivers/net/dsa/mt7530.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,14 +1262,6 @@ mt7530_port_set_vlan_aware(struct dsa_switch *ds, int port)
12621262
{
12631263
struct mt7530_priv *priv = ds->priv;
12641264

1265-
/* The real fabric path would be decided on the membership in the
1266-
* entry of VLAN table. PCR_MATRIX set up here with ALL_MEMBERS
1267-
* means potential VLAN can be consisting of certain subset of all
1268-
* ports.
1269-
*/
1270-
mt7530_rmw(priv, MT7530_PCR_P(port),
1271-
PCR_MATRIX_MASK, PCR_MATRIX(MT7530_ALL_MEMBERS));
1272-
12731265
/* Trapped into security mode allows packet forwarding through VLAN
12741266
* table lookup. CPU port is set to fallback mode to let untagged
12751267
* frames pass through.

0 commit comments

Comments
 (0)