mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-02 07:35:26 +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
|
* Note: unlike everywhere else, we
|
||||||
* check for now > header->rdh_ttl instead
|
* check for now > header->rdh_ttl instead
|
||||||
* of now >= header->rdh_ttl. This allows
|
* of ">=". This allows ANY and RRSIG
|
||||||
* ANY and RRSIG queries for 0 TTL
|
* queries for 0 TTL rdatasets to work.
|
||||||
* rdatasets to work.
|
|
||||||
*/
|
*/
|
||||||
if (NONEXISTENT(header) ||
|
if (NONEXISTENT(header) ||
|
||||||
(now != 0 &&
|
(now != 0 &&
|
||||||
now > header->rdh_ttl +
|
(now - RBTDB_VIRTUAL) >
|
||||||
|
header->rdh_ttl +
|
||||||
rbtdb->serve_stale_ttl))
|
rbtdb->serve_stale_ttl))
|
||||||
{
|
{
|
||||||
header = NULL;
|
header = NULL;
|
||||||
@@ -9209,12 +9209,13 @@ rdatasetiter_next(dns_rdatasetiter_t *iterator) {
|
|||||||
*
|
*
|
||||||
* Note: unlike everywhere else, we
|
* Note: unlike everywhere else, we
|
||||||
* check for now > header->ttl instead
|
* check for now > header->ttl instead
|
||||||
* of now >= header->ttl. This allows
|
* of ">=". This allows ANY and RRSIG
|
||||||
* ANY and RRSIG queries for 0 TTL
|
* queries for 0 TTL rdatasets to work.
|
||||||
* rdatasets to work.
|
|
||||||
*/
|
*/
|
||||||
if (NONEXISTENT(header) ||
|
if (NONEXISTENT(header) ||
|
||||||
(now != 0 && now > header->rdh_ttl))
|
(now != 0 &&
|
||||||
|
(now - RBTDB_VIRTUAL) >
|
||||||
|
header->rdh_ttl))
|
||||||
{
|
{
|
||||||
header = NULL;
|
header = NULL;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user