summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorAndrei Vagin <avagin@google.com>2020-11-09 13:55:28 -0800
committergVisor bot <gvisor-bot@google.com>2020-11-09 13:57:51 -0800
commit2fcca60a7bf084a28e878941d9dcb47e11268cbd (patch)
tree8a19c7739341a3bc894cae933c5534052fd4552e /test
parentc59bdd18d521ebb3c8dedf03a6adfa56dd6245c7 (diff)
net: connect to the ipv4 localhost returns ENETUNREACH if the address isn't set
cl/340002915 modified the code to return EADDRNOTAVAIL if connect is called for a localhost address which isn't set. But actually, Linux returns EADDRNOTAVAIL for ipv6 addresses and ENETUNREACH for ipv4 addresses. Updates #4735 PiperOrigin-RevId: 341479129
Diffstat (limited to 'test')
-rw-r--r--test/syscalls/linux/socket_ip_unbound_netlink.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/syscalls/linux/socket_ip_unbound_netlink.cc b/test/syscalls/linux/socket_ip_unbound_netlink.cc
index 6036bfcaf..7fb1c0faf 100644
--- a/test/syscalls/linux/socket_ip_unbound_netlink.cc
+++ b/test/syscalls/linux/socket_ip_unbound_netlink.cc
@@ -92,7 +92,7 @@ TEST_P(IPv4UnboundSocketTest, ConnectToBadLocalAddress_NoRandomSave) {
auto sock = ASSERT_NO_ERRNO_AND_VALUE(NewSocket());
EXPECT_THAT(connect(sock->get(), reinterpret_cast<sockaddr*>(&addr.addr),
addr.addr_len),
- SyscallFailsWithErrno(EADDRNOTAVAIL));
+ SyscallFailsWithErrno(ENETUNREACH));
}
INSTANTIATE_TEST_SUITE_P(IPUnboundSockets, IPv4UnboundSocketTest,