From: Kees Monshouwer Date: Mon, 9 Sep 2013 22:20:32 +0000 (+0200) Subject: make pdnssec check-all-zones case independent (Issue #684) X-Git-Tag: rec-3.6.0-rc1~447^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bb0bbee2430b12f77e5c94735e47bab3cec1b769;p=pdns make pdnssec check-all-zones case independent (Issue #684) --- diff --git a/pdns/pdnssec.cc b/pdns/pdnssec.cc index 29453ea13..8abcb8e3e 100644 --- a/pdns/pdnssec.cc +++ b/pdns/pdnssec.cc @@ -336,65 +336,72 @@ int checkZone(DNSSECKeeper &dk, UeberBackend &B, const std::string& zone) if(!B.getSOA(zone, sd)) { cout<<"No SOA for zone '"<list(zone, sd.domain_id); DNSResourceRecord rr; uint64_t numrecords=0, numerrors=0, numwarnings=0; set records, cnames, noncnames; - map ttl; + map ttl; ostringstream content; - pair::iterator,bool> ret; + 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<<" <> "<(toLower(content.str()), rr.ttl)); + if (ret.second == false && ret.first->second != rr.ttl) { + cout<<"[Error] TTL mismatch in rrset: '"<second<<" != "<(rr.priority)+" "+rr.content; if ( (rr.qtype.getCode() == QType::NS || rr.qtype.getCode() == QType::SRV || rr.qtype.getCode() == QType::MX || rr.qtype.getCode() == QType::CNAME) && @@ -451,8 +452,8 @@ int checkZone(DNSSECKeeper &dk, UeberBackend &B, const std::string& zone) } if(rr.qtype.getCode() == QType::TXT && !rr.content.empty() && rr.content[0]!='"') - rr.content = "\""+rr.content+"\""; - + rr.content = "\""+rr.content+"\""; + if(rr.auth == 0 && rr.qtype.getCode()!=QType::NS && rr.qtype.getCode()!=QType::A && rr.qtype.getCode()!=QType::AAAA) { cout<<"[Error] Following record is auth=0, run pdnssec rectify-zone?: "< drc(DNSRecordContent::mastermake(rr.qtype.getCode(), 1, rr.content)); string tmp=drc->serialize(rr.qname); } - catch(std::exception& e) + catch(std::exception& e) { cout<<"[Error] Following record had a problem: "<