Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d13a2cb6 authored by David Strand's avatar David Strand Committed by David S. Miller
Browse files

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 c20811a7
Author: Jiri Pirko <jpirko@redhat.com>

    bonding: move dev_addr cpy to bond_enslave


Signed-off-by: default avatarDavid Strand <dpstrand@gmail.com>
Signed-off-by: default avatarJay Vosburgh <fubar@us.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6c08af03
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -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
	/* If this is the first slave, then we need to set the master's hardware
	 * address to be the same as the slave's. */
	 * 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,
		memcpy(bond->dev->dev_addr, slave_dev->dev_addr,
		       slave_dev->addr_len);
		       slave_dev->addr_len);