net: dsa: b53: skip multicast entries for fdb_dump()
Jonas Gorski
maintainerPATCH 1/1 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 inludes 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.
--- drivers/net/dsa/b53/b53_common.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/dsa/b53/b53_common.c +3 -0
@@ -2169,6 +2169,9 @@ static int b53_fdb_copy(int port, const struct b53_arl_entry *ent,if (!ent->is_valid)return 0 ; +if (is_multicast_ether_addr (ent->mac)) +return 0 ; +if (port != ent->port)return 0 ;
Signature · 1 line
2.43.0
Quoted 11 lines · Jonas Gorski
port_fdb_dump()is supposed to only add fdb entries, but we iterate over the full ARL table, which also inludes 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 1da6df85c6fb ("net: dsa: b53: Implement ARL add/del/dump operations")Signed-off-by Jonas Gorski <[email protected]>
Signature · 1 line
Florian
Andrew Lunn
maintainerQuoted 2 lines · Jonas Gorski
port_fdb_dump()is supposed to only add fdb entries, but we iterate over the full ARL table, which also inludes multicast entries.
includes.
Andrew
Paolo Abeni
maintainerQuoted 5 lines · Andrew Lunn
Quoted 2 lines · Jonas Gorski
port_fdb_dump()is supposed to only add fdb entries, but we iterate over the full ARL table, which also inludes multicast entries.includes.
Please do not resend just for the above. I'll (exceptionally) fix it while applying the patch.
Cheers,
Paolo
Jonas Gorski
maintainerQuoted 10 lines · Paolo Abeni
Quoted 5 lines · Andrew Lunn
Quoted 2 lines · Jonas Gorski
port_fdb_dump()is supposed to only add fdb entries, but we iterate over the full ARL table, which also inludes multicast entries.includes.
Please do not resend just for the above. I'll (exceptionally) fix it while applying the patch.
Thank you, I completely forgot about this over the holidays (and getting sick).
Though I also wasn't sure if a typo in the commit message warrants a new patch version; I sort of assumed this was more a "if a new version is needed, then fix this as well".
Best regards,
Jonas
This patch was applied to netdev/net.git (main) by Paolo Abeni <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Paolo Abeni <[email protected]>:
Quoted 10 lines · On Wed, 17 Dec 2025 21:57:56 +0100 you wrote:
port_fdb_dump()is supposed to only add fdb entries, but we iterate over the full ARL table, which also inludes 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.
[...]
Here is the summary with links:
- [net] net: dsa: b53: skip multicast entries for fdb_dump()
https://git.kernel.org/netdev/net/c/d42bce414d1c
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html