Commit 5b189c74 authored by Rusty Russell's avatar Rusty Russell

net: fix tests for systems without IPv6 entries in /etc/hosts.

We fake up a dual IPv4/IPv6 response to localhost for testing, but it
assumed localhost6 or ip6-localhost entries.  Fall back to "::1" which
should always work.
parent c6e453df
......@@ -69,6 +69,10 @@ static struct addrinfo* double_addr_lookup(char* buf)
addr2 = net_client_lookup("localhost6", buf,
AF_UNSPEC,
SOCK_STREAM);
if (!addr2)
addr2 = net_client_lookup("::1", buf,
AF_UNSPEC,
SOCK_STREAM);
} else if (addr->ai_family == AF_INET6)
/* IPv6 only? This is a guess... */
addr2 = net_client_lookup("ip4-localhost", buf,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment