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 master updated. glibc-2.16-ports-merge-248-g8479f23


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, master has been updated
       via  8479f23aa1d5e5477a37f46823856bdafaedfa46 (commit)
      from  48da0b21630bb237b40086726f6ecd5bb2e2d988 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8479f23aa1d5e5477a37f46823856bdafaedfa46

commit 8479f23aa1d5e5477a37f46823856bdafaedfa46
Author: Jeff Law <law@redhat.com>
Date:   Wed Aug 22 11:41:40 2012 -0600

    	* sysdeps/posix/getaddrinfo.c (gaih_inet): Only use gethostbyname4_r
    	if the family is PF_UNSPEC.

diff --git a/ChangeLog b/ChangeLog
index 656b168..5c2aea1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-08-22  Jeff Law <law@redhat.com>
+
+	[BZ #14505]
+	* sysdeps/posix/getaddrinfo.c (gaih_inet): Only use gethostbyname4_r
+	if the family is PF_UNSPEC.
+
 2012-08-22  Mike Frysinger  <vapier@gentoo.org>
 
 	* Makerules (lib-version): Rename from V.
diff --git a/NEWS b/NEWS
index 688dc43..075d1ba 100644
--- a/NEWS
+++ b/NEWS
@@ -61,7 +61,7 @@ Version 2.16
   14043, 14044, 14048, 14049, 14050, 14053, 14055, 14059, 14064, 14075,
   14080, 14083, 14103, 14104, 14109, 14112, 14117, 14122, 14123, 14134,
   14153, 14183, 14188, 14199, 14210, 14218, 14229, 14241, 14273, 14277,
-  14278
+  14278, 14505
 
 * Support for the x32 ABI on x86-64 added.  The x32 target is selected by
   configuring glibc with:
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index 81e928a..05883bd 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -832,8 +832,13 @@ gaih_inet (const char *name, const struct gaih_service *service,
 	  while (!no_more)
 	    {
 	      no_data = 0;
-	      nss_gethostbyname4_r fct4
-		= __nss_lookup_function (nip, "gethostbyname4_r");
+	      nss_gethostbyname4_r fct4 = NULL;
+
+	      /* gethostbyname4_r sends out parallel A and AAAA queries and
+		 is thus only suitable for PF_UNSPEC.  */
+	      if (req->ai_family == PF_UNSPEC)
+		fct4 = __nss_lookup_function (nip, "gethostbyname4_r");
+
 	      if (fct4 != NULL)
 		{
 		  int herrno;

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

Summary of changes:
 ChangeLog                   |    6 ++++++
 NEWS                        |    2 +-
 sysdeps/posix/getaddrinfo.c |    9 +++++++--
 3 files changed, 14 insertions(+), 3 deletions(-)


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]