bonding: ARP monitor spams NETDEV_NOTIFY_PEERS notifiers

[ Upstream commit 7a9214f3d88cfdb099f3896e102a306b316d8707 ]

The bonding ARP monitor fails to decrement send_peer_notif, the
number of peer notifications (gratuitous ARP or ND) to be sent. This
results in a continuous series of notifications.

Correct this by decrementing the counter for each notification.

Reported-by: Jonathan Toppins <[email protected]>
Signed-off-by: Jay Vosburgh <[email protected]>
Fixes: b0929915e0 ("bonding: Fix RTNL: assertion failed at net/core/rtnetlink.c for ab arp monitor")
Link: https://lore.kernel.org/netdev/[email protected]/
Tested-by: Jonathan Toppins <[email protected]>
Reviewed-by: Jonathan Toppins <[email protected]>
Link: https://lore.kernel.org/r/9400.1655407960@famine
Signed-off-by: Jakub Kicinski <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
This commit is contained in:
Jay Vosburgh 2022-06-16 12:32:40 -07:00 • committed by Greg Kroah-Hartman
commit 47d31b97bf

View file

@ -3071,9 +3071,11 @@ re_arm:
if (!rtnl_trylock())
return;
if (should_notify_peers)
if (should_notify_peers) {
bond->send_peer_notif--;
call_netdevice_notifiers(NETDEV_NOTIFY_PEERS,
bond->dev);
}
if (should_notify_rtnl) {
bond_slave_state_notify(bond);
bond_slave_link_notify(bond);