]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 26 Nov 2019 12:15:59 +0000 (13:15 +0100)
commit00f9918c13b2bb1e33a06a39628118579dfd5ecf
tree4919e22e3009132bf0b9b5e830604d36faeda44e
parent96baf617757f85037e3159cb1b1b7dedecae7787
selftests: net: reuseport_dualstack: fix uninitalized parameter

BugLink: https://bugs.launchpad.net/bugs/1853208
[ Upstream commit d64479a3e3f9924074ca7b50bd72fa5211dca9c1 ]

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: d6a61f80b871 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
tools/testing/selftests/net/reuseport_dualstack.c