mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-13 23:00:22 +00:00
(gaih_inet): For non-passive connections without a hostname set address to
localhost address.
This commit is contained in:
parent
d411ce8525
commit
c7aca6f6bd
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user