summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--sysdeps/posix/getaddrinfo.c8
2 files changed, 14 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index a04985f2c3..2cb929635a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
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
hosts, host_conf.
(struct support_chroot): Add path_hosts, path_host_conf.
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index acb5d9e73d..0471a2f624 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -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
{