Files
linux-stable-mirror/include/linux
Nicolas Dichtel c44b14469a dev_forward_skb: do not scrub skb mark within the same name space
commit ff70202b2d upstream.

The goal is to keep the mark during a bpf_redirect(), like it is done for
legacy encapsulation / decapsulation, when there is no x-netns.
This was initially done in commit 213dd74aee ("skbuff: Do not scrub skb
mark within the same name space").

When the call to skb_scrub_packet() was added in dev_forward_skb() (commit
8b27f27797 ("skb: allow skb_scrub_packet() to be used by tunnels")), the
second argument (xnet) was set to true to force a call to skb_orphan(). At
this time, the mark was always cleanned up by skb_scrub_packet(), whatever
xnet value was.
This call to skb_orphan() was removed later in commit
9c4c325252 ("skbuff: preserve sock reference when scrubbing the skb.").
But this 'true' stayed here without any real reason.

Let's correctly set xnet in ____dev_forward_skb(), this function has access
to the previous interface and to the new interface.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-25 11:54:18 +02:00
..
2023-08-26 15:26:49 +02:00
2023-10-10 21:53:37 +02:00
2023-03-17 08:45:07 +01:00
2023-03-17 08:45:07 +01:00
2023-06-21 15:45:38 +02:00
2023-08-26 15:26:57 +02:00
2023-03-17 08:45:14 +01:00
2023-10-25 11:54:13 +02:00
2023-10-25 11:54:13 +02:00
2023-05-17 11:48:09 +02:00