From df88f223bb5474a462da65ede6f266eb52f1b2ef Mon Sep 17 00:00:00 2001 From: Andrei Vagin Date: Sat, 31 Oct 2020 01:17:29 -0700 Subject: net/tcpip: connect to unset loopback address has to return EADDRNOTAVAIL In the docker container, the ipv6 loopback address is not set, and connect("::1") has to return ENEADDRNOTAVAIL in this case. Without this fix, it returns EHOSTUNREACH. PiperOrigin-RevId: 340002915 --- test/syscalls/linux/socket_ip_unbound.cc | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'test/syscalls/linux/socket_ip_unbound.cc') diff --git a/test/syscalls/linux/socket_ip_unbound.cc b/test/syscalls/linux/socket_ip_unbound.cc index 8f7ccc868..029f1e872 100644 --- a/test/syscalls/linux/socket_ip_unbound.cc +++ b/test/syscalls/linux/socket_ip_unbound.cc @@ -454,23 +454,15 @@ TEST_P(IPUnboundSocketTest, SetReuseAddr) { INSTANTIATE_TEST_SUITE_P( IPUnboundSockets, IPUnboundSocketTest, - ::testing::ValuesIn(VecCat(VecCat( + ::testing::ValuesIn(VecCat( ApplyVec(IPv4UDPUnboundSocket, - AllBitwiseCombinations(List{SOCK_DGRAM}, - List{0, - SOCK_NONBLOCK})), + std::vector{0, SOCK_NONBLOCK}), ApplyVec(IPv6UDPUnboundSocket, - AllBitwiseCombinations(List{SOCK_DGRAM}, - List{0, - SOCK_NONBLOCK})), + std::vector{0, SOCK_NONBLOCK}), ApplyVec(IPv4TCPUnboundSocket, - AllBitwiseCombinations(List{SOCK_STREAM}, - List{0, - SOCK_NONBLOCK})), + std::vector{0, SOCK_NONBLOCK}), ApplyVec(IPv6TCPUnboundSocket, - AllBitwiseCombinations(List{SOCK_STREAM}, - List{ - 0, SOCK_NONBLOCK})))))); + std::vector{0, SOCK_NONBLOCK})))); } // namespace testing } // namespace gvisor -- cgit v1.2.3