From d50e9bc835be204a27e4d44eb2b98296c70fd499 Mon Sep 17 00:00:00 2001 From: Pieter Lexis Date: Mon, 10 Jul 2017 13:29:49 +0200 Subject: [PATCH] rec: Dump RRSIGs from record cache --- pdns/recursor_cache.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pdns/recursor_cache.cc b/pdns/recursor_cache.cc index e78c98639..0146bd111 100644 --- a/pdns/recursor_cache.cc +++ b/pdns/recursor_cache.cc @@ -456,6 +456,15 @@ uint64_t MemRecursorCache::doDump(int fd) fprintf(fp, "; error printing '%s'\n", i.d_qname.empty() ? "EMPTY" : i.d_qname.toString().c_str()); } } + for(const auto &sig : i.d_signatures) { + count++; + try { + fprintf(fp, "%s %" PRId64 " IN RRSIG %s ; %s\n", i.d_qname.toString().c_str(), static_cast(i.d_ttd - now), sig->getZoneRepresentation().c_str(), i.d_netmask.empty() ? "" : i.d_netmask.toString().c_str()); + } + catch(...) { + fprintf(fp, "; error printing '%s'\n", i.d_qname.empty() ? "EMPTY" : i.d_qname.toString().c_str()); + } + } } fclose(fp); return count; -- 2.40.0