Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

bonding: report duplicate MAC address in all situations

Normally, a bond uses the MAC address of the first added slave as the bond’s
MAC address. And the bond will set active slave’s MAC address to bond’s
address if fail_over_mac is set to none (0) or follow (2).

When the first slave is removed, the bond will still use the removed slave’s
MAC address, which can lead to a duplicate MAC address and potentially cause
issues with the switch. To avoid confusion, let's warn the user in all
situations, including when fail_over_mac is set to 2 or not in active-backup
mode.

Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org>
Link: https://patch.msgid.link/20250225033914.18617-1-liuhangbin@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Hangbin Liu and committed by
Jakub Kicinski
28d68d39 e6116fc6

+1 -1
+1 -1
drivers/net/bonding/bond_main.c
··· 2548 2548 2549 2549 RCU_INIT_POINTER(bond->current_arp_slave, NULL); 2550 2550 2551 - if (!all && (!bond->params.fail_over_mac || 2551 + if (!all && (bond->params.fail_over_mac != BOND_FOM_ACTIVE || 2552 2552 BOND_MODE(bond) != BOND_MODE_ACTIVEBACKUP)) { 2553 2553 if (ether_addr_equal_64bits(bond_dev->dev_addr, slave->perm_hwaddr) && 2554 2554 bond_has_slaves(bond))