summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorPeter Boström <peter.bostrom@netrounds.com>2014-03-10 15:17:15 (GMT)
committerJiri Slaby <jslaby@suse.cz>2014-04-18 09:07:01 (GMT)
commitbf63917ef3abee866fdc1259a9e6d83667f7360d (patch)
tree5d6d8e912cea2b827d9d43a2182979ed7d23a122 /net
parent36d8aca154bb7fe15aa62546dab3f62977a1d55b (diff)
downloadlinux-fsl-qoriq-bf63917ef3abee866fdc1259a9e6d83667f7360d.tar.xz
vlan: Set correct source MAC address with TX VLAN offload enabled
[ Upstream commit dd38743b4cc2f86be250eaf156cf113ba3dd531a ] With TX VLAN offload enabled the source MAC address for frames sent using the VLAN interface is currently set to the address of the real interface. This is wrong since the VLAN interface may be configured with a different address. The bug was introduced in commit 2205369a314e12fcec4781cc73ac9c08fc2b47de ("vlan: Fix header ops passthru when doing TX VLAN offload."). This patch sets the source address before calling the create function of the real interface. Signed-off-by: Peter Boström <peter.bostrom@netrounds.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'net')
-rw-r--r--net/8021q/vlan_dev.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index edf44d0..dc7d8da 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -557,6 +557,9 @@ static int vlan_passthru_hard_header(struct sk_buff *skb, struct net_device *dev
struct vlan_dev_priv *vlan = vlan_dev_priv(dev);
struct net_device *real_dev = vlan->real_dev;
+ if (saddr == NULL)
+ saddr = dev->dev_addr;
+
return dev_hard_header(skb, real_dev, type, daddr, saddr, len);
}