diff options
| author | Jiayuan Chen <[email protected]> | 2025-01-22 10:09:15 +0000 |
|---|---|---|
| committer | Martin KaFai Lau <[email protected]> | 2025-01-29 21:32:32 +0000 |
| commit | 5459cce6bf49e72ee29be21865869c2ac42419f5 (patch) | |
| tree | 0cb373945369d9bb95b86323db6c7345f597a04a /tools/testing/selftests/bpf/prog_tests/sockmap_basic.c | |
| parent | bpf: Fix wrong copied_seq calculation (diff) | |
| download | kernel-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
