diff options
author | Jussi Maki <joamaki@gmail.com> | 2021-05-19 18:47:42 +0300 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2021-05-21 01:03:51 +0300 |
commit | 84316ca4e100d8cbfccd9f774e23817cb2059868 (patch) | |
tree | 62e7d5b25ec67270ff834530363db0c89d542114 /tools/bpf | |
parent | ceb11679d9fcf3fdb358a310a38760fcbe9b63ed (diff) | |
download | linux-84316ca4e100d8cbfccd9f774e23817cb2059868.tar.xz |
bpf: Set mac_len in bpf_skb_change_head
The skb_change_head() helper did not set "skb->mac_len", which is
problematic when it's used in combination with skb_redirect_peer().
Without it, redirecting a packet from a L3 device such as wireguard to
the veth peer device will cause skb->data to point to the middle of the
IP header on entry to tcp_v4_rcv() since the L2 header is not pulled
correctly due to mac_len=0.
Fixes: 3a0af8fd61f9 ("bpf: BPF for lightweight tunnel infrastructure")
Signed-off-by: Jussi Maki <joamaki@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20210519154743.2554771-2-joamaki@gmail.com
Diffstat (limited to 'tools/bpf')
0 files changed, 0 insertions, 0 deletions