From: Kees Monshouwer Date: Mon, 9 Sep 2013 21:17:46 +0000 (+0200) Subject: pdnssec check-all-zones now detect ttl differnce within a rrset X-Git-Tag: rec-3.6.0-rc1~447^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f1b672ae86e4a4f611c100701c5519b849701667;p=pdns pdnssec check-all-zones now detect ttl differnce within a rrset --- diff --git a/pdns/pdnssec.cc b/pdns/pdnssec.cc index 345414249..29453ea13 100644 --- a/pdns/pdnssec.cc +++ b/pdns/pdnssec.cc @@ -340,36 +340,49 @@ int checkZone(DNSSECKeeper &dk, UeberBackend &B, const std::string& zone) sd.db->list(zone, sd.domain_id); DNSResourceRecord rr; uint64_t numrecords=0, numerrors=0, numwarnings=0; - + set records, cnames, noncnames; + map ttl; + + ostringstream content; + pair::iterator,bool> ret; while(sd.db->get(rr)) { + if(!rr.qtype.getCode()) + continue; + if(!endsOn(rr.qname, zone)) { - cout<<"[Warning] The record "<(content.str(), rr.ttl)); + if (ret.second==false && ret.first->second != rr.ttl) { + cout<<"[Error] TTL mismatch in rrset '"<second<<" <> "<