]> granicus.if.org Git - pdns/commitdiff
don't sweat tailing dots on SOA records in checkZone
authorbert hubert <bert.hubert@netherlabs.nl>
Fri, 29 Jan 2016 12:29:20 +0000 (13:29 +0100)
committerbert hubert <bert.hubert@netherlabs.nl>
Fri, 29 Jan 2016 12:29:20 +0000 (13:29 +0100)
pdns/pdnsutil.cc

index 8ceb2f1f8b9649cf94dfa835392fdbe50acc3804..f6b2071eba6e01120d0a9c32c2257ff98d8a3d52 100644 (file)
@@ -495,8 +495,13 @@ int checkZone(DNSSECKeeper &dk, UeberBackend &B, const DNSName& zone, const vect
       tmp = drc->getZoneRepresentation(true);
       if (rr.qtype.getCode() != QType::AAAA) {
         if (!pdns_iequals(tmp, rr.content)) {
-          cout<<"[Warning] Parsed and original record content are not equal: "<<rr.qname.toString()<<" IN " <<rr.qtype.getName()<< " '" << rr.content<<"' (Content parsed as '"<<tmp<<"')"<<endl;
-          numwarnings++;
+          if(rr.qtype.getCode() == QType::SOA) {
+            tmp = drc->getZoneRepresentation(false);
+          }
+          if(!pdns_iequals(tmp, rr.content)) {
+            cout<<"[Warning] Parsed and original record content are not equal: "<<rr.qname.toString()<<" IN " <<rr.qtype.getName()<< " '" << rr.content<<"' (Content parsed as '"<<tmp<<"')"<<endl;
+            numwarnings++;
+          }
         }
       } else {
         struct in6_addr tmpbuf;