aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/prog_tests/sockmap_basic.c
diff options
context:
space:
mode:
authorJiayuan Chen <[email protected]>2025-01-22 10:09:15 +0000
committerMartin KaFai Lau <[email protected]>2025-01-29 21:32:32 +0000
commit5459cce6bf49e72ee29be21865869c2ac42419f5 (patch)
tree0cb373945369d9bb95b86323db6c7345f597a04a /tools/testing/selftests/bpf/prog_tests/sockmap_basic.c
parentbpf: Fix wrong copied_seq calculation (diff)
downloadkernel-5459cce6bf49e72ee29be21865869c2ac42419f5.tar.gz
kernel-5459cce6bf49e72ee29be21865869c2ac42419f5.zip
bpf: Disable non stream socket for strparser
Currently, only TCP supports strparser, but sockmap doesn't intercept non-TCP connections to attach strparser. For example, with UDP, although the read/write handlers are replaced, strparser is not executed due to the lack of a read_sock operation. Furthermore, in udp_bpf_recvmsg(), it checks whether the psock has data, and if not, it falls back to the native UDP read interface, making UDP + strparser appear to read correctly. According to its commit history, this behavior is unexpected. Moreover, since UDP lacks the concept of streams, we intercept it directly. Fixes: 1fa1fe8ff161 ("bpf, sockmap: Test shutdown() correctly exits epoll and recv()=0") Signed-off-by: Jiayuan Chen <[email protected]> Signed-off-by: Martin KaFai Lau <[email protected]> Acked-by: Jakub Sitnicki <[email protected]> Acked-by: John Fastabend <[email protected]> Link: https://patch.msgid.link/[email protected]
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/sockmap_basic.c')
0 files changed, 0 insertions, 0 deletions