From 3bdab2d111a76b048285bb1db66be04209a1fc6a 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. --- 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 de5d3b170c..c7550b474a 100644 --- a/lib/dns/rbtdb.c +++ b/lib/dns/rbtdb.c @@ -8867,10 +8867,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; } @@ -8950,9 +8947,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; }