Bond device gets it's mac address from the first slave device, it's not necessary to set slave device's mac address to bond if equal.
Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com> --- drivers/net/bonding/bond_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 97fad05..6569219 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -1473,8 +1473,9 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev) */ ether_addr_copy(new_slave->perm_hwaddr, slave_dev->dev_addr); - if (!bond->params.fail_over_mac || - BOND_MODE(bond) != BOND_MODE_ACTIVEBACKUP) { + if ((!bond->params.fail_over_mac || + BOND_MODE(bond) != BOND_MODE_ACTIVEBACKUP) && + !ether_addr_equal_64bits(bond_dev->dev_addr, slave_dev->dev_addr)) { /* Set slave to master's mac address. The application already * set the master's mac address to that of the first slave */ -- 1.8.3.1