From: Otto Moerbeek Date: Fri, 18 Feb 2022 15:24:11 +0000 (+0100) Subject: QType ADDR is supposed to be used internally only. X-Git-Tag: rec-4.6.2~5^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F11363%2Fhead;p=thirdparty%2Fpdns.git QType ADDR is supposed to be used internally only. Should fix #11337 (cherry picked from commit 7a278799ee23e582c3b722cea578699db1791bc2) --- diff --git a/pdns/recursor_cache.cc b/pdns/recursor_cache.cc index e3df984796..b20be391b1 100644 --- a/pdns/recursor_cache.cc +++ b/pdns/recursor_cache.cc @@ -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; } } diff --git a/pdns/recursordist/rec-taskqueue.cc b/pdns/recursordist/rec-taskqueue.cc index 000af77dd6..a737de2e24 100644 --- a/pdns/recursordist/rec-taskqueue.cc +++ b/pdns/recursordist/rec-taskqueue.cc @@ -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)); }