diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2015-04-17 07:32:09 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-04-17 19:29:28 +0200 |
commit | f40ae91307c275fc8b17420fa74145e9937c3c0b (patch) | |
tree | 1ddebef04f1f52779cc5352b9ed52e121b905f63 /net/sched/act_mirred.c | |
parent | inet_diag: fix access to tcp cc information (diff) | |
download | linux-f40ae91307c275fc8b17420fa74145e9937c3c0b.tar.xz 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 'net/sched/act_mirred.c')
-rw-r--r-- | net/sched/act_mirred.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sched/act_mirred.c b/net/sched/act_mirred.c index 5953517ec059..3f63ceac8e01 100644 --- a/net/sched/act_mirred.c +++ b/net/sched/act_mirred.c @@ -157,7 +157,7 @@ static int tcf_mirred(struct sk_buff *skb, const struct tc_action *a, if (!(at & AT_EGRESS)) { if (m->tcfm_ok_push) - skb_push(skb2, skb2->dev->hard_header_len); + skb_push(skb2, skb->mac_len); } /* mirror is always swallowed */ |