bonding: fail_over_mac should only affect AB mode in bond_set_mac_address()
authordingtianhong <dingtianhong@huawei.com>
Sat, 25 Jan 2014 05:00:57 +0000 (13:00 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 5 Feb 2014 03:47:27 +0000 (19:47 -0800)
commitcc689aaa7abf33b2ccb02482e5e17885ea8903d1
tree57e07faeb8def276e9cb83446758ed1043d093d4
parent00503b6f702eaf23e7257d6287da72805d7d014c
bonding: fail_over_mac should only affect AB mode in bond_set_mac_address()

The fail_over_mac could be set to active or follow in any time for all modes,
so if the fail_over_mac is not none and the current mode is not active-backup,
the bond_set_mac_address() could not change the master and slave's MAC address.

In bond_set_mac_address(), the fail_over_mac should only affect AB mode, so modify
to check the mode in addition to fail_over_mac when setting bond's MAC address.

Cc: Jay Vosburgh <fubar@us.ibm.com>
Cc: Veaceslav Falico <vfalico@redhat.com>
Cc: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bond_main.c