]> granicus.if.org Git - pdns/commitdiff
make check-zone error on records that have content but shouldn't.
authorPeter van Dijk <peter.van.dijk@powerdns.com>
Thu, 22 Feb 2018 10:14:16 +0000 (11:14 +0100)
committerPeter van Dijk <peter.van.dijk@powerdns.com>
Tue, 1 May 2018 13:56:40 +0000 (15:56 +0200)
Fixes #6064

(cherry picked from commit decc573db598d941a562aca33fa58b9f03df6406)

pdns/pdnsutil.cc

index f409fd05918e3ea18061f2642a14ec9cb84777e3..f2d4f67efcd0fd29c6ccb4bdac86d4a28b4748c8 100644 (file)
@@ -299,8 +299,13 @@ int checkZone(DNSSECKeeper &dk, UeberBackend &B, const DNSName& zone, const vect
     records=*suppliedrecords;
 
   for(auto rr : records) { // we modify this
-    if(!rr.qtype.getCode())
+    if(!rr.qtype.getCode()) {
+      if(rr.content.length()) {
+        cout<<"[Error] ENT (or unknown type) has content: "<<rr.qname<<" IN " <<rr.qtype.getName()<< " '" << rr.content<<"'"<<endl;
+        numerrors++;
+      }
       continue;
+    }
 
     numrecords++;