This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch sthibault/release/2.19 created. glibc-2.19-40-gb0f0937


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, sthibault/release/2.19 has been created
        at  b0f0937975ef3c0f4c514fe29137549c27be0cf0 (commit)

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b0f0937975ef3c0f4c514fe29137549c27be0cf0

commit b0f0937975ef3c0f4c514fe29137549c27be0cf0
Author: Andreas Schwab <schwab@suse.de>
Date:   Wed May 7 11:47:20 2014 +0200

    Fix parsing of getai result from nscd for IPv6-only request
    
    (cherry picked from commit 8dc9751764eb1bedf06d19695524b31a16773413)

diff --git a/ChangeLog b/ChangeLog
index 51573d0..6aff2a2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-10-02  Andreas Schwab  <schwab@suse.de>
+
+	* sysdeps/posix/getaddrinfo.c (gaih_inet): Advance address pointer
+	when skipping over non-matching result from nscd.
+
 2015-09-11  Alan Modra  <amodra@gmail.com>
 
 	[BZ #17153]
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index b3cc124..d2283bc 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -710,16 +710,20 @@ gaih_inet (const char *name, const struct gaih_service *service,
 		  struct gaih_addrtuple *addrfree = addrmem;
 		  for (int i = 0; i < air->naddrs; ++i)
 		    {
+		      socklen_t size = (air->family[i] == AF_INET
+					? INADDRSZ : IN6ADDRSZ);
+
 		      if (!((air->family[i] == AF_INET
 			     && req->ai_family == AF_INET6
 			     && (req->ai_flags & AI_V4MAPPED) != 0)
 			    || req->ai_family == AF_UNSPEC
 			    || air->family[i] == req->ai_family))
-			/* Skip over non-matching result.  */
-			continue;
+			{
+			  /* Skip over non-matching result.  */
+			  addrs += size;
+			  continue;
+			}
 
-		      socklen_t size = (air->family[i] == AF_INET
-					? INADDRSZ : IN6ADDRSZ);
 		      if (*pat == NULL)
 			{
 			  *pat = addrfree++;

-----------------------------------------------------------------------


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]