mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 22:15:20 +00:00
Reuse rdatset->ttl when dumping ancient RRsets
Rather than having an expensive 'expired' (fka 'stale_ttl') in the rdataset structure, that is only used to be printed in a comment on ancient RRsets, reuse the TTL field of the RRset.
This commit is contained in:
committed by
Evan Hunt
parent
0cdf85d204
commit
f7f543d99b
@@ -1109,12 +1109,12 @@ again:
|
||||
isc_result_t result;
|
||||
if (STALE(rds)) {
|
||||
fprintf(f, "; stale\n");
|
||||
} else if (ANCIENT(rds) && rds->expired != 0) {
|
||||
} else if (ANCIENT(rds)) {
|
||||
isc_buffer_t b;
|
||||
char buf[sizeof("YYYYMMDDHHMMSS")];
|
||||
memset(buf, 0, sizeof(buf));
|
||||
isc_buffer_init(&b, buf, sizeof(buf) - 1);
|
||||
dns_time64_totext((uint64_t)rds->expired, &b);
|
||||
dns_time64_totext((uint64_t)rds->ttl, &b);
|
||||
fprintf(f,
|
||||
"; expired since %s "
|
||||
"(awaiting cleanup)\n",
|
||||
|
Reference in New Issue
Block a user