]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
check-zone: allow null MX, SRV; fixes #6800
authorPeter van Dijk <peter.van.dijk@powerdns.com>
Wed, 8 Aug 2018 13:24:36 +0000 (15:24 +0200)
committerPeter van Dijk <peter.van.dijk@powerdns.com>
Wed, 8 Aug 2018 13:24:36 +0000 (15:24 +0200)
pdns/pdnsutil.cc

index a8ae1c18f1b0ce7527e5c016db709796297c47c2..2a1dc2f651bca9d3b43fdb68007889b36822afe7 100644 (file)
@@ -449,7 +449,9 @@ int checkZone(DNSSECKeeper &dk, UeberBackend &B, const DNSName& zone, const vect
 
       if (toCheck.empty())
         cout<<"[Warning] "<<rr.qtype.getName()<<" record in zone '"<<zone<<"': unable to extract hostname from content."<<endl;
-      else if(!toCheck.isHostname()) {
+      else if ((rr.qtype.getCode() == QType::MX || rr.qtype.getCode() == QType::SRV) && toCheck == g_rootdnsname) {
+        // allow null MX/SRV
+      } else if(!toCheck.isHostname()) {
         cout<<"[Warning] "<<rr.qtype.getName()<<" record in zone '"<<zone<<"' has non-hostname content '"<<toCheck.toString()<<"'."<<endl;
         numwarnings++;
       }