aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding/bond_main.c
diff options
context:
space:
mode:
authorJay Vosburgh <fubar@us.ibm.com>2013-05-31 07:57:31 -0400
committerDavid S. Miller <davem@davemloft.net>2013-06-07 18:05:51 -0400
commit1b5acd292336da029535de010af568533df9b665 (patch)
tree2586af0f49a42fe8b36398f9e46ee9435e49a4ff /drivers/net/bonding/bond_main.c
parent303d1cbf610eef31e039efc2e8da30cf94cf5ebc (diff)
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: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding/bond_main.c')
-rw-r--r--drivers/net/bonding/bond_main.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 4953f66a29a4..bc1246f6f86a 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -3780,11 +3780,10 @@ static int bond_set_mac_address(struct net_device *bond_dev, void *addr)
3780 pr_debug("bond=%p, name=%s\n", 3780 pr_debug("bond=%p, name=%s\n",
3781 bond, bond_dev ? bond_dev->name : "None"); 3781 bond, bond_dev ? bond_dev->name : "None");
3782 3782
3783 /* 3783 /* If fail_over_mac is enabled, do nothing and return success.
3784 * If fail_over_mac is set to active, do nothing and return 3784 * Returning an error causes ifenslave to fail.
3785 * success. Returning an error causes ifenslave to fail.
3786 */ 3785 */
3787 if (bond->params.fail_over_mac == BOND_FOM_ACTIVE) 3786 if (bond->params.fail_over_mac)
3788 return 0; 3787 return 0;
3789 3788
3790 if (!is_valid_ether_addr(sa->sa_data)) 3789 if (!is_valid_ether_addr(sa->sa_data))