mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 22:15:20 +00:00
Include expired rdatasets in iteration functions
By changing the check in 'rdatasetiter_first' and 'rdatasetiter_next' from "now > header->rdh_ttl" to "now - RBDTB_VIRTUAL > header->rdh_ttl" we include expired rdataset entries so that they can be used for "rndc dumpdb -expired".
This commit is contained in:
@@ -9125,13 +9125,13 @@ rdatasetiter_first(dns_rdatasetiter_t *iterator) {
|
||||
*
|
||||
* Note: unlike everywhere else, we
|
||||
* check for now > header->rdh_ttl instead
|
||||
* of now >= header->rdh_ttl. This allows
|
||||
* ANY and RRSIG queries for 0 TTL
|
||||
* rdatasets to work.
|
||||
* of ">=". This allows ANY and RRSIG
|
||||
* queries for 0 TTL rdatasets to work.
|
||||
*/
|
||||
if (NONEXISTENT(header) ||
|
||||
(now != 0 &&
|
||||
now > header->rdh_ttl +
|
||||
(now - RBTDB_VIRTUAL) >
|
||||
header->rdh_ttl +
|
||||
rbtdb->serve_stale_ttl))
|
||||
{
|
||||
header = NULL;
|
||||
@@ -9209,12 +9209,13 @@ rdatasetiter_next(dns_rdatasetiter_t *iterator) {
|
||||
*
|
||||
* Note: unlike everywhere else, we
|
||||
* check for now > header->ttl instead
|
||||
* of now >= header->ttl. This allows
|
||||
* ANY and RRSIG queries for 0 TTL
|
||||
* rdatasets to work.
|
||||
* of ">=". This allows ANY and RRSIG
|
||||
* queries for 0 TTL rdatasets to work.
|
||||
*/
|
||||
if (NONEXISTENT(header) ||
|
||||
(now != 0 && now > header->rdh_ttl))
|
||||
(now != 0 &&
|
||||
(now - RBTDB_VIRTUAL) >
|
||||
header->rdh_ttl))
|
||||
{
|
||||
header = NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user