summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorPeter Boström <peter.bostrom@netrounds.com>2014-03-10 16:17:15 +0100
committerBen Hutchings <ben@decadent.org.uk>2014-04-30 16:23:16 +0100
commitc99f58d722f7566041f88cea72c78785e717ce72 (patch)
tree1bf95ed1232b2df3ac59add028f77d894e8e29ee /net
parente7177969baa17560848666cb547b6c05ca86297a (diff)
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: Ben Hutchings <ben@decadent.org.uk>
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 48a62d89f8ae..c43a788b11df 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -529,6 +529,9 @@ static int vlan_passthru_hard_header(struct sk_buff *skb, struct net_device *dev
{
struct net_device *real_dev = vlan_dev_info(dev)->real_dev;
+ if (saddr == NULL)
+ saddr = dev->dev_addr;
+
return dev_hard_header(skb, real_dev, type, daddr, saddr, len);
}