bpf: clear sender_cpu before xmit
authorAlexei Starovoitov <ast@plumgrid.com>
Wed, 7 Oct 2015 03:46:07 +0000 (20:46 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 8 Oct 2015 12:02:08 +0000 (05:02 -0700)
Similar to commit c29390c6dfee ("xps: must clear sender_cpu before forwarding")
the skb->sender_cpu needs to be cleared before xmit.

Fixes: 3896d655f4d4 ("bpf: introduce bpf_clone_redirect() helper")
Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/filter.c

index 87b78ef0c3d43a55239368a2c1a20e91d74d97eb..bb18c368000129ebea752a0a78785524848eaab8 100644 (file)
@@ -1415,6 +1415,7 @@ static u64 bpf_clone_redirect(u64 r1, u64 ifindex, u64 flags, u64 r4, u64 r5)
                return dev_forward_skb(dev, skb2);
 
        skb2->dev = dev;
+       skb_sender_cpu_clear(skb2);
        return dev_queue_xmit(skb2);
 }