summaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding/bond_main.c
diff options
context:
space:
mode:
authordingtianhong2014-01-02 02:13:16 +0100
committerDavid S. Miller2014-01-02 04:58:55 +0100
commit844223abe9f88b0e0cb7fb1f1f8ab04fe29806bc (patch)
tree5cbed9d0fed1bc85da1918eeca02cdf54c45a371 /drivers/net/bonding/bond_main.c
parentbonding: remove the return value for bond_3ad_bind_slave() (diff)
downloadkernel-qcow2-linux-844223abe9f88b0e0cb7fb1f1f8ab04fe29806bc.tar.gz
kernel-qcow2-linux-844223abe9f88b0e0cb7fb1f1f8ab04fe29806bc.tar.xz
kernel-qcow2-linux-844223abe9f88b0e0cb7fb1f1f8ab04fe29806bc.zip
bonding: use ether_addr_equal_64bits to instead of ether_addr_equal
The net_device.dev_addr have more than 2 bytes of additional data after the mac addr, so it is safe to use the ether_addr_equal_64bits(). Signed-off-by: Ding Tianhong <dingtianhong@huawei.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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index f8ed3bbd39a0..69525942658d 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1637,7 +1637,7 @@ err_free:
err_undo_flags:
/* Enslave of first slave has failed and we need to fix master's mac */
if (!bond_has_slaves(bond) &&
- ether_addr_equal(bond_dev->dev_addr, slave_dev->dev_addr))
+ ether_addr_equal_64bits(bond_dev->dev_addr, slave_dev->dev_addr))
eth_hw_addr_random(bond_dev);
return res;
@@ -1710,7 +1710,7 @@ static int __bond_release_one(struct net_device *bond_dev,
bond->current_arp_slave = NULL;
if (!all && !bond->params.fail_over_mac) {
- if (ether_addr_equal(bond_dev->dev_addr, slave->perm_hwaddr) &&
+ if (ether_addr_equal_64bits(bond_dev->dev_addr, slave->perm_hwaddr) &&
bond_has_slaves(bond))
pr_warn("%s: Warning: the permanent HWaddr of %s - %pM - is still in use by %s. Set the HWaddr of %s to a different address to avoid conflicts.\n",
bond_dev->name, slave_dev->name,