summaryrefslogtreecommitdiff
path: root/net/core
diff options
context:
space:
mode:
authorDaniel Borkmann <daniel@iogearbox.net>2015-10-07 10:16:09 +0200
committerDavid S. Miller <davem@davemloft.net>2015-10-08 05:03:08 -0700
commitcfc81b50387086c3a1ca6d2be3c46561edfbc3b5 (patch)
tree4990bcfc30708d064da3d3898aef295ce3041f62 /net/core
parentdfdd7230c5a2d9d675b4e7d6e111a8ead13cfb11 (diff)
bpf, skb_do_redirect: clear sender_cpu before xmit
Similar to commit c29390c6dfee ("xps: must clear sender_cpu before forwarding"), we also need to clear the skb->sender_cpu when moving from RX to TX via skb_do_redirect() due to the shared location of napi_id (used on RX) and sender_cpu (used on TX). Fixes: 27b29f63058d ("bpf: add bpf_redirect() helper") Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Alexei Starovoitov <ast@plumgrid.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/filter.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/core/filter.c b/net/core/filter.c
index da3e5357f138..8f4603c712cd 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -1462,6 +1462,7 @@ int skb_do_redirect(struct sk_buff *skb)
return dev_forward_skb(dev, skb);
skb->dev = dev;
+ skb_sender_cpu_clear(skb);
return dev_queue_xmit(skb);
}