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.7.0-alpha1~5^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a278799ee23e582c3b722cea578699db1791bc2;p=thirdparty%2Fpdns.git QType ADDR is supposed to be used internally only. Should fix #11337 --- diff --git a/pdns/recursor_cache.cc b/pdns/recursor_cache.cc index 596ccbea91..cc3d5dfa86 100644 --- a/pdns/recursor_cache.cc +++ b/pdns/recursor_cache.cc @@ -252,7 +252,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 4180f0146d..d88e753563 100644 --- a/pdns/recursordist/rec-taskqueue.cc +++ b/pdns/recursordist/rec-taskqueue.cc @@ -181,6 +181,14 @@ void runTaskOnce(bool logErrors) void pushAlmostExpiredTask(const DNSName& qname, uint16_t qtype, time_t deadline) { + 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}; s_taskQueue.lock()->queue.push(std::move(task)); ++s_almost_expired_tasks.pushed;