neither IPv4 nor IPv6 addresses defined, don't do anything.
+2008-11-26 Ulrich Drepper <drepper@redhat.com>
+
+ * sysdeps/posix/getaddrinfo.c (getaddrinfo): If the system has
+ neither IPv4 nor IPv6 addresses defined, don't do anything.
+
2008-11-26 Roland McGrath <roland@redhat.com>
* sysdeps/unix/sysv/linux/alpha/ipc_priv.h: Renamed to ...
narrow down the search. */
if (! seen_ipv4 || ! seen_ipv6)
{
+ if (! seen_ipv4 && ! seen_ipv6)
+ /* Neither IPv4 nor IPv6 interfaces exist, nothing to
+ return. */
+ goto err_noname;
+
local_hints = *hints;
local_hints.ai_family = seen_ipv4 ? PF_INET : PF_INET6;
hints = &local_hints;
|| (hints->ai_family == PF_INET6 && ! seen_ipv6))
{
/* We cannot possibly return a valid answer. */
+ err_noname:
free (in6ai);
return EAI_NONAME;
}