summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorJussi Maki <joamaki@gmail.com>2021-05-25 10:29:55 +0000
committerDaniel Borkmann <daniel@iogearbox.net>2021-05-25 18:00:28 +0200
commit6fd5fb63820a9a1146aba0bba2fdbc1db4b903e7 (patch)
tree24f7d28c24b6eea45a9228d6bd8f59d18d4f86d7 /kernel
parenta8deba8547e39f26440101164a3bbc2899c5b305 (diff)
downloadlinux-stable-6fd5fb63820a9a1146aba0bba2fdbc1db4b903e7.tar.gz
linux-stable-6fd5fb63820a9a1146aba0bba2fdbc1db4b903e7.tar.bz2
linux-stable-6fd5fb63820a9a1146aba0bba2fdbc1db4b903e7.zip
selftests/bpf: Add test for l3 use of bpf_redirect_peer
Add a test case for using bpf_skb_change_head() in combination with bpf_redirect_peer() to redirect a packet from a L3 device to veth and back. The test uses a BPF program that adds L2 headers to the packet coming from a L3 device and then calls bpf_redirect_peer() to redirect the packet to a veth device. The test fails as skb->mac_len is not set properly and thus the ethernet headers are not properly skb_pull'd in cls_bpf_classify(), causing tcp_v4_rcv() to point the TCP header into middle of the IP header. Signed-off-by: Jussi Maki <joamaki@gmail.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20210525102955.2811090-1-joamaki@gmail.com
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions