]> granicus.if.org Git - pdns/commitdiff
pdnssec check-zone, warn if parsed and original content are not equal
authorKees Monshouwer <mind04@monshouwer.org>
Sun, 29 Sep 2013 11:11:29 +0000 (13:11 +0200)
committermind04 <mind04@monshouwer.org>
Sun, 29 Sep 2013 11:11:29 +0000 (13:11 +0200)
pdns/pdnssec.cc

index 8769c2340021487a945de28d32a00cc952394850..6cfc259a1826b762ea337826bcba4bb226ca9bc2 100644 (file)
@@ -463,6 +463,11 @@ int checkZone(DNSSECKeeper &dk, UeberBackend &B, const std::string& zone)
     try {
       shared_ptr<DNSRecordContent> drc(DNSRecordContent::mastermake(rr.qtype.getCode(), 1, rr.content));
       string tmp=drc->serialize(rr.qname);
+      tmp = drc->getZoneRepresentation();
+      if (!pdns_iequals(tmp, rr.content)) {
+        cout<<"[Warning] Parsed and original record content are not equal: "<<rr.qname<<" IN " <<rr.qtype.getName()<< " '" << rr.content<<"' (Content parsed as '"<<tmp<<"')"<<endl;
+        numwarnings++;
+      }
     }
     catch(std::exception& e)
     {