summaryrefslogtreecommitdiffstats
path: root/drivers/net/ifb.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2015-04-17 13:32:09 +0800
committerDavid S. Miller <davem@davemloft.net>2015-04-17 13:29:28 -0400
commitf40ae91307c275fc8b17420fa74145e9937c3c0b (patch)
tree1ddebef04f1f52779cc5352b9ed52e121b905f63 /drivers/net/ifb.c
parent521f1cf1dbb9d5ad858dca5dc75d1b45f64b6589 (diff)
downloadlinux-f40ae91307c275fc8b17420fa74145e9937c3c0b.tar.gz
linux-f40ae91307c275fc8b17420fa74145e9937c3c0b.tar.bz2
linux-f40ae91307c275fc8b17420fa74145e9937c3c0b.zip
act_mirred: Fix bogus header when redirecting from VLAN
When you redirect a VLAN device to any device, you end up with crap in af_packet on the xmit path because hard_header_len is not equal to skb->mac_len. So the redirected packet contains four extra bytes at the start which then gets interpreted as part of the MAC address. This patch fixes this by only pushing skb->mac_len. We also need to fix ifb because it tries to undo the pushing done by act_mirred. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Acked-by: Alexei Starovoitov <ast@plumgrid.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ifb.c')
-rw-r--r--drivers/net/ifb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ifb.c b/drivers/net/ifb.c
index 34f846b4bd05..94570aace241 100644
--- a/drivers/net/ifb.c
+++ b/drivers/net/ifb.c
@@ -105,7 +105,7 @@ static void ri_tasklet(unsigned long dev)
if (from & AT_EGRESS) {
dev_queue_xmit(skb);
} else if (from & AT_INGRESS) {
- skb_pull(skb, skb->dev->hard_header_len);
+ skb_pull(skb, skb->mac_len);
netif_receive_skb(skb);
} else
BUG();