mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-05 01:32:47 -04:00
bpf, skb_do_redirect: clear sender_cpu before xmit
Similar to commitc29390c6df("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:27b29f6305("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>
This commit is contained in:
committed by
David S. Miller
parent
dfdd7230c5
commit
cfc81b5038
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user