Properly select active rdatasets when iterating across node

Active rdatasets where not being properly selected in rdatasetiter_first
and rdatasetiter_next.
This commit is contained in:
Mark Andrews 2022-11-16 10:09:56 +11:00
parent e49f83499a
commit 3bdab2d111

View file

@ -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;
}