diff options
author | Benjamin Poirier <bpoirier@nvidia.com> | 2022-09-07 16:56:40 +0900 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-09-16 14:34:01 +0100 |
commit | 86247aba599e5b07d7e828e6edaaebb0ef2b1158 (patch) | |
tree | a6f1909fa739b20495fd1d74e29050217152544c /lib/mpi/mpi-sub-ui.c | |
parent | 1d9a143ee3408349700f44a9197b7ae0e4faae5d (diff) |
net: bonding: Unsync device addresses on ndo_stop
Netdev drivers are expected to call dev_{uc,mc}_sync() in their
ndo_set_rx_mode method and dev_{uc,mc}_unsync() in their ndo_stop method.
This is mentioned in the kerneldoc for those dev_* functions.
The bonding driver calls dev_{uc,mc}_unsync() during ndo_uninit instead of
ndo_stop. This is ineffective because address lists (dev->{uc,mc}) have
already been emptied in unregister_netdevice_many() before ndo_uninit is
called. This mistake can result in addresses being leftover on former bond
slaves after a bond has been deleted; see test_LAG_cleanup() in the last
patch in this series.
Add unsync calls, via bond_hw_addr_flush(), at their expected location,
bond_close().
Add dev_mc_add() call to bond_open() to match the above change.
v3:
* When adding or deleting a slave, only sync/unsync, add/del addresses if
the bond is up. In other cases, it is taken care of at the right time by
ndo_open/ndo_set_rx_mode/ndo_stop.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'lib/mpi/mpi-sub-ui.c')
0 files changed, 0 insertions, 0 deletions