From c83dc46118bca2913baaa2f76dd422ac195b3b14 Mon Sep 17 00:00:00 2001 From: Otto Date: Fri, 9 Apr 2021 11:50:29 +0200 Subject: [PATCH] Do not test the individual records' ttls, they should be consistent with the ttl of the cache entry itself. --- pdns/syncres.cc | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/pdns/syncres.cc b/pdns/syncres.cc index 87329f9ac9..b822efc648 100644 --- a/pdns/syncres.cc +++ b/pdns/syncres.cc @@ -1078,19 +1078,15 @@ vector SyncRes::getAddrs(const DNSName &qname, unsigned int depth, res_t cset; if (s_doIPv4 && g_recCache->get(d_now.tv_sec, qname, QType::A, false, &cset, d_cacheRemote, d_refresh, d_routingTag) > 0) { for (const auto &i : cset) { - if (i.d_ttl > (unsigned int)d_now.tv_sec ) { - if (auto rec = getRR(i)) { - ret.push_back(rec->getCA(53)); - } + if (auto rec = getRR(i)) { + ret.push_back(rec->getCA(53)); } } } if (s_doIPv6 && g_recCache->get(d_now.tv_sec, qname, QType::AAAA, false, &cset, d_cacheRemote, d_refresh, d_routingTag) > 0) { for (const auto &i : cset) { - if (i.d_ttl > (unsigned int)d_now.tv_sec ) { - if (auto rec = getRR(i)) { - ret.push_back(rec->getCA(53)); - } + if (auto rec = getRR(i)) { + ret.push_back(rec->getCA(53)); } } } -- 2.47.2