getaddrinfo: Return EAI_NODATA if gethostbyname2_r reports NO_DATA [BZ #21922]

This commit is contained in:
Florian Weimer 2017-09-01 09:15:36 +02:00
parent 65329bd233
commit 5f8340f583
2 changed files with 14 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2017-09-01 Florian Weimer <fweimer@redhat.com>
[BZ #21922]
* sysdeps/posix/getaddrinfo.c (gaih_inet): Report EAI_NODATA error
coming from gethostbyname2_r.
2017-09-01 Florian Weimer <fweimer@redhat.com>
* support/namespace.h (struct support_chroot_configuration): Add

View File

@ -618,6 +618,14 @@ gaih_inet (const char *name, const struct gaih_service *service,
}
*pat = addrmem;
}
else
{
if (h_errno == NO_DATA)
result = -EAI_NODATA;
else
result = -EAI_NONAME;
goto free_and_return;
}
}
else
{