提交 7812163c 编写于 作者: J Jay Vosburgh 提交者: Yongqiang Liu

bonding: ARP monitor spams NETDEV_NOTIFY_PEERS notifiers

stable inclusion
from stable-4.19.250
commit 508abc463836251de033bc2310b65412d2540170
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5I4FP
CVE: NA

--------------------------------

[ Upstream commit 7a9214f3 ]

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: NJonathan Toppins <jtoppins@redhat.com>
Signed-off-by: NJay Vosburgh <jay.vosburgh@canonical.com>
Fixes: b0929915 ("bonding: Fix RTNL: assertion failed at net/core/rtnetlink.c for ab arp monitor")
Link: https://lore.kernel.org/netdev/b2fd4147-8f50-bebd-963a-1a3e8d1d9715@redhat.com/Tested-by: NJonathan Toppins <jtoppins@redhat.com>
Reviewed-by: NJonathan Toppins <jtoppins@redhat.com>
Link: https://lore.kernel.org/r/9400.1655407960@famineSigned-off-by: NJakub Kicinski <kuba@kernel.org>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NYongqiang Liu <liuyongqiang13@huawei.com>
上级 fe95c98a
...@@ -3081,9 +3081,11 @@ static void bond_activebackup_arp_mon(struct bonding *bond) ...@@ -3081,9 +3081,11 @@ static void bond_activebackup_arp_mon(struct bonding *bond)
if (!rtnl_trylock()) if (!rtnl_trylock())
return; return;
if (should_notify_peers) if (should_notify_peers) {
bond->send_peer_notif--;
call_netdevice_notifiers(NETDEV_NOTIFY_PEERS, call_netdevice_notifiers(NETDEV_NOTIFY_PEERS,
bond->dev); bond->dev);
}
if (should_notify_rtnl) { if (should_notify_rtnl) {
bond_slave_state_notify(bond); bond_slave_state_notify(bond);
bond_slave_link_notify(bond); bond_slave_link_notify(bond);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册