]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: add tests for bpf_tcp_check_syncookie and bpf_skc_lookup_tcp
authorLorenz Bauer <lmb@cloudflare.com>
Fri, 22 Mar 2019 01:54:06 +0000 (09:54 +0800)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 22 Mar 2019 01:59:11 +0000 (18:59 -0700)
commit5d6bd1a3d100d257a2526fdb262f3b9154f8332e
tree7121a9eaa84868932fd2b124ac432e4424d17eeb
parent5fade56306efbee60e93536d0f3a9cf91199b48d
selftests/bpf: add tests for bpf_tcp_check_syncookie and bpf_skc_lookup_tcp

Add tests which verify that the new helpers work for both IPv4 and
IPv6, by forcing SYN cookies to always on. Use a new network namespace
to avoid clobbering the global SYN cookie settings.

Signed-off-by: Lorenz Bauer <lmb@cloudflare.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/.gitignore
tools/testing/selftests/bpf/Makefile
tools/testing/selftests/bpf/bpf_helpers.h
tools/testing/selftests/bpf/progs/test_tcp_check_syncookie_kern.c [new file with mode: 0644]
tools/testing/selftests/bpf/test_tcp_check_syncookie.sh [new file with mode: 0755]
tools/testing/selftests/bpf/test_tcp_check_syncookie_user.c [new file with mode: 0644]