* [patch net] bond: check if slave count is 0 in case when deciding to take slave's mac
@ 2013-02-26 8:26 Jiri Pirko
2013-02-26 22:32 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Jiri Pirko @ 2013-02-26 8:26 UTC (permalink / raw)
To: netdev; +Cc: davem, fubar, andy, gregory.v.rose
in bond_enslave(), check slave_cnt before actually using slave address.
introduced by:
commit 409cc1f8a41 (bond: have random dev address by default instead of zeroes)
Reported-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
---
drivers/net/bonding/bond_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 11d01d6..7bd068a 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1629,7 +1629,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->dev_addr_from_first)
+ if (bond->slave_cnt == 0 && bond->dev_addr_from_first)
bond_set_dev_addr(bond->dev, slave_dev);
new_slave = kzalloc(sizeof(struct slave), GFP_KERNEL);
--
1.8.1.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch net] bond: check if slave count is 0 in case when deciding to take slave's mac
2013-02-26 8:26 [patch net] bond: check if slave count is 0 in case when deciding to take slave's mac Jiri Pirko
@ 2013-02-26 22:32 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-02-26 22:32 UTC (permalink / raw)
To: jiri; +Cc: netdev, fubar, andy, gregory.v.rose
From: Jiri Pirko <jiri@resnulli.us>
Date: Tue, 26 Feb 2013 09:26:15 +0100
> in bond_enslave(), check slave_cnt before actually using slave address.
>
> introduced by:
> commit 409cc1f8a41 (bond: have random dev address by default instead of zeroes)
>
> Reported-by: Greg Rose <gregory.v.rose@intel.com>
> Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Applied, thanks Jiri.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-02-26 22:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-26 8:26 [patch net] bond: check if slave count is 0 in case when deciding to take slave's mac Jiri Pirko
2013-02-26 22:32 ` 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).