Skip to content

bonding: fix send_peer_notif overflow

Hangbin Liu netdev 3 versions – Applied

Status from this message: This series was applied to netdev/net.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest4 patches 0 repliesApplied 4/4
  2. v24 patches 3 repliesSuperseded
  3. v14 patches 8 repliesSuperseded

Patches in v3 All 4 applied

#Subject and filesSizeRepliesApplied
1/4bonding: fix send_peer_notif overflowdrivers/net/bonding/bond_netlink.c drivers/net/bonding/bond_options.c include/net/bonding.h+14 -30 repliesApplied
2/4Documentation: bonding: fix the doc of peer_notif_delayDocumentation/networking/bonding.rst+5 -40 repliesApplied
3/4selftests: forwarding: lib: add netns support for tc rule handle stats gettools/testing/selftests/net/forwarding/lib.sh+2 -10 repliesApplied
4/4kselftest: bonding: add num_grat_arp testtools/testing/selftests/drivers/net/bonding/bond_options.sh tools/testing/selftests/drivers/net/bonding/bond_topo_3d1c.sh+52 -00 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCHv3 net 0/4] 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 ]

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          |  9 ++--
 drivers/net/bonding/bond_netlink.c            |  7 ++-
 drivers/net/bonding/bond_options.c            |  8 ++-
 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 +-
 7 files changed, 73 insertions(+), 8 deletions(-)
Signature · 1 line
2.38.1