From: Kees Monshouwer Date: Sun, 29 Sep 2013 11:45:45 +0000 (+0200) Subject: pdnssec check-zone, check for missing NS at apex and records in unlikely places X-Git-Tag: rec-3.6.0-rc1~430^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1e2e9565255a42fe9618fd613d71003361f07e96;p=pdns pdnssec check-zone, check for missing NS at apex and records in unlikely places --- diff --git a/pdns/pdnssec.cc b/pdns/pdnssec.cc index 6cfc259a1..e585a5b97 100644 --- a/pdns/pdnssec.cc +++ b/pdns/pdnssec.cc @@ -343,6 +343,8 @@ int checkZone(DNSSECKeeper &dk, UeberBackend &B, const std::string& zone) DNSResourceRecord rr; uint64_t numrecords=0, numerrors=0, numwarnings=0; + + bool hasNsAtApex = false; set records, cnames, noncnames; map ttl; @@ -386,6 +388,24 @@ int checkZone(DNSSECKeeper &dk, UeberBackend &B, const std::string& zone) continue; } + if(pdns_iequals(rr.qname, zone)) { + if (rr.qtype.getCode() == QType::NS) { + hasNsAtApex=true; + } else if (rr.qtype.getCode() == QType::DS) { + cout<<"[Warning] DS at apex in zone '"<