]> granicus.if.org Git - pdns/commitdiff
explicitly warn when no hostname can be gathered
authorPeter van Dijk <peter.van.dijk@powerdns.com>
Thu, 14 Sep 2017 09:31:26 +0000 (11:31 +0200)
committerPeter van Dijk <peter.van.dijk@powerdns.com>
Thu, 14 Sep 2017 09:31:26 +0000 (11:31 +0200)
pdns/pdnsutil.cc

index c3213712d7b09a2531662e29b55bf8e1d9f8a3cc..b7b48ce53f5a2b8e989df8d8a392cd91e85f65f9 100644 (file)
@@ -593,8 +593,10 @@ int checkZone(DNSSECKeeper &dk, UeberBackend &B, const DNSName& zone, const vect
         toCheck = DNSName(rr.content);
       }
 
-      if (!toCheck.empty() && !toCheck.isHostname()) {
-        cout<<"[Warning] "<<rr.qtype.getName()<<" record in zone '"<<zone<<"' has non-hostname content '"<<toCheck<<"'."<<endl;
+      if (toCheck.empty())
+        cout<<"[Warning] "<<rr.qtype.getName()<<" record in zone '"<<zone<<"': unable to extract hostname from content."<<endl;
+      else if(!toCheck.isHostname()) {
+        cout<<"[Warning] "<<rr.qtype.getName()<<" record in zone '"<<zone<<"' has non-hostname content '"<<toCheck.toString()<<"'."<<endl;
         numwarnings++;
       }
     }