Commit 89c76c62 authored by Stephen Hemminger's avatar Stephen Hemminger Committed by David S. Miller

bonding: use compare_ether_addr

Bonding can use compare_ether_addr() in bond_release.
Signed-off-by: default avatarStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: default avatarJay Vosburgh <fubar@us.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 278339a4
...@@ -1796,7 +1796,6 @@ int bond_release(struct net_device *bond_dev, struct net_device *slave_dev) ...@@ -1796,7 +1796,6 @@ int bond_release(struct net_device *bond_dev, struct net_device *slave_dev)
struct bonding *bond = netdev_priv(bond_dev); struct bonding *bond = netdev_priv(bond_dev);
struct slave *slave, *oldcurrent; struct slave *slave, *oldcurrent;
struct sockaddr addr; struct sockaddr addr;
int mac_addr_differ;
/* slave is not a slave or master is not master of this slave */ /* slave is not a slave or master is not master of this slave */
if (!(slave_dev->flags & IFF_SLAVE) || if (!(slave_dev->flags & IFF_SLAVE) ||
...@@ -1820,9 +1819,8 @@ int bond_release(struct net_device *bond_dev, struct net_device *slave_dev) ...@@ -1820,9 +1819,8 @@ int bond_release(struct net_device *bond_dev, struct net_device *slave_dev)
} }
if (!bond->params.fail_over_mac) { if (!bond->params.fail_over_mac) {
mac_addr_differ = memcmp(bond_dev->dev_addr, slave->perm_hwaddr, if (!compare_ether_addr(bond_dev->dev_addr, slave->perm_hwaddr)
ETH_ALEN); && bond->slave_cnt > 1)
if (!mac_addr_differ && (bond->slave_cnt > 1))
pr_warning(DRV_NAME pr_warning(DRV_NAME
": %s: Warning: the permanent HWaddr of %s - " ": %s: Warning: the permanent HWaddr of %s - "
"%pM - is still in use by %s. " "%pM - is still in use by %s. "
......
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