bool tracedQuery=false; // we could consider letting Lua know about this too
bool variableAnswer = false;
+ bool shouldNotValidate = false;
int res;
DNSFilterEngine::Policy dfepol;
break;
}
-
if(!t_pdl->get() || !(*t_pdl)->preresolve(dc->d_remote, dc->d_local, dc->d_mdp.d_qname, QType(dc->d_mdp.d_qtype), dc->d_tcp, ret, dc->d_ednsOpts.empty() ? 0 : &dc->d_ednsOpts, dc->d_tag, &appliedPolicy, &dc->d_policyTags, res, &variableAnswer)) {
try {
res = sr.beginResolve(dc->d_mdp.d_qname, QType(dc->d_mdp.d_qtype), dc->d_mdp.d_qclass, ret);
+ shouldNotValidate = sr.wasOutOfBand();
}
catch(ImmediateServFailException &e) {
if(g_logCommonErrors)
pw.getHeader()->rcode=res;
// Does the validation mode or query demand validation?
- if(g_dnssecmode == DNSSECMode::ValidateAll || g_dnssecmode==DNSSECMode::ValidateForLog || ((dc->d_mdp.d_header.ad || DNSSECOK) && g_dnssecmode==DNSSECMode::Process)) {
+ if(!shouldNotValidate && (g_dnssecmode == DNSSECMode::ValidateAll || g_dnssecmode==DNSSECMode::ValidateForLog || ((dc->d_mdp.d_header.ad || DNSSECOK) && g_dnssecmode==DNSSECMode::Process))) {
try {
if(sr.doLog()) {
L<<Logger::Warning<<"Starting validation of answer to "<<dc->d_mdp.d_qname<<" for "<<dc->d_remote.toStringWithPort()<<endl;
{
s_queries++;
d_wasVariable=false;
+ d_wasOutOfBand=false;
if( (qtype.getCode() == QType::AXFR))
return -1;
else
dr.d_content=shared_ptr<DNSRecordContent>(DNSRecordContent::mastermake(QType::A, 1, "127.0.0.1"));
ret.push_back(dr);
+ d_wasOutOfBand=true;
return 0;
}
dr.d_content=shared_ptr<DNSRecordContent>(DNSRecordContent::mastermake(QType::TXT, 3, "\""+s_serverID+"\""));
ret.push_back(dr);
+ d_wasOutOfBand=true;
return 0;
}
const vector<ComboAddress>& servers = iter->second.d_servers;
if(servers.empty()) {
ret.clear();
- doOOBResolve(qname, qtype, ret, depth, res);
+ d_wasOutOfBand = doOOBResolve(qname, qtype, ret, depth, res);
return res;
}
else {
LWResult lwr;
if(tns->empty() && nameservers[*tns].first.empty() ) {
LOG(prefix<<qname<<": Domain is out-of-band"<<endl);
- doOOBResolve(qname, qtype, lwr.d_records, depth, lwr.d_rcode);
+ d_wasOutOfBand = doOOBResolve(qname, qtype, lwr.d_records, depth, lwr.d_rcode);
lwr.d_tcbit=false;
lwr.d_aabit=true;
}
return d_wasVariable;
}
+ bool wasOutOfBand() const
+ {
+ return d_wasOutOfBand;
+ }
+
int asyncresolveWrapper(const ComboAddress& ip, bool ednsMANDATORY, const DNSName& domain, int type, bool doTCP, bool sendRDQuery, struct timeval* now, boost::optional<Netmask>& srcmask, LWResult* res);
static void doEDNSDumpAndClose(int fd);
bool d_doDNSSEC;
bool d_wasVariable{false};
+ bool d_wasOutOfBand{false};
typedef multi_index_container <
NegCacheEntry,