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: auth-3.3.1~34^2~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=08f3452fc325412d03e63ce45e524f29f0de4629;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 52e6bb24a..ddfc784c2 100644 --- a/pdns/pdnssec.cc +++ b/pdns/pdnssec.cc @@ -340,6 +340,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; @@ -383,6 +385,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 '"<