selftests/bpf: Test BPF socket lookup and reuseport with connections
authorJakub Sitnicki <jakub@cloudflare.com>
Wed, 22 Jul 2020 16:17:20 +0000 (18:17 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Sun, 26 Jul 2020 03:16:32 +0000 (20:16 -0700)
commit86176a1821a1237ad163d312ba0f2d7598757894
tree6e1950b5b123d12ae995d0d86ec520bdac2cf997
parentc8a2983c4df06c4cd11bea6abfa7e2947bd3113b
selftests/bpf: Test BPF socket lookup and reuseport with connections

Cover the case when BPF socket lookup returns a socket that belongs to a
reuseport group, and the reuseport group contains connected UDP sockets.

Ensure that the presence of connected UDP sockets in reuseport group does
not affect the socket lookup result. Socket selected by reuseport should
always be used as result in such case.

Signed-off-by: Jakub Sitnicki <jakub@cloudflare.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Kuniyuki Iwashima <kuniyu@amazon.co.jp>
Link: https://lore.kernel.org/bpf/20200722161720.940831-3-jakub@cloudflare.com
tools/testing/selftests/bpf/prog_tests/sk_lookup.c