]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests/bpf: Adapt sockmap update error handling
authorMichal Luczaj <mhal@rbox.co>
Tue, 7 Jul 2026 04:23:58 +0000 (06:23 +0200)
committerKumar Kartikeya Dwivedi <memxor@gmail.com>
Wed, 15 Jul 2026 08:34:14 +0000 (10:34 +0200)
commit30581eda4a07ff15db623612cac578e81869e96f
treeb6c509aaa4b8d4abca25d1d9a7762ee25259f5f4
parent66efd3368ae10d05e08fbe6425b50fdec7186ac7
selftests/bpf: Adapt sockmap update error handling

Update sockmap_listen to accommodate the recent change in sockmap that
rejects unbound UDP sockets.

TCP: Reject unbound and bound (unless established or listening).
UDP: Accept only bound sockets.

While at it, migrate to ASSERT_* and enforce reverse xmas tree.

Signed-off-by: Michal Luczaj <mhal@rbox.co>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Reviewed-by: Jakub Sitnicki <jakub@cloudflare.com>
Link: https://lore.kernel.org/bpf/20260707-sockmap-lookup-udp-leak-v4-3-f878346f27ab@rbox.co
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
tools/testing/selftests/bpf/prog_tests/sockmap_listen.c