Patchwork bonding: check for assigned mac before adopting the slaves mac address

mail settings
Submitter David Strand
Date Dec. 1, 2010, 7:15 p.m.
Message ID <>
Download mbox | patch
Permalink /patch/73878/
State Superseded
Delegated to: David Miller
Headers show


David Strand - Dec. 1, 2010, 7:15 p.m.
Restore the check for an unassigned mac address before adopting the
first slaves as it's own. The change in behavior was introduced with
the following patch:;a=commit;h=c20811a79e671a6a1fe86a8c1afe04aca8a7f085

Signed-off-by: David Strand <>
the body of a message to
More majordomo info at


diff -uprN a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
--- a/drivers/net/bonding/bond_main.c	2010-11-24 11:36:58.125640000 -0800
+++ b/drivers/net/bonding/bond_main.c	2010-12-01 10:12:33.728640001 -0800
@@ -1576,7 +1576,7 @@  int bond_enslave(struct net_device *bond

 	/* 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,
To unsubscribe from this list: send the line "unsubscribe netdev" in