]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
QType ADDR is supposed to be used internally only. 11363/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 18 Feb 2022 15:24:11 +0000 (16:24 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 25 Feb 2022 15:22:16 +0000 (16:22 +0100)
Should fix #11337

(cherry picked from commit 7a278799ee23e582c3b722cea578699db1791bc2)

pdns/recursor_cache.cc
pdns/recursordist/rec-taskqueue.cc

index e3df9847966903c41b3ad69f35777fea4c3b5c7d..b20be391b180def0b9912c2db25e774ff4bf9bff 100644 (file)
@@ -248,7 +248,13 @@ time_t MemRecursorCache::fakeTTD(MemRecursorCache::OrderedTagIterator_t& entry,
       }
       else {
         if (!entry->d_submitted) {
-          pushAlmostExpiredTask(qname, qtype, entry->d_ttd);
+          if (qtype == QType::ADDR) {
+            pushAlmostExpiredTask(qname, QType::A, entry->d_ttd);
+            pushAlmostExpiredTask(qname, QType::AAAA, entry->d_ttd);
+          }
+          else {
+            pushAlmostExpiredTask(qname, qtype, entry->d_ttd);
+          }
           entry->d_submitted = true;
         }
       }
index 000af77dd603c6ea2661ada389b6682295e1f9a3..a737de2e24d6c2a2d0fd09ae1cebc39c7f09b9c1 100644 (file)
@@ -76,6 +76,14 @@ void runTaskOnce(bool logErrors)
 void pushAlmostExpiredTask(const DNSName& qname, uint16_t qtype, time_t deadline)
 {
   ++s_almost_expired_tasks_pushed;
+  switch (qtype) {
+    // Internal types
+  case QType::ENT:
+  case QType::ADDR:
+  case QType::ALIAS:
+  case QType::LUA:
+    return;
+  }
   pdns::ResolveTask task{qname, qtype, deadline, true, resolve};
   t_taskQueue.push(std::move(task));
 }