]> 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>
Thu, 22 Feb 2018 10:17:52 +0000 (11:17 +0100)
Fixes #6064

pdns/pdnsutil.cc

index f4e37ab624d435ebafb89853e112c2e94d85b78c..f8d93fe3e568845faf297cba9b90d75c49ecc7f5 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++;