return found;
}
-bool UeberBackend::getSOA(const DNSName &domain, SOAData &sd)
-{
- d_question.qtype=QType::SOA;
- d_question.qname=domain;
- d_question.zoneId=-1;
-
- int cstat=cacheHas(d_question,d_answers);
- if(cstat==0) { // negative
- return false;
- }
- else if(cstat==1 && !d_answers.empty()) {
- fillSOAData(d_answers[0],sd);
- sd.domain_id=d_answers[0].domain_id;
- sd.ttl=d_answers[0].dr.d_ttl;
- sd.db = nullptr;
- return true;
- }
-
- // not found in neg. or pos. cache, look it up
- return getSOAUncached(domain, sd);
-}
-
bool UeberBackend::getSOAUncached(const DNSName &domain, SOAData &sd)
{
d_question.qtype=QType::SOA;
/** Determines if we are authoritative for a zone, and at what level */
bool getAuth(const DNSName &target, const QType &qtype, SOAData* sd, bool cachedOk=true);
- bool getSOA(const DNSName &domain, SOAData &sd);
+
/** Load SOA info from backends, ignoring the cache.*/
bool getSOAUncached(const DNSName &domain, SOAData &sd);
bool get(DNSZoneRecord &r);