]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
auth: Make sure that d_question is initialized even with !cachedOk
authorRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 21 Aug 2020 09:46:31 +0000 (11:46 +0200)
committermind04 <mind04@monshouwer.org>
Tue, 27 Oct 2020 08:04:19 +0000 (09:04 +0100)
pdns/ueberbackend.cc

index 2b1764e23f01ae8f557def235a8f86803ad2594b..0a897649db909fdbe4f79edd617b03929de3c2ce 100644 (file)
@@ -315,11 +315,12 @@ bool UeberBackend::getAuth(const DNSName &target, const QType& qtype, SOAData* s
   vector<pair<size_t, SOAData> > 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);