diff options
author | Dmitry Safonov <0x7f454c46@gmail.com> | 2024-04-13 04:42:53 +0300 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2024-04-16 14:35:05 +0300 |
commit | b089b3bead532419cdcbd8e4e0a3e23c49d11573 (patch) | |
tree | 27f9566f964fc7116eaa457fbbd9fac4ff18f371 /tools/testing | |
parent | 4225dfa4535f219b03ae14147d9c6e7e82ec8df4 (diff) | |
download | linux-b089b3bead532419cdcbd8e4e0a3e23c49d11573.tar.xz |
selftests/tcp_ao: Zero-init tcp_ao_info_opt
The structure is on the stack and has to be zero-initialized as
the kernel checks for:
> if (in.reserved != 0 || in.reserved2 != 0)
> return -EINVAL;
Fixes: b26660531cf6 ("selftests/net: Add test for TCP-AO add setsockopt() command")
Signed-off-by: Dmitry Safonov <0x7f454c46@gmail.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'tools/testing')
-rw-r--r-- | tools/testing/selftests/net/tcp_ao/setsockopt-closed.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/net/tcp_ao/setsockopt-closed.c b/tools/testing/selftests/net/tcp_ao/setsockopt-closed.c index 452de131fa3a..517930f9721b 100644 --- a/tools/testing/selftests/net/tcp_ao/setsockopt-closed.c +++ b/tools/testing/selftests/net/tcp_ao/setsockopt-closed.c @@ -21,7 +21,7 @@ static void make_listen(int sk) static void test_vefify_ao_info(int sk, struct tcp_ao_info_opt *info, const char *tst) { - struct tcp_ao_info_opt tmp; + struct tcp_ao_info_opt tmp = {}; socklen_t len = sizeof(tmp); if (getsockopt(sk, IPPROTO_TCP, TCP_AO_INFO, &tmp, &len)) |