netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] bonding: check for assigned mac before adopting the slaves mac address
@ 2010-11-24 23:12 David Strand
  2010-11-24 23:33 ` Jay Vosburgh
  0 siblings, 1 reply; 10+ messages in thread
From: David Strand @ 2010-11-24 23:12 UTC (permalink / raw)
  To: netdev; +Cc: Jay Vosburgh, linux-kernel

Restore the check for a missing mac address before adopting the first
slaves as it's own. This regression was introduced in:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.36.y.git;a=commit;h=c20811a79e671a6a1fe86a8c1afe04aca8a7f085

Signed-off-by: David Strand dpstrand@gmail.com
---
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-11-24 11:40:58.175640000 -0800
@@ -1577,8 +1577,9 @@ 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)
-		memcpy(bond->dev->dev_addr, slave_dev->dev_addr,
-		       slave_dev->addr_len);
+		if (is_zero_ether_addr(bond->dev->dev_addr))
+			memcpy(bond->dev->dev_addr, slave_dev->dev_addr,
+			       slave_dev->addr_len);


 	new_slave = kzalloc(sizeof(struct slave), GFP_KERNEL);

^ permalink raw reply	[flat|nested] 10+ messages in thread
* [PATCH] bonding: check for assigned mac before adopting the slaves mac address
@ 2010-12-01 19:15 David Strand
  2010-12-01 19:21 ` Jay Vosburgh
  0 siblings, 1 reply; 10+ messages in thread
From: David Strand @ 2010-12-01 19:15 UTC (permalink / raw)
  To: netdev; +Cc: Jay Vosburgh, linux-kernel

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:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.36.y.git;a=commit;h=c20811a79e671a6a1fe86a8c1afe04aca8a7f085

Signed-off-by: David Strand <dpstrand@gmail.com>
---
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,
 		       slave_dev->addr_len);

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-12-01 19:42 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-24 23:12 [PATCH] bonding: check for assigned mac before adopting the slaves mac address David Strand
2010-11-24 23:33 ` Jay Vosburgh
2010-11-25  0:44   ` Laurent Chavey
2010-11-25  1:45   ` David Strand
2010-11-26  3:26     ` Jay Vosburgh
2010-12-01 18:25       ` David Strand
2010-12-01 18:45         ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2010-12-01 19:15 David Strand
2010-12-01 19:21 ` Jay Vosburgh
2010-12-01 19:43   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).