Skip to content

Commit 2e97b0c

Browse files
ffainellidavem330
authored andcommitted
net: dsa: b53: Lookup VID in ARL searches when VLAN is enabled
When VLAN is enabled, and an ARL search is issued, we also need to compare the full {MAC,VID} tuple before returning a successful search result. Fixes: 1da6df8 ("net: dsa: b53: Implement ARL add/del/dump operations") Reviewed-by: Andrew Lunn <[email protected]> Signed-off-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 87f78f2 commit 2e97b0c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/net/dsa/b53/b53_common.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1505,6 +1505,9 @@ static int b53_arl_read(struct b53_device *dev, u64 mac,
15051505
continue;
15061506
if ((mac_vid & ARLTBL_MAC_MASK) != mac)
15071507
continue;
1508+
if (dev->vlan_enabled &&
1509+
((mac_vid >> ARLTBL_VID_S) & ARLTBL_VID_MASK) != vid)
1510+
continue;
15081511
*idx = i;
15091512
}
15101513

0 commit comments

Comments
 (0)