summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@redhat.com>2011-06-22 14:35:49 -0400
committerAndreas Schwab <schwab@redhat.com>2011-06-24 16:14:25 +0200
commit5ec98a06e70c071cc38c45c80804df4afc7eff09 (patch)
treefb7e1ac16d7c9a56c332a4ba39c98e1b8b9a362f
parent0e779ef2a9fcfd13f5243224c82894ba797ecec3 (diff)
downloadglibc-5ec98a06e70c071cc38c45c80804df4afc7eff09.tar.gz
Fix Ipv4&IPv6 lookup in getaddrinfo
Problem introduced in the last patch. (cherry picked from commit e12df166d37522c2ed434c2d70a1b04640d2d7c6)
-rw-r--r--ChangeLog4
-rw-r--r--sysdeps/posix/getaddrinfo.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 47a9fbbb57..c90463ec74 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2011-06-22 Andreas Schwab <schwab@redhat.com>
+
+ * sysdeps/posix/getaddrinfo.c (gaih_inet): Fix last change.
+
2011-06-21 Ulrich Drepper <drepper@gmail.com>
[BZ #12885]
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index abd8551074..6b7423cda1 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -904,7 +904,7 @@ gaih_inet (const char *name, const struct gaih_service *service,
pat = &((*pat)->next);
no_data = 0;
}
- else if ((*pat)->family == AF_UNSPEC
+ else if (req->ai_family == AF_UNSPEC
|| (*pat)->family == req->ai_family)
{
pat = &((*pat)->next);