continue;
}
- // Check if we are authoritative for a zone in this answer
- if (!t_sstorage->domainmap->empty()) {
- DNSName tmp_qname(rec.d_name);
- auto auth_domain_iter=getBestAuthZone(&tmp_qname);
- if(auth_domain_iter!=t_sstorage->domainmap->end()) {
- if (auth_domain_iter->first != auth) {
- LOG("NO! - we are authoritative for the zone "<<auth_domain_iter->first.toString()<<endl);
- continue;
- } else {
- // ugly...
- LOG("YES! - This answer was either retrieved from the local auth store or from a server we forward to."<<endl);
- }
- }
- }
-
-
if(rec.d_name.isPartOf(auth)) {
if(lwr.d_aabit && lwr.d_rcode==RCode::NoError && rec.d_place==DNSResourceRecord::ANSWER && g_delegationOnly.check(auth)) {
LOG("NO! Is from delegation-only zone"<<endl);
LOG("RRSIG - separate"<<endl);
}
else {
- LOG("YES!"<<endl);
+ bool haveLogged = false;
+ if (!t_sstorage->domainmap->empty()) {
+ // Check if we are authoritative for a zone in this answer
+ DNSName tmp_qname(rec.d_name);
+ auto auth_domain_iter=getBestAuthZone(&tmp_qname);
+ if(auth_domain_iter!=t_sstorage->domainmap->end()) {
+ if (auth_domain_iter->first != auth) {
+ LOG("NO! - we are authoritative for the zone "<<auth_domain_iter->first.toString()<<endl);
+ continue;
+ } else {
+ LOG("YES! - This answer was ");
+ if (nameservers[*tns].first.empty()) {
+ LOG("retrieved from the local auth store.");
+ } else {
+ LOG("received from a server we forward to.");
+ }
+ haveLogged = true;
+ LOG(endl);
+ }
+ }
+ }
+ if (!haveLogged) {
+ LOG("YES!"<<endl);
+ }
rec.d_ttl=min(s_maxcachettl, rec.d_ttl);