From f4b3cb5612e4e54a233bed5a3acf0697903f8f71 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Fri, 18 Feb 2022 16:24:11 +0100 Subject: [PATCH] QType ADDR is supposed to be used internally only. Should fix #11337 (cherry picked from commit 7a278799ee23e582c3b722cea578699db1791bc2) --- pdns/recursor_cache.cc | 8 +++++++- pdns/recursordist/rec-taskqueue.cc | 8 ++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/pdns/recursor_cache.cc b/pdns/recursor_cache.cc index 598f226015..d881d20a00 100644 --- a/pdns/recursor_cache.cc +++ b/pdns/recursor_cache.cc @@ -261,7 +261,13 @@ time_t MemRecursorCache::fakeTTD(MemRecursorCache::OrderedTagIterator_t& entry, return -1; } else { if (!entry->d_submitted) { - pushTask(qname, qtype, entry->d_ttd); + if (qtype == QType::ADDR) { + pushTask(qname, QType::A, entry->d_ttd); + pushTask(qname, QType::AAAA, entry->d_ttd); + } + else { + pushTask(qname, qtype, entry->d_ttd); + } entry->d_submitted = true; } } diff --git a/pdns/recursordist/rec-taskqueue.cc b/pdns/recursordist/rec-taskqueue.cc index 6b33aba0c2..1bbea4f96c 100644 --- a/pdns/recursordist/rec-taskqueue.cc +++ b/pdns/recursordist/rec-taskqueue.cc @@ -32,6 +32,14 @@ void runTaskOnce(bool logErrors) void pushTask(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; + } t_taskQueue.push({qname, qtype, deadline, true}); } -- 2.47.2