getaddrinfo() in glibc
Andreas Jaeger
aj@arthur.rhein-neckar.de
Mon Jul 12 23:37:00 GMT 1999
>>>>> Artur Frysiak writes:
Artur> On Mon, 12 Jul 1999, Ulrich Drepper wrote:
>> Fixed now.
Artur> In CVS ? In glibc 2.1.1 release ?
In CVS and it will be in glibc 2.1.2. I'm appending the patch below.
Andreas
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.
Index: sysdeps/posix/getaddrinfo.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/posix/getaddrinfo.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- getaddrinfo.c 1999/07/01 21:09:23 1.16
+++ getaddrinfo.c 1999/07/12 21:27:24 1.17
@@ -380,9 +380,13 @@
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)
--
Andreas Jaeger aj@arthur.rhein-neckar.de jaeger@informatik.uni-kl.de
for pgp-key finger ajaeger@aixd1.rhrk.uni-kl.de
More information about the Libc-alpha
mailing list