]> git.ipfire.org Git - thirdparty/pdns.git/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>
Fri, 22 Nov 2013 08:07:08 +0000 (09:07 +0100)
pdns/pdnssec.cc

index 147b61d3d907288c5e7922f10656b202a567a835..52e6bb24a165f71489b7ecd18556615d5f75215d 100644 (file)
@@ -460,6 +460,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)
     {