From 77da04f61fa75606ef0db1eb303e57a7a3e219cf Mon Sep 17 00:00:00 2001 From: Kees Monshouwer Date: Sun, 29 Sep 2013 19:06:35 +0200 Subject: [PATCH] pdnssec check-zone, improve duplicate checks --- pdns/pdnssec.cc | 50 ++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/pdns/pdnssec.cc b/pdns/pdnssec.cc index 90552ee51..d4e4714bb 100644 --- a/pdns/pdnssec.cc +++ b/pdns/pdnssec.cc @@ -372,11 +372,32 @@ int checkZone(DNSSECKeeper &dk, UeberBackend &B, const std::string& zone) rr.content=o.str(); } + if(rr.qtype.getCode() == QType::MX || rr.qtype.getCode() == QType::SRV) + rr.content = lexical_cast(rr.priority)+" "+rr.content; + + if(rr.qtype.getCode() == QType::TXT && !rr.content.empty() && rr.content[0]!='"') + rr.content = "\""+rr.content+"\""; + + try { + shared_ptr drc(DNSRecordContent::mastermake(rr.qtype.getCode(), 1, rr.content)); + string tmp=drc->serialize(rr.qname); + tmp = drc->getZoneRepresentation(); + if (!pdns_iequals(tmp, rr.content)) { + cout<<"[Warning] Parsed and original record content are not equal: "<(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) && rr.content[rr.content.size()-1] == '.') { cout<<"[Warning] The record "< drc(DNSRecordContent::mastermake(rr.qtype.getCode(), 1, rr.content)); - string tmp=drc->serialize(rr.qname); - tmp = drc->getZoneRepresentation(); - if (!pdns_iequals(tmp, rr.content)) { - cout<<"[Warning] Parsed and original record content are not equal: "<