aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-07-12 21:28:32 +0000
committerUlrich Drepper <drepper@redhat.com>1999-07-12 21:28:32 +0000
commit86421aa57ecfd70963ae66848bd6a6dd3b8e0fe6 (patch)
treea5cf438990caf7731c0ba36c1e2f87c543181ad2
parentbec5a77adbbb537fb5112fbcc106784596717e6b (diff)
downloadglibc-86421aa57ecfd70963ae66848bd6a6dd3b8e0fe6.zip
glibc-86421aa57ecfd70963ae66848bd6a6dd3b8e0fe6.tar.gz
glibc-86421aa57ecfd70963ae66848bd6a6dd3b8e0fe6.tar.bz2
Update.
1999-07-12 Ulrich Drepper <drepper@cygnus.com> * sysdeps/posix/getaddrinfo.c (gaih_inet): For non-passive connections without a hostname set address to localhost address.
-rw-r--r--ChangeLog5
-rw-r--r--sysdeps/posix/getaddrinfo.c4
2 files changed, 9 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 5f9469a..27c491d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+1999-07-12 Ulrich Drepper <drepper@cygnus.com>
+
+ * sysdeps/posix/getaddrinfo.c (gaih_inet): For non-passive
+ connections without a hostname set address to localhost address.
+
1999-07-11 H.J. Lu <hjl@gnu.org>
* nscd/grpcache.c: Add prefix "__" to get[a-z]*_r () to get
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index 6810963..5c7c2f4 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -380,9 +380,13 @@ gaih_inet (const char *name, const struct gaih_service *service,
return -EAI_MEMORY;
at->family = AF_INET6;
+ if ((req->ai_flags & AI_PASSIVE) == 0)
+ memcpy (at->addr, &in6addr_loopback, sizeof (struct in6_addr));
memset (at->next, 0, sizeof(struct gaih_addrtuple));
at->next->family = AF_INET;
+ if ((req->ai_flags & AI_PASSIVE) == 0)
+ *(uint32_t *) at->next->addr = htonl (INADDR_LOOPBACK);
}
if (pai == NULL)