]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Properly select active rdatasets when iterating across node
authorMark Andrews <marka@isc.org>
Tue, 15 Nov 2022 23:09:56 +0000 (10:09 +1100)
committerMark Andrews <marka@isc.org>
Wed, 7 Dec 2022 23:47:23 +0000 (10:47 +1100)
Active rdatasets where not being properly selected in rdatasetiter_first
and rdatasetiter_next.

(cherry picked from commit 3bdab2d111a76b048285bb1db66be04209a1fc6a)

lib/dns/rbtdb.c

index 4534de37728290cfc9de61512ea2d240b755e97d..ec3e3c4f52b01a158f20951af1de4e386400a27f 100644 (file)
@@ -9186,10 +9186,7 @@ rdatasetiter_first(dns_rdatasetiter_t *iterator) {
                                 *  queries for 0 TTL rdatasets to work.
                                 */
                                if (NONEXISTENT(header) ||
-                                   (now != 0 &&
-                                    (now - RBTDB_VIRTUAL) >
-                                            header->rdh_ttl +
-                                                    rbtdb->serve_stale_ttl))
+                                   (now != 0 && now > header->rdh_ttl))
                                {
                                        header = NULL;
                                }
@@ -9270,9 +9267,7 @@ rdatasetiter_next(dns_rdatasetiter_t *iterator) {
                                         * queries for 0 TTL rdatasets to work.
                                         */
                                        if (NONEXISTENT(header) ||
-                                           (now != 0 &&
-                                            (now - RBTDB_VIRTUAL) >
-                                                    header->rdh_ttl))
+                                           (now != 0 && now > header->rdh_ttl))
                                        {
                                                header = NULL;
                                        }