From: Kees Monshouwer Date: Mon, 9 Sep 2013 19:12:05 +0000 (+0200) Subject: detect duplicate cnames with pdnssec check-all-zones (Issue #545) X-Git-Tag: rec-3.6.0-rc1~447^2~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ca57aa983120a3ebc64d584ab79acfa1fe63ed58;p=thirdparty%2Fpdns.git detect duplicate cnames with pdnssec check-all-zones (Issue #545) --- diff --git a/pdns/pdnssec.cc b/pdns/pdnssec.cc index 7cf4678c41..a8f98e05d3 100644 --- a/pdns/pdnssec.cc +++ b/pdns/pdnssec.cc @@ -352,9 +352,16 @@ int checkZone(DNSSECKeeper &dk, UeberBackend &B, const std::string& zone) if(!rr.qtype.getCode()) continue; - + if (rr.qtype.getCode() == QType::CNAME) { - cnames.insert(rr.qname); + if (!cnames.count(rr.qname)) + cnames.insert(rr.qname); + else + { + cout<<"[Error] Duplicate CNAME found at '"<