From 434b53281b04749a66d9ec2920f2ea7ed8050422 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Wed, 16 Nov 2022 10:09:56 +1100 Subject: [PATCH] Properly select active rdatasets when iterating across node Active rdatasets where not being properly selected in rdatasetiter_first and rdatasetiter_next. (cherry picked from commit 3bdab2d111a76b048285bb1db66be04209a1fc6a) --- lib/dns/rbtdb.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/dns/rbtdb.c b/lib/dns/rbtdb.c index 42832cf7c8..624eb89b6a 100644 --- a/lib/dns/rbtdb.c +++ b/lib/dns/rbtdb.c @@ -8757,10 +8757,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 + - STALE_TTL(header, rbtdb))) + (now != 0 && now > header->rdh_ttl)) { header = NULL; } @@ -8841,9 +8838,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; }