Commit 1b5acd29 authored by Jay Vosburgh's avatar Jay Vosburgh Committed by David S. Miller

bonding: disallow change of MAC if fail_over_mac enabled

Currently, if fail_over_mac is set to active, then attempts to
change the MAC of the bond itself silently fail.  However, if fail_over_mac
is set to follow, changes are permitted.

	Permitting the bond's MAC to change with fail_over_mac=follow
will disrupt the follow functionality, which normally controls the
assignment of MAC address to the bond and its slaves, and can cause
multiple ports to be assigned the same MAC address. which will interfere
with the functioning of the device (where the device here is a
virtualization-aware card for s390, qeth).
Signed-off-by: default avatarJay Vosburgh <fubar@us.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 303d1cbf
...@@ -3780,11 +3780,10 @@ static int bond_set_mac_address(struct net_device *bond_dev, void *addr) ...@@ -3780,11 +3780,10 @@ static int bond_set_mac_address(struct net_device *bond_dev, void *addr)
pr_debug("bond=%p, name=%s\n", pr_debug("bond=%p, name=%s\n",
bond, bond_dev ? bond_dev->name : "None"); bond, bond_dev ? bond_dev->name : "None");
/* /* If fail_over_mac is enabled, do nothing and return success.
* If fail_over_mac is set to active, do nothing and return * Returning an error causes ifenslave to fail.
* success. Returning an error causes ifenslave to fail.
*/ */
if (bond->params.fail_over_mac == BOND_FOM_ACTIVE) if (bond->params.fail_over_mac)
return 0; return 0;
if (!is_valid_ether_addr(sa->sa_data)) if (!is_valid_ether_addr(sa->sa_data))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment