]> granicus.if.org Git - pdns/commitdiff
rec: Add the validation status when dumping the negative cache
authorRemi Gacogne <remi.gacogne@powerdns.com>
Sun, 19 Nov 2017 19:22:47 +0000 (20:22 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 20 Nov 2017 08:45:20 +0000 (09:45 +0100)
pdns/recursordist/negcache.cc

index 9df2ece3c01b42343822f0453edd170c704c1ccc..158285e8c03c31bcb12ddd9c4eed7a2a3e3124ff 100644 (file)
@@ -186,7 +186,7 @@ uint64_t NegCache::dumpToFile(FILE* fp) {
   negcache_sequence_t& sidx = d_negcache.get<1>();
   for(const NegCacheEntry& ne : sidx) {
     ret++;
-    fprintf(fp, "%s %d IN %s VIA %s\n", ne.d_name.toString().c_str(), (unsigned int) (ne.d_ttd - now), ne.d_qtype.getName().c_str(), ne.d_auth.toString().c_str());
+    fprintf(fp, "%s %d IN %s VIA %s ; (%s)\n", ne.d_name.toString().c_str(), (unsigned int) (ne.d_ttd - now), ne.d_qtype.getName().c_str(), ne.d_auth.toString().c_str(), vStates[ne.d_validationState]);
     for (const auto& rec : ne.DNSSECRecords.records) {
       fprintf(fp, "%s %" PRId64 " IN %s %s ; (%s)\n", ne.d_name.toString().c_str(), static_cast<int64_t>(ne.d_ttd - now), DNSRecordContent::NumberToType(ne.d_qtype.getCode()).c_str(), rec.d_content->getZoneRepresentation().c_str(), vStates[ne.d_validationState]);
     }