netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net 0/4] bonding: fix send_peer_notif overflow
@ 2023-04-20  8:22 Hangbin Liu
  2023-04-20  8:22 ` [PATCH net 1/4] " Hangbin Liu
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Hangbin Liu @ 2023-04-20  8:22 UTC (permalink / raw)
  To: netdev
  Cc: Jay Vosburgh, David S . Miller, Jakub Kicinski, Paolo Abeni,
	Eric Dumazet, Liang Li, Vincent Bernat, Hangbin Liu

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 ]

Hangbin Liu (4):
  bonding: fix send_peer_notif overflow
  Documentation: bonding: fix the doc of peer_notif_delay
  selftests: forwarding: lib: add netns support for tc rule handle stats
    get
  kselftest: bonding: add num_grat_arp test

 Documentation/networking/bonding.rst          |  7 ++-
 include/net/bonding.h                         |  2 +-
 .../drivers/net/bonding/bond_options.sh       | 50 +++++++++++++++++++
 .../drivers/net/bonding/bond_topo_3d1c.sh     |  2 +
 tools/testing/selftests/net/forwarding/lib.sh |  3 +-
 5 files changed, 58 insertions(+), 6 deletions(-)

-- 
2.38.1


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2023-04-26 21:15 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-20  8:22 [PATCH net 0/4] bonding: fix send_peer_notif overflow Hangbin Liu
2023-04-20  8:22 ` [PATCH net 1/4] " Hangbin Liu
2023-04-20 14:34   ` kernel test robot
2023-04-20 15:59     ` Jay Vosburgh
2023-04-20 23:21       ` Jakub Kicinski
2023-04-21  3:42         ` Hangbin Liu
2023-04-21  5:13           ` Jay Vosburgh
2023-04-21  9:55             ` Hangbin Liu
2023-04-26  7:03               ` Hangbin Liu
2023-04-26 21:15                 ` Jay Vosburgh
2023-04-20  8:22 ` [PATCH net 2/4] Documentation: bonding: fix the doc of peer_notif_delay Hangbin Liu
2023-04-20 15:52   ` Jay Vosburgh
2023-04-20  8:22 ` [PATCH net 3/4] selftests: forwarding: lib: add netns support for tc rule handle stats get Hangbin Liu
2023-04-20  8:22 ` [PATCH net 4/4] kselftest: bonding: add num_grat_arp test Hangbin Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).