]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: net: reuseport_dualstack: fix uninitalized parameter
authorWei Wang <weiwan@google.com>
Thu, 31 Oct 2019 23:24:36 +0000 (16:24 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 1 Nov 2019 22:11:02 +0000 (15:11 -0700)
commit7d03892cc56d07a4f638a13da5358971ea2eff68
treebca6f9227ccfc04d904e23cda3f8f6b4eac53dcc
parent53112bfe776593607206451daacf9973f7cb623b
selftests: net: reuseport_dualstack: fix uninitalized parameter

This test reports EINVAL for getsockopt(SOL_SOCKET, SO_DOMAIN)
occasionally due to the uninitialized length parameter.
Initialize it to fix this, and also use int for "test_family" to comply
with the API standard.

Fixes: 294f16fc4d45 ("soreuseport: test mixed v4/v6 sockets")
Reported-by: Maciej Żenczykowski <maze@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Wei Wang <weiwan@google.com>
Cc: Craig Gallek <cgallek@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/reuseport_dualstack.c