Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Ulrich Drepper committed Jul 12, 1999
1 parent bec5a77 commit 86421aa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions 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
Expand Down
4 changes: 4 additions & 0 deletions sysdeps/posix/getaddrinfo.c
Expand Up @@ -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)
Expand Down

0 comments on commit 86421aa

Please sign in to comment.