2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

rndc dumpdb -expired: print when RRsets expired

When calling 'rndc dumpdb -expired', also print when the RRset expired.
This commit is contained in:
Matthijs Mekking
2020-09-22 16:09:44 +02:00
parent 1728599684
commit d14c2d0d73
3 changed files with 15 additions and 7 deletions

View File

@@ -1114,7 +1114,15 @@ again:
(rds->stale_ttl -
ctx->serve_stale_ttl));
} else if (ANCIENT(rds)) {
fprintf(f, "; expired (awaiting cleanup)\n");
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->stale_ttl, &b);
fprintf(f,
"; expired since %s "
"(awaiting cleanup)\n",
buf);
}
result = dump_rdataset(mctx, name, rds, ctx, buffer, f);
if (result != ISC_R_SUCCESS) {