diff options
author | Geliang Tang <tanggeliang@kylinos.cn> | 2024-05-05 14:35:10 +0300 |
---|---|---|
committer | Martin KaFai Lau <martin.lau@kernel.org> | 2024-05-09 23:40:38 +0300 |
commit | 49e1fa8dbd81340f610057be3f3909f24c232807 (patch) | |
tree | fc50583586dff003832a56fa604d97e424694266 /tools/testing/selftests/bpf/Makefile | |
parent | 5166b3e3e30a8eb93f7182283ed4db719bdfde1a (diff) | |
download | linux-49e1fa8dbd81340f610057be3f3909f24c232807.tar.xz |
selftests/bpf: Use start_server_addr in test_tcp_check_syncookie
Include network_helpers.h in test_tcp_check_syncookie_user.c, use
public helper start_server_addr() in it instead of the local defined
function start_server(). This can avoid duplicate code.
Add two helpers v6only_true() and v6only_false() to set IPV6_V6ONLY
sockopt to true or false, set them to post_socket_cb pointer of struct
network_helper_opts, and pass it to start_server_setsockopt().
In order to use functions defined in network_helpers.c, Makefile needs
to be updated too.
Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
Link: https://lore.kernel.org/r/e0c5324f5da84f453f47543536e70f126eaa8678.1714907662.git.tanggeliang@kylinos.cn
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/Makefile')
-rw-r--r-- | tools/testing/selftests/bpf/Makefile | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile index e962a0bd8a78..135023a357b3 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -310,6 +310,7 @@ $(OUTPUT)/flow_dissector_load: $(TESTING_HELPERS) $(OUTPUT)/test_maps: $(TESTING_HELPERS) $(OUTPUT)/test_verifier: $(TESTING_HELPERS) $(CAP_HELPERS) $(UNPRIV_HELPERS) $(OUTPUT)/xsk.o: $(BPFOBJ) +$(OUTPUT)/test_tcp_check_syncookie_user: $(NETWORK_HELPERS) BPFTOOL ?= $(DEFAULT_BPFTOOL) $(DEFAULT_BPFTOOL): $(wildcard $(BPFTOOLDIR)/*.[ch] $(BPFTOOLDIR)/Makefile) \ |