Skip to content

Commit 02c652f

Browse files
vladimirolteandavem330
authored andcommitted
net: dsa: sja1105: hide all multicast addresses from "bridge fdb show"
Commit 4d94235 ("net: dsa: sja1105: offload bridge port flags to device") has partially hidden some multicast entries from showing up in the "bridge fdb show" output, but it wasn't enough. Addresses which are added through "bridge mdb add" still show up. Hide them all. Fixes: 291d1e7 ("net: dsa: sja1105: Add support for FDB and MDB management") Signed-off-by: Vladimir Oltean <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 32530db commit 02c652f

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

drivers/net/dsa/sja1105/sja1105_main.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1868,13 +1868,14 @@ static int sja1105_fdb_dump(struct dsa_switch *ds, int port,
18681868
if (!(l2_lookup.destports & BIT(port)))
18691869
continue;
18701870

1871-
/* We need to hide the FDB entry for unknown multicast */
1872-
if (l2_lookup.macaddr == SJA1105_UNKNOWN_MULTICAST &&
1873-
l2_lookup.mask_macaddr == SJA1105_UNKNOWN_MULTICAST)
1874-
continue;
1875-
18761871
u64_to_ether_addr(l2_lookup.macaddr, macaddr);
18771872

1873+
/* Hardware FDB is shared for fdb and mdb, "bridge fdb show"
1874+
* only wants to see unicast
1875+
*/
1876+
if (is_multicast_ether_addr(macaddr))
1877+
continue;
1878+
18781879
/* We need to hide the dsa_8021q VLANs from the user. */
18791880
if (vid_is_dsa_8021q(l2_lookup.vlanid))
18801881
l2_lookup.vlanid = 0;

0 commit comments

Comments
 (0)