diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2009-06-12 15:02:51 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-06-14 02:29:03 -0400 |
commit | 5c5129b54f2f346c86cd23fea67e71b45f7f84ff (patch) | |
tree | 2917749b65942edababa110625ccbb9f7c3d3d06 /drivers/net/bonding | |
parent | 373500db927706d1f60785aff40b9884f789b01a (diff) |
bonding: use is_zero_ether_addr
Remove bogus non-portable possibly unaligned way of testing
for zero addres..
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding')
-rw-r--r-- | drivers/net/bonding/bond_sysfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c index 395f3b160a75..55bf34f59bbf 100644 --- a/drivers/net/bonding/bond_sysfs.c +++ b/drivers/net/bonding/bond_sysfs.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/ctype.h> | 33 | #include <linux/ctype.h> |
34 | #include <linux/inet.h> | 34 | #include <linux/inet.h> |
35 | #include <linux/rtnetlink.h> | 35 | #include <linux/rtnetlink.h> |
36 | #include <linux/etherdevice.h> | ||
36 | #include <net/net_namespace.h> | 37 | #include <net/net_namespace.h> |
37 | 38 | ||
38 | #include "bonding.h" | 39 | #include "bonding.h" |
@@ -275,10 +276,9 @@ static ssize_t bonding_store_slaves(struct device *d, | |||
275 | /* If this is the first slave, then we need to set | 276 | /* If this is the first slave, then we need to set |
276 | the master's hardware address to be the same as the | 277 | the master's hardware address to be the same as the |
277 | slave's. */ | 278 | slave's. */ |
278 | if (!(*((u32 *) & (bond->dev->dev_addr[0])))) { | 279 | if (is_zero_ether_addr(bond->dev->dev_addr)) |
279 | memcpy(bond->dev->dev_addr, dev->dev_addr, | 280 | memcpy(bond->dev->dev_addr, dev->dev_addr, |
280 | dev->addr_len); | 281 | dev->addr_len); |
281 | } | ||
282 | 282 | ||
283 | /* Set the slave's MTU to match the bond */ | 283 | /* Set the slave's MTU to match the bond */ |
284 | original_mtu = dev->mtu; | 284 | original_mtu = dev->mtu; |