Skip to content

Commit f851a72

Browse files
vladimirolteandavem330
authored andcommitted
net: bridge: allow br_fdb_replay to be called for the bridge device
When a port joins a bridge which already has local FDB entries pointing to the bridge device itself, we would like to offload those, so allow the "dev" argument to be equal to the bridge too. The code already does what we need in that case. Signed-off-by: Vladimir Oltean <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 6eb38bf commit f851a72

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

net/bridge/br_fdb.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,10 @@ int br_fdb_replay(const struct net_device *br_dev, const struct net_device *dev,
760760
unsigned long action;
761761
int err = 0;
762762

763-
if (!netif_is_bridge_master(br_dev) || !netif_is_bridge_port(dev))
763+
if (!netif_is_bridge_master(br_dev))
764+
return -EINVAL;
765+
766+
if (!netif_is_bridge_port(dev) && !netif_is_bridge_master(dev))
764767
return -EINVAL;
765768

766769
br = netdev_priv(br_dev);

0 commit comments

Comments
 (0)