Skip to content

Commit d42bce4

Browse files
KanjiMonsterPaolo Abeni
authored andcommitted
net: dsa: b53: skip multicast entries for fdb_dump()
port_fdb_dump() is supposed to only add fdb entries, but we iterate over the full ARL table, which also includes multicast entries. So check if the entry is a multicast entry before passing it on to the callback(). Additionally, the port of those entries is a bitmask, not a port number, so any included entries would have even be for the wrong port. Fixes: 1da6df8 ("net: dsa: b53: Implement ARL add/del/dump operations") Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com> Link: https://patch.msgid.link/20251217205756.172123-1-jonas.gorski@gmail.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
1 parent 352df98 commit d42bce4

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

drivers/net/dsa/b53/b53_common.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2169,6 +2169,9 @@ static int b53_fdb_copy(int port, const struct b53_arl_entry *ent,
21692169
if (!ent->is_valid)
21702170
return 0;
21712171

2172+
if (is_multicast_ether_addr(ent->mac))
2173+
return 0;
2174+
21722175
if (port != ent->port)
21732176
return 0;
21742177

0 commit comments

Comments
 (0)