From: Pieter Lexis Date: Mon, 10 Jul 2017 11:29:49 +0000 (+0200) Subject: rec: Dump RRSIGs from record cache X-Git-Tag: rec-4.0.7~12^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1035b39e2b42eee0774028d02b907b909e88e703;p=pdns rec: Dump RRSIGs from record cache --- diff --git a/pdns/recursor_cache.cc b/pdns/recursor_cache.cc index d3178beb3..30417546a 100644 --- a/pdns/recursor_cache.cc +++ b/pdns/recursor_cache.cc @@ -295,6 +295,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;