Merge branch 'bonding-overflow'
authorDavid S. Miller <davem@davemloft.net>
Wed, 10 May 2023 08:27:21 +0000 (09:27 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 10 May 2023 08:27:21 +0000 (09:27 +0100)
commita5b3363d8cec749fbdfe96bde7edbe19eeaefeb1
tree7017ce9939426947ccdc7af42b47f6298cec1722
parent7c83e28f10830aa5105c25eaabe890e3adac36aa
parent6cbe791c0f4ed7310db212791e69c7ffedd4f4b6
Merge branch 'bonding-overflow'

Hangbin Liu says:

====================
bonding: fix send_peer_notif overflow

Bonding send_peer_notif was defined as u8. But the value is
num_peer_notif multiplied by peer_notif_delay, which is u8 * u32.
This would cause the send_peer_notif overflow.

Before the fix:
TEST: num_grat_arp (active-backup miimon num_grat_arp 10)           [ OK ]
TEST: num_grat_arp (active-backup miimon num_grat_arp 20)           [ OK ]
4 garp packets sent on active slave eth1
TEST: num_grat_arp (active-backup miimon num_grat_arp 30)           [FAIL]
24 garp packets sent on active slave eth1
TEST: num_grat_arp (active-backup miimon num_grat_arp 50)           [FAIL]

After the fix:
TEST: num_grat_arp (active-backup miimon num_grat_arp 10)           [ OK ]
TEST: num_grat_arp (active-backup miimon num_grat_arp 20)           [ OK ]
TEST: num_grat_arp (active-backup miimon num_grat_arp 30)           [ OK ]
TEST: num_grat_arp (active-backup miimon num_grat_arp 50)           [ OK ]
====================

Signed-off-by: David S. Miller <davem@davemloft.net>