From: Peter van Dijk Date: Wed, 28 Nov 2012 17:56:39 +0000 (+0000) Subject: add CNAME-and-other check to check-zone. Submitted by Ruben d'Arco, closes #613 X-Git-Tag: auth-3.2-rc2~71 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=61717a5121b2416d6173bb70e8ebd05f9392e638;p=pdns add CNAME-and-other check to check-zone. Submitted by Ruben d'Arco, closes #613 git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@2930 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- diff --git a/pdns/pdnssec.cc b/pdns/pdnssec.cc index 9df8e5623..8850e2765 100644 --- a/pdns/pdnssec.cc +++ b/pdns/pdnssec.cc @@ -277,6 +277,8 @@ int checkZone(DNSSECKeeper &dk, UeberBackend &B, const std::string& zone) DNSResourceRecord rr; uint64_t numrecords=0, numerrors=0, numwarnings=0; + set cnames, noncnames; + while(sd.db->get(rr)) { if(!endsOn(rr.qname, zone)) { cout<<"[Warning] The record "<::const_iterator i = cnames.begin(); i != cnames.end(); i++) { + if (noncnames.find(*i) != noncnames.end()) { + cout<<"[Error] CNAME "<<*i<<" found, but other records with same label exist."<