]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
pullup:
authorBrian Wellington <source@isc.org>
Sat, 3 Mar 2001 09:33:12 +0000 (09:33 +0000)
committerBrian Wellington <source@isc.org>
Sat, 3 Mar 2001 09:33:12 +0000 (09:33 +0000)
 709.   [bug]           ANY or SIG queries for data with a TTL of 0
                        would return SERVFAIL. [RT #620]
(this should make the name leak much less common)

CHANGES
lib/dns/rbtdb.c

diff --git a/CHANGES b/CHANGES
index d0374d3c4e29eaee1c8b148f6b71bace97d664f1..b54978d5d16fd815c7538d0e4a45e79ef36137b3 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+ 709.  [bug]           ANY or SIG queries for data with a TTL of 0
+                       would return SERVFAIL. [RT #620]
+
  759.  [bug]           The resolver didn't turn off "avoid fetches" mode
                        when restarting, possibly causing resolution
                        to fail when it should not.  This bug only affected
index 7f0e20fadb6e00137e9f66fdb0b06da1275b2adb..8815708c6f53a4c634241a80d12e93200bb1d0cc 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: rbtdb.c,v 1.139.4.3 2001/02/23 18:42:59 gson Exp $ */
+/* $Id: rbtdb.c,v 1.139.4.4 2001/03/03 09:33:12 bwelling Exp $ */
 
 /*
  * Principal Author: Bob Halley
@@ -4264,6 +4264,12 @@ rdatasetiter_destroy(dns_rdatasetiter_t **iteratorp) {
 
        rbtiterator = (rbtdb_rdatasetiter_t *)(*iteratorp);
 
+                                *
+                                * Note: unlike everywhere else, we
+                                * check for now > header->ttl instead
+                                * of now >= header->ttl.  This allows
+                                * ANY and SIG queries for 0 TTL
+                                * rdatasets to work.
        if (rbtiterator->common.version != NULL)
                closeversion(rbtiterator->common.db,
                             &rbtiterator->common.version, ISC_FALSE);
@@ -4304,7 +4310,7 @@ rdatasetiter_first(dns_rdatasetiter_t *iterator) {
                                 */
                                if ((header->attributes &
                                     RDATASET_ATTR_NONEXISTENT) != 0 ||
-                                   (now != 0 && now >= header->ttl))
+                                   (now != 0 && now > header->ttl))
                                        header = NULL;
                                break;
                        } else
@@ -4359,10 +4365,16 @@ rdatasetiter_next(dns_rdatasetiter_t *iterator) {
                                        /*
                                         * Is this a "this rdataset doesn't
                                         * exist" record?
+                                        *
+                                        * Note: unlike everywhere else, we
+                                        * check for now > header->ttl instead
+                                        * of now >= header->ttl.  This allows
+                                        * ANY and SIG queries for 0 TTL
+                                        * rdatasets to work.
                                         */
                                        if ((header->attributes &
                                             RDATASET_ATTR_NONEXISTENT) != 0 ||
-                                           (now != 0 && now >= header->ttl))
+                                           (now != 0 && now > header->ttl))
                                                header = NULL;
                                        break;
                                } else