summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Strand <dpstrand@gmail.com>2010-12-01 11:43:08 -0800
committerDavid S. Miller <davem@davemloft.net>2010-12-01 11:43:08 -0800
commitd13a2cb63d06fe2e3067c7d40f9a5946abd614c8 (patch)
tree02c1a03ebd493b1dde6ace6f2ee88bb60866e741
parent6c08af030212d1a34593397bb01f262ff31c3629 (diff)
bonding: check for assigned mac before adopting the slaves mac address
Restore the check for an unassigned mac address before adopting the first slaves as it's own. The change in behavior was introduced by: commit c20811a79e671a6a1fe86a8c1afe04aca8a7f085 Author: Jiri Pirko <jpirko@redhat.com> bonding: move dev_addr cpy to bond_enslave Signed-off-by: David Strand <dpstrand@gmail.com> Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/bonding/bond_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 71a169740d05..2fee00a4c9ef 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1576,7 +1576,7 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
/* If this is the first slave, then we need to set the master's hardware
* address to be the same as the slave's. */
- if (bond->slave_cnt == 0)
+ if (is_zero_ether_addr(bond->dev->dev_addr))
memcpy(bond->dev->dev_addr, slave_dev->dev_addr,
slave_dev->addr_len);