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.20-488-g3894902


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  38949026b3600d035281d8eaf833dd327585bdd0 (commit)
       via  5fe55e9c654be9055d5ee22dce749c0ee8a3bb75 (commit)
      from  9300797ee93422a87f443d5ba7e1411167e7a837 (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://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=38949026b3600d035281d8eaf833dd327585bdd0

commit 38949026b3600d035281d8eaf833dd327585bdd0
Author: Aurelien Jarno <aurelien@aurel32.net>
Date:   Tue Jan 6 08:50:23 2015 -0800

    resolv: fix rotate option
    
    The rotate option doesn't work correctly, and only send the query to the
    same server (the second in the list). The rotation code in itself is not
    broken, but the nsaddrs structure is reinitialized each time at the
    beginning of __libc_res_nsend unless RES_STAYOPEN is enabled.
    
    This is due to a call to __res_iclose from the end of __libc_res_nsend
    when answers from the name server have been received. This function
    closes all the sockets, but doesn't free the addresses (it can do that,
    but in that case the second argument is false).
    
    This patch change the code of __res_iclose to clear statp->_u._ext.nsinit
     only when the addresses are actually freed.
    
    	* resolv/res_init.c (__res_iclose): Only clear nsinit if the
    	addresses have been freed.

diff --git a/ChangeLog b/ChangeLog
index 1204575..6ba3b8e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2015-01-06  Aurelien Jarno  <aurelien@aurel32.net>
 
+	* resolv/res_init.c (__res_iclose): Only clear nsinit if the
+	addresses have been freed.
+
+2015-01-06  Aurelien Jarno  <aurelien@aurel32.net>
+
 	* resolv/res_init.c (__res_vinit): Improve comments about nserv
 	and nservall.
 
diff --git a/resolv/res_init.c b/resolv/res_init.c
index 4c170be..553ba12 100644
--- a/resolv/res_init.c
+++ b/resolv/res_init.c
@@ -621,7 +621,8 @@ __res_iclose(res_state statp, bool free_addr) {
 				statp->_u._ext.nsaddrs[ns] = NULL;
 			}
 		}
-	statp->_u._ext.nsinit = 0;
+	if (free_addr)
+		statp->_u._ext.nsinit = 0;
 }
 libc_hidden_def (__res_iclose)
 

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5fe55e9c654be9055d5ee22dce749c0ee8a3bb75

commit 5fe55e9c654be9055d5ee22dce749c0ee8a3bb75
Author: Aurelien Jarno <aurelien@aurel32.net>
Date:   Tue Jan 6 08:33:43 2015 -0800

    resolv: improve comments about nserv and nservall
    
    The current comments concerning nserv and nservall are not really clear
    and lead to confusion when reviewing an already complex code. Improve
    them, there real meaning have been confirmed by a code analysis.
    
    	* resolv/res_init.c (__res_vinit): Improve comments about nserv
    	and nservall.

diff --git a/ChangeLog b/ChangeLog
index 5fe5e58..1204575 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-01-06  Aurelien Jarno  <aurelien@aurel32.net>
+
+	* resolv/res_init.c (__res_vinit): Improve comments about nserv
+	and nservall.
+
 2015-01-06  OndÅ?ej Bílka  <neleai@seznam.cz>
 
 	* sysdeps/unix/sysv/linux/check_pf.c (make_request):
diff --git a/resolv/res_init.c b/resolv/res_init.c
index d492a08..4c170be 100644
--- a/resolv/res_init.c
+++ b/resolv/res_init.c
@@ -153,9 +153,9 @@ __res_vinit(res_state statp, int preinit) {
 	char *cp, **pp;
 	int n;
 	char buf[BUFSIZ];
-	int nserv = 0;    /* number of nameserver records read from file */
+	int nserv = 0;    /* number of IPv4 nameservers read from file */
 #ifdef _LIBC
-	int nservall = 0; /* number of NS records read, nserv IPv4 only */
+	int nservall = 0; /* number of (IPv4 + IPV6) nameservers read from file */
 #endif
 	int haveenv = 0;
 	int havesearch = 0;

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

Summary of changes:
 ChangeLog         |   10 ++++++++++
 resolv/res_init.c |    7 ++++---
 2 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]