OSDN Git Service

selftests/bpf: Fix sk lookup usage in test_sock_addr
authorAndrey Ignatov <rdna@fb.com>
Thu, 13 Dec 2018 21:19:01 +0000 (13:19 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 13 Dec 2018 22:42:16 +0000 (23:42 +0100)
commit28c1272914613b6c5a0129d6d502c790d4f23d6c
tree111a70743c7fff1c8f4a0a1720203818f8d89bc6
parent9f8c1c5712954f9d8877ac55b18adbdf03e51e1f
selftests/bpf: Fix sk lookup usage in test_sock_addr

Semantic of netns_id argument of bpf_sk_lookup_tcp and bpf_sk_lookup_udp
was changed (fixed) in f71c6143c203. Corresponding changes have to be
applied to all call sites in selftests. The patch fixes corresponding
call sites in test_sock_addr test: pass BPF_F_CURRENT_NETNS instead of 0
in netns_id argument.

Fixes: f71c6143c203 ("bpf: Support sk lookup in netns with id 0")
Reported-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Andrey Ignatov <rdna@fb.com>
Acked-by: Joe Stringer <joe@wand.net.nz>
Tested-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/testing/selftests/bpf/connect4_prog.c
tools/testing/selftests/bpf/connect6_prog.c