return rcode==0 || rcode==3;
}
-set<pair<string,uint16_t> > s_origbetterset;
+set<pair<DNSName,uint16_t> > s_origbetterset;
bool isRootReferral(const MOADNSParser::answers_t& answers)
{
// cerr<<(int)iter->first.d_place<<", "<<iter->first.d_label<<" "<<iter->first.d_type<<", # "<<answers.size()<<endl;
if(iter->first.d_place!=2)
ok=false;
- if(iter->first.d_label!="." || iter->first.d_type!=QType::NS)
+ if(!iter->first.d_label.isRoot() || iter->first.d_type!=QType::NS)
ok=false;
}
return ok;
s_origbetter++;
if(!g_quiet)
if(s_origbetterset.insert(make_pair(qd.d_qi.d_qname, qd.d_qi.d_qtype)).second) {
- cout<<"orig better: " << qd.d_qi.d_qname<<" "<< qd.d_qi.d_qtype<<endl;
+ cout<<"orig better: " << qd.d_qi.d_qname.toString()<<" "<< qd.d_qi.d_qtype<<endl;
}
}
if(!g_quiet) {
cout<<"orig: rcode="<<qd.d_origRcode<<"\n";
for(set<DNSRecord>::const_iterator i=canonicOrig.begin(); i!=canonicOrig.end(); ++i)
- cout<<"\t"<<i->d_label<<"\t"<<DNSRecordContent::NumberToType(i->d_type)<<"\t'" << (i->d_content ? i->d_content->getZoneRepresentation() : "") <<"'\n";
+ cout<<"\t"<<i->d_label.toString()<<"\t"<<DNSRecordContent::NumberToType(i->d_type)<<"\t'" << (i->d_content ? i->d_content->getZoneRepresentation() : "") <<"'\n";
cout<<"new: rcode="<<qd.d_newRcode<<"\n";
for(set<DNSRecord>::const_iterator i=canonicNew.begin(); i!=canonicNew.end(); ++i)
- cout<<"\t"<<i->d_label<<"\t"<<DNSRecordContent::NumberToType(i->d_type)<<"\t'" << (i->d_content ? i->d_content->getZoneRepresentation() : "") <<"'\n";
+ cout<<"\t"<<i->d_label.toString()<<"\t"<<DNSRecordContent::NumberToType(i->d_type)<<"\t'" << (i->d_content ? i->d_content->getZoneRepresentation() : "") <<"'\n";
cout<<"\n";
cout<<"-\n";
qids_by_id_index_t::const_iterator found=idindex.find(ntohs(mdp.d_header.id));
if(found == idindex.end()) {
if(!g_quiet)
- cout<<"Received an answer ("<<mdp.d_qname<<") from reference nameserver with id "<<mdp.d_header.id<<" which we can't match to a question!"<<endl;
+ cout<<"Received an answer ("<<mdp.d_qname.toString()<<") from reference nameserver with id "<<mdp.d_header.id<<" which we can't match to a question!"<<endl;
s_weunmatched++;
continue;
}