Permalink
Browse files

pdnssec check-zone, warn if parsed and original content are not equal

  • Loading branch information...
1 parent 3191709 commit bcf9daf3b7041de0898f2943977ca372ee3dee7a @mind04 mind04 committed with mind04 Sep 29, 2013
Showing with 5 additions and 0 deletions.
  1. +5 −0 pdns/pdnssec.cc
View
@@ -460,6 +460,11 @@ int checkZone(DNSSECKeeper &dk, UeberBackend &B, const std::string& zone)
try {
shared_ptr<DNSRecordContent> 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.qname<<" IN " <<rr.qtype.getName()<< " '" << rr.content<<"' (Content parsed as '"<<tmp<<"')"<<endl;
+ numwarnings++;
+ }
}
catch(std::exception& e)
{

0 comments on commit bcf9daf

Please sign in to comment.