]> granicus.if.org Git - pdns/commitdiff
rec: Dump the correct NSEC record type for negative cache entries
authorRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 20 Nov 2017 08:55:50 +0000 (09:55 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 20 Nov 2017 08:55:50 +0000 (09:55 +0100)
pdns/recursordist/negcache.cc

index 158285e8c03c31bcb12ddd9c4eed7a2a3e3124ff..28531923eea4184cf00285ca0c8de1c9e8611d3b 100644 (file)
@@ -188,7 +188,7 @@ uint64_t NegCache::dumpToFile(FILE* fp) {
     ret++;
     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]);
+      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(rec.d_type).c_str(), rec.d_content->getZoneRepresentation().c_str(), vStates[ne.d_validationState]);
     }
     for (const auto& sig : ne.DNSSECRecords.signatures) {
       fprintf(fp, "%s %" PRId64 " IN RRSIG %s ;\n", ne.d_name.toString().c_str(), static_cast<int64_t>(ne.d_ttd - now), sig.d_content->getZoneRepresentation().c_str());