summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/test_tcp_check_syncookie_user.c
diff options
context:
space:
mode:
authorGeliang Tang <tanggeliang@kylinos.cn>2024-05-25 20:08:15 +0800
committerMartin KaFai Lau <martin.lau@kernel.org>2024-05-28 17:53:03 -0700
commited31adf6874db172e3212ac1ebaf701ed6190650 (patch)
tree0217dd38368584252da86ab516bdf3cc99c0f601 /tools/testing/selftests/bpf/test_tcp_check_syncookie_user.c
parenteb4e7726279a344c82e3c23be396bcfd0a4d5669 (diff)
downloadlinux-ed31adf6874db172e3212ac1ebaf701ed6190650.tar.gz
linux-ed31adf6874db172e3212ac1ebaf701ed6190650.tar.bz2
linux-ed31adf6874db172e3212ac1ebaf701ed6190650.zip
selftests/bpf: Drop struct post_socket_opts
It's not possible to have one generic/common "struct post_socket_opts" for all tests. It's better to have the individual test define its own callback opts struct. So this patch drops struct post_socket_opts, and changes the second parameter of post_socket_cb as "void *" type. Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn> Link: https://lore.kernel.org/r/f8bda41c7cb9cb6979b2779f89fb3a684234304f.1716638248.git.tanggeliang@kylinos.cn Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/test_tcp_check_syncookie_user.c')
-rw-r--r--tools/testing/selftests/bpf/test_tcp_check_syncookie_user.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/bpf/test_tcp_check_syncookie_user.c b/tools/testing/selftests/bpf/test_tcp_check_syncookie_user.c
index 7b5fc98838cd..aebc58c24dc5 100644
--- a/tools/testing/selftests/bpf/test_tcp_check_syncookie_user.c
+++ b/tools/testing/selftests/bpf/test_tcp_check_syncookie_user.c
@@ -139,14 +139,14 @@ out:
return ret;
}
-static int v6only_true(int fd, const struct post_socket_opts *opts)
+static int v6only_true(int fd, void *opts)
{
int mode = true;
return setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, &mode, sizeof(mode));
}
-static int v6only_false(int fd, const struct post_socket_opts *opts)
+static int v6only_false(int fd, void *opts)
{
int mode = false;