act_mirred: Fix bogus header when redirecting from VLAN
authorHerbert Xu <herbert@gondor.apana.org.au>
Fri, 17 Apr 2015 05:32:09 +0000 (13:32 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 17 Apr 2015 17:29:28 +0000 (13:29 -0400)
commitf40ae91307c275fc8b17420fa74145e9937c3c0b
tree1ddebef04f1f52779cc5352b9ed52e121b905f63
parent521f1cf1dbb9d5ad858dca5dc75d1b45f64b6589
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>
drivers/net/ifb.c
net/sched/act_mirred.c