Skip to content

Commit

Permalink
bonding: use is_zero_ether_addr
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Jun 14, 2009
1 parent 373500d commit 5c5129b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/bonding/bond_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include <linux/ctype.h>
#include <linux/inet.h>
#include <linux/rtnetlink.h>
#include <linux/etherdevice.h>
#include <net/net_namespace.h>

#include "bonding.h"
Expand Down Expand Up @@ -275,10 +276,9 @@ static ssize_t bonding_store_slaves(struct device *d,
/* If this is the first slave, then we need to set
the master's hardware address to be the same as the
slave's. */
if (!(*((u32 *) & (bond->dev->dev_addr[0])))) {
if (is_zero_ether_addr(bond->dev->dev_addr))
memcpy(bond->dev->dev_addr, dev->dev_addr,
dev->addr_len);
}

/* Set the slave's MTU to match the bond */
original_mtu = dev->mtu;
Expand Down

0 comments on commit 5c5129b

Please sign in to comment.