}
}
- if(qtype != QType::DS && doCNAMECacheCheck(qname,qtype,ret,depth,res)) // will reroute us if needed
+ if(!d_skipCNAMECheck && doCNAMECacheCheck(qname,qtype,ret,depth,res)) // will reroute us if needed
return res;
if(doCacheCheck(qname,qtype,ret,depth,res)) // we done
return d_wasOutOfBand;
}
+ void setSkipCNAMECheck(bool skip = false)
+ {
+ d_skipCNAMECheck = skip;
+ }
+
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_wasVariable{false};
bool d_wasOutOfBand{false};
bool d_wantsRPZ{true};
+ bool d_skipCNAMECheck{false};
typedef multi_index_container <
NegCacheEntry,
sr.setId(MT->getTid());
vector<DNSRecord> ret;
sr.d_doDNSSEC=true;
+ if (qtype == QType::DS || qtype == QType::DNSKEY || qtype == QType::NS)
+ sr.setSkipCNAMECheck(true);
sr.beginResolve(qname, QType(qtype), 1, ret);
d_queries += sr.d_outqueries;
return ret;