]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
getaddrinfo: Return EAI_NODATA if gethostbyname2_r reports NO_DATA [BZ #21922]
authorFlorian Weimer <fweimer@redhat.com>
Fri, 1 Sep 2017 07:15:36 +0000 (09:15 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Fri, 1 Sep 2017 07:15:36 +0000 (09:15 +0200)
ChangeLog
sysdeps/posix/getaddrinfo.c

index a04985f2c36ec9b1e07f42519099f6d47a8f7a20..2cb929635a471db20f130fa921cdaf82fd9fbbeb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index acb5d9e73d0e21f433948cbe041e44db4c6ce4fe..0471a2f624dca0526868354567051138d165c666 100644 (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
                {