Skip to content

Commit dd38743

Browse files
Peter Boströmdavem330
authored andcommitted
vlan: Set correct source MAC address with TX VLAN offload enabled
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 2205369 ("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>
1 parent 5bd0767 commit dd38743

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

net/8021q/vlan_dev.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,9 @@ static int vlan_passthru_hard_header(struct sk_buff *skb, struct net_device *dev
538538
struct vlan_dev_priv *vlan = vlan_dev_priv(dev);
539539
struct net_device *real_dev = vlan->real_dev;
540540

541+
if (saddr == NULL)
542+
saddr = dev->dev_addr;
543+
541544
return dev_hard_header(skb, real_dev, type, daddr, saddr, len);
542545
}
543546

0 commit comments

Comments
 (0)