diff options
author | Joe Perches <joe@perches.com> | 2014-02-23 00:05:25 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-02-24 19:16:43 -0500 |
commit | e5a727f6632654098fa4e87d8551a5873e8f658a (patch) | |
tree | 1857fd4823e2f393b400550039018563bf7f9591 /net/bridge/br_multicast.c | |
parent | e8b39015b591f359d464d026170dcf76f7ed5b8e (diff) | |
download | op-kernel-dev-e5a727f6632654098fa4e87d8551a5873e8f658a.zip op-kernel-dev-e5a727f6632654098fa4e87d8551a5873e8f658a.tar.gz |
bridge: Use ether_addr_copy and ETH_ALEN
Convert the more obvious uses of memcpy to ether_addr_copy.
There are still uses of memcpy that could be converted but
these addresses are __aligned(2).
Convert a couple uses of 6 in gr_private.h to ETH_ALEN.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_multicast.c')
-rw-r--r-- | net/bridge/br_multicast.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c index ef66365..c97c3c8 100644 --- a/net/bridge/br_multicast.c +++ b/net/bridge/br_multicast.c @@ -363,7 +363,7 @@ static struct sk_buff *br_ip4_multicast_alloc_query(struct net_bridge *br, skb_reset_mac_header(skb); eth = eth_hdr(skb); - memcpy(eth->h_source, br->dev->dev_addr, ETH_ALEN); + ether_addr_copy(eth->h_source, br->dev->dev_addr); eth->h_dest[0] = 1; eth->h_dest[1] = 0; eth->h_dest[2] = 0x5e; @@ -433,7 +433,7 @@ static struct sk_buff *br_ip6_multicast_alloc_query(struct net_bridge *br, skb_reset_mac_header(skb); eth = eth_hdr(skb); - memcpy(eth->h_source, br->dev->dev_addr, ETH_ALEN); + ether_addr_copy(eth->h_source, br->dev->dev_addr); eth->h_proto = htons(ETH_P_IPV6); skb_put(skb, sizeof(*eth)); |