From: Remi Gacogne Date: Fri, 21 Aug 2020 09:46:31 +0000 (+0200) Subject: auth: Make sure that d_question is initialized even with !cachedOk X-Git-Tag: auth-4.4.0-alpha2~8^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8b72885144998628d97fe159f3915b16aad2c628;p=thirdparty%2Fpdns.git auth: Make sure that d_question is initialized even with !cachedOk --- diff --git a/pdns/ueberbackend.cc b/pdns/ueberbackend.cc index 2b1764e23f..0a897649db 100644 --- a/pdns/ueberbackend.cc +++ b/pdns/ueberbackend.cc @@ -315,11 +315,12 @@ bool UeberBackend::getAuth(const DNSName &target, const QType& qtype, SOAData* s vector > bestmatch (backends.size(), make_pair(target.wirelength()+1, SOAData())); do { + d_question.qtype = QType::SOA; + d_question.qname = shorter; + d_question.zoneId = -1; + // Check cache if(cachedOk && (d_cache_ttl || d_negcache_ttl)) { - d_question.qtype = QType::SOA; - d_question.qname = shorter; - d_question.zoneId = -1; cstat = cacheHas(d_question,d_answers);