net: switchdev: recurse into __switchdev_handle_fdb_del_to_device
authorVladimir Oltean <vladimir.oltean@nxp.com>
Tue, 20 Jul 2021 17:35:57 +0000 (20:35 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 21 Jul 2021 15:00:16 +0000 (08:00 -0700)
commit71f4f89a0324459f81656f3f9b20c1c0becaf647
treed7d7d6375ab68ba86f935309c66111260c8a8561
parent94111dfc18b8b8cb3c72006e0e7b31c038709ab4
net: switchdev: recurse into __switchdev_handle_fdb_del_to_device

The difference between __switchdev_handle_fdb_del_to_device and
switchdev_handle_del_to_device is that the former takes an extra
orig_dev argument, while the latter starts with dev == orig_dev.

We should recurse into the variant that does not lose the orig_dev along
the way. This is relevant when deleting FDB entries pointing towards a
bridge (dev changes to the lower interfaces, but orig_dev shouldn't).

The addition helper already recurses properly, just the deletion one
doesn't.

Fixes: 8ca07176ab00 ("net: switchdev: introduce a fanout helper for SWITCHDEV_FDB_{ADD,DEL}_TO_DEVICE")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/switchdev/switchdev.c