Skip to content

bonding: keep non-Ethernet slaves out of 802.3ad bonds

Kyuwon Cho lkml netdev 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest1 patch 2 repliesIn review
  2. v32 patches 5 repliesSuperseded
  3. v21 patch 3 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v11 patch2 repliesSuperseded

Changes in v4 from the cover letter

- Target net-next (Nikolay).
- Merge the two patches into one (Hangbin).
- Drop the Reviewed-by tags of Eric and Hangbin, as the patch changed.
- Keep the type change veto to 802.3ad. Refusing type changes after enslave in every mode, as Nikolay noted, would only affect nested non-Ethernet setups and can be discussed separately.
v3: https://lore.kernel.org/netdev/[email protected]/
- Add a patch that refuses NETDEV_PRE_TYPE_CHANGE for 802.3ad slaves (Sashiko review).
v2: https://lore.kernel.org/netdev/[email protected]/
- Move the check above the type handling, as Jay suggested.
v1: https://lore.kernel.org/netdev/[email protected]/

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1bonding: keep non-Ethernet slaves out of 802.3ad bondsdrivers/net/bonding/bond_main.c+11 -62 replies

Reviews trailers per patch

The patch has a Reviewed-by or Acked-by.

PatchHangbin LiuNikolay Aleksandrov
1/1R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH net-next v4 0/1] bonding: keep non-Ethernet slaves out of 802.3ad bonds

bond_open() adds the 8-byte lacpdu_mcast_addr to every slave of an 802.3ad bond, so a slave whose addr_len is 16, such as an ip6tnl device, makes dev_mc_add() read past it. The patch rejects such a slave at enslave time in every case and stops a slave of an 802.3ad bond from changing its type afterwards.

The issue was found by an LLM-guided test generator that we are developing as a research prototype.

v4:
- Target net-next (Nikolay).
- Merge the two patches into one (Hangbin).
- Drop the Reviewed-by tags of Eric and Hangbin, as the patch changed.
- Keep the type change veto to 802.3ad. Refusing type changes after enslave in every mode, as Nikolay noted, would only affect nested non-Ethernet setups and can be discussed separately.
v3: https://lore.kernel.org/netdev/[email protected]/
- Add a patch that refuses NETDEV_PRE_TYPE_CHANGE for 802.3ad slaves (Sashiko review).
v2: https://lore.kernel.org/netdev/[email protected]/
- Move the check above the type handling, as Jay suggested.
v1: https://lore.kernel.org/netdev/[email protected]/

The patch was written with LLM assistance; we reviewed and tested it. With it, neither the direct nor the nested reproducer triggers the report. Enslaving Ethernet devices into an 802.3ad bond, a non-Ethernet device into an active-backup bond, and the type change of a bond enslaved to a balance-rr bond, as in bond-eth-type-change.sh, work as before.

Kyuwon Cho (1):
bonding: keep non-Ethernet slaves out of 802.3ad bonds

 drivers/net/bonding/bond_main.c | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)
Signature · 1 line
2.43.0