diff options
author | Michal Kubeček <mkubecek@suse.cz> | 2012-11-21 21:48:39 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-11-28 11:28:45 -0500 |
commit | 4e591b93d5edb3c126a7257c6e29d978a82656d9 (patch) | |
tree | 41cc2640c7b40d59606139015d0859a4b5d6b712 /drivers/net | |
parent | 462dbc9101acd38e92eda93c0726857517a24bbd (diff) |
bonding: in balance-rr mode, set curr_active_slave only if it is up
If all slaves of a balance-rr bond with ARP monitor are enslaved
with down link state, bond keeps down state even after slaves
go up.
This is caused by bond_enslave() setting curr_active_slave to
first slave not taking into account its link state. As
bond_loadbalance_arp_mon() uses curr_active_slave to identify
whether slave's down->up transition should update bond's link
state, bond stays down even if slaves are up (until first slave
goes from up to down at least once).
Before commit f31c7937 "bonding: start slaves with link down for
ARP monitor", this was masked by slaves always starting in UP
state with ARP monitor (and MII monitor not relying on
curr_active_slave being NULL if there is no slave up).
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/bonding/bond_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 5f5b69f37d2..c8bff3e83a5 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -1838,7 +1838,7 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev) | |||
1838 | * anyway (it holds no special properties of the bond device), | 1838 | * anyway (it holds no special properties of the bond device), |
1839 | * so we can change it without calling change_active_interface() | 1839 | * so we can change it without calling change_active_interface() |
1840 | */ | 1840 | */ |
1841 | if (!bond->curr_active_slave) | 1841 | if (!bond->curr_active_slave && new_slave->link == BOND_LINK_UP) |
1842 | bond->curr_active_slave = new_slave; | 1842 | bond->curr_active_slave = new_slave; |
1843 | 1843 | ||
1844 | break; | 1844 | break; |