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.21-512-g6b142b3


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  6b142b3a1d007d7e6f50c26710de7177bc4aca74 (commit)
      from  ef635a29f7123f25ee0600b7a6aca1c511c63e85 (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=6b142b3a1d007d7e6f50c26710de7177bc4aca74

commit 6b142b3a1d007d7e6f50c26710de7177bc4aca74
Author: Andreas Schwab <schwab@suse.de>
Date:   Mon Jun 8 15:21:18 2015 +0200

    Record TTL also for DNS PTR queries (bug 18513)
    
    This allows nscd to manage proper TTL for GETHOSTBYADDR[v6] requests.

diff --git a/ChangeLog b/ChangeLog
index 1150ec5..6442ca6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2015-06-22  Andreas Schwab  <schwab@suse.de>
+
+	[BZ #18513]
+	* resolv/nss_dns/dns-host.c (getanswer_r): Record TTL also for
+	PTR queries.
+
 2015-06-22  Leonhard Holz  <leonhard.holz@web.de>
 
 	* string/strcoll_l.c (STRCOLL): Remove unnecessary memset.
diff --git a/NEWS b/NEWS
index 90495e8..6f8cb06 100644
--- a/NEWS
+++ b/NEWS
@@ -21,9 +21,9 @@ Version 2.22
   18197, 18206, 18210, 18211, 18217, 18220, 18221, 18234, 18244, 18247,
   18287, 18319, 18324, 18333, 18346, 18397, 18409, 18410, 18412, 18418,
   18422, 18434, 18444, 18468, 18469, 18470, 18479, 18483, 18495, 18496,
-  18497, 18498, 18507, 18512, 18519, 18520, 18522, 18527, 18528, 18529,
-  18530, 18532, 18533, 18534, 18536, 18539, 18540, 18542, 18544, 18545,
-  18546, 18547, 18553, 18558, 18569.
+  18497, 18498, 18507, 18512, 18513, 18519, 18520, 18522, 18527, 18528,
+  18529, 18530, 18532, 18533, 18534, 18536, 18539, 18540, 18542, 18544,
+  18545, 18546, 18547, 18553, 18558, 18569.
 
 * Cache information can be queried via sysconf() function on s390 e.g. with
   _SC_LEVEL1_ICACHE_SIZE as argument.
diff --git a/resolv/nss_dns/dns-host.c b/resolv/nss_dns/dns-host.c
index d8c5579..357ac04 100644
--- a/resolv/nss_dns/dns-host.c
+++ b/resolv/nss_dns/dns-host.c
@@ -800,6 +800,10 @@ getanswer_r (const querybuf *answer, int anslen, const char *qname, int qtype,
 
       if (qtype == T_PTR && type == T_CNAME)
 	{
+	  /* A CNAME could also have a TTL entry.  */
+	  if (ttlp != NULL && ttl < *ttlp)
+	      *ttlp = ttl;
+
 	  n = dn_expand (answer->buf, end_of_message, cp, tbuf, sizeof tbuf);
 	  if (__glibc_unlikely (n < 0 || res_dnok (tbuf) == 0))
 	    {
@@ -863,6 +867,8 @@ getanswer_r (const querybuf *answer, int anslen, const char *qname, int qtype,
 	      ++had_error;
 	      break;
 	    }
+	  if (ttlp != NULL && ttl < *ttlp)
+	      *ttlp = ttl;
 	  /* bind would put multiple PTR records as aliases, but we don't do
 	     that.  */
 	  result->h_name = bp;

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

Summary of changes:
 ChangeLog                 |    6 ++++++
 NEWS                      |    6 +++---
 resolv/nss_dns/dns-host.c |    6 ++++++
 3 files changed, 15 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]