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.1.0-alpha1~16^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d50e9bc835be204a27e4d44eb2b98296c70fd499;p=pdns rec: Dump RRSIGs from record cache --- 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;