summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMahesh Bandewar <maheshb@google.com>2019-12-06 15:44:55 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-04 19:13:23 +0100
commit74c4ed6c9cd4b6ff96ee989f6df60979e1794155 (patch)
tree089c46179ef3ed2127d62c1d8adb30784fdb6d5f
parent5c8e29603b8bc3dc8791bc76a2a18459893c586f (diff)
downloadlinux-stable-74c4ed6c9cd4b6ff96ee989f6df60979e1794155.tar.gz
linux-stable-74c4ed6c9cd4b6ff96ee989f6df60979e1794155.tar.bz2
linux-stable-74c4ed6c9cd4b6ff96ee989f6df60979e1794155.zip
bonding: fix active-backup transition after link failure
[ Upstream commit 5d485ed88d48f8101a2067348e267c0aaf4ed486 ] After the recent fix in commit 1899bb325149 ("bonding: fix state transition issue in link monitoring"), the active-backup mode with miimon initially come-up fine but after a link-failure, both members transition into backup state. Following steps to reproduce the scenario (eth1 and eth2 are the slaves of the bond): ip link set eth1 up ip link set eth2 down sleep 1 ip link set eth2 up ip link set eth1 down cat /sys/class/net/eth1/bonding_slave/state cat /sys/class/net/eth2/bonding_slave/state Fixes: 1899bb325149 ("bonding: fix state transition issue in link monitoring") CC: Jay Vosburgh <jay.vosburgh@canonical.com> Signed-off-by: Mahesh Bandewar <maheshb@google.com> Acked-by: Jay Vosburgh <jay.vosburgh@canonical.com> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/net/bonding/bond_main.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 9b8143dca512..f57b86f1373d 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -2223,9 +2223,6 @@ static void bond_miimon_commit(struct bonding *bond)
} else if (BOND_MODE(bond) != BOND_MODE_ACTIVEBACKUP) {
/* make it immediately active */
bond_set_active_slave(slave);
- } else if (slave != primary) {
- /* prevent it from being the active one */
- bond_set_backup_slave(slave);
}
netdev_info(bond->dev, "link status definitely up for interface %s, %u Mbps %s duplex\n",