aboutsummaryrefslogtreecommitdiffstats
path: root/net/8021q/vlan_dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/8021q/vlan_dev.c')
-rw-r--r--net/8021q/vlan_dev.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index 47c908f1f626..4b65aa492fb6 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -61,7 +61,7 @@ static int vlan_dev_rebuild_header(struct sk_buff *skb)
61 pr_debug("%s: unable to resolve type %X addresses\n", 61 pr_debug("%s: unable to resolve type %X addresses\n",
62 dev->name, ntohs(veth->h_vlan_encapsulated_proto)); 62 dev->name, ntohs(veth->h_vlan_encapsulated_proto));
63 63
64 memcpy(veth->h_source, dev->dev_addr, ETH_ALEN); 64 ether_addr_copy(veth->h_source, dev->dev_addr);
65 break; 65 break;
66 } 66 }
67 67
@@ -303,7 +303,7 @@ static int vlan_dev_open(struct net_device *dev)
303 goto clear_allmulti; 303 goto clear_allmulti;
304 } 304 }
305 305
306 memcpy(vlan->real_dev_addr, real_dev->dev_addr, ETH_ALEN); 306 ether_addr_copy(vlan->real_dev_addr, real_dev->dev_addr);
307 307
308 if (vlan->flags & VLAN_FLAG_GVRP) 308 if (vlan->flags & VLAN_FLAG_GVRP)
309 vlan_gvrp_request_join(dev); 309 vlan_gvrp_request_join(dev);
@@ -367,7 +367,7 @@ static int vlan_dev_set_mac_address(struct net_device *dev, void *p)
367 dev_uc_del(real_dev, dev->dev_addr); 367 dev_uc_del(real_dev, dev->dev_addr);
368 368
369out: 369out:
370 memcpy(dev->dev_addr, addr->sa_data, ETH_ALEN); 370 ether_addr_copy(dev->dev_addr, addr->sa_data);
371 return 0; 371 return 0;
372} 372}
373 373
@@ -538,6 +538,9 @@ static int vlan_passthru_hard_header(struct sk_buff *skb, struct net_device *dev
538 struct vlan_dev_priv *vlan = vlan_dev_priv(dev); 538 struct vlan_dev_priv *vlan = vlan_dev_priv(dev);
539 struct net_device *real_dev = vlan->real_dev; 539 struct net_device *real_dev = vlan->real_dev;
540 540
541 if (saddr == NULL)
542 saddr = dev->dev_addr;
543
541 return dev_hard_header(skb, real_dev, type, daddr, saddr, len); 544 return dev_hard_header(skb, real_dev, type, daddr, saddr, len);
542} 545}
543 546