提交 cfc81b50 编写于 作者: D Daniel Borkmann 提交者: David S. Miller

bpf, skb_do_redirect: clear sender_cpu before xmit

Similar to commit c29390c6 ("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: 27b29f63 ("bpf: add bpf_redirect() helper")
Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
Acked-by: NAlexei Starovoitov <ast@plumgrid.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 dfdd7230
...@@ -1462,6 +1462,7 @@ int skb_do_redirect(struct sk_buff *skb) ...@@ -1462,6 +1462,7 @@ int skb_do_redirect(struct sk_buff *skb)
return dev_forward_skb(dev, skb); return dev_forward_skb(dev, skb);
skb->dev = dev; skb->dev = dev;
skb_sender_cpu_clear(skb);
return dev_queue_xmit(skb); return dev_queue_xmit(skb);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册