From: Otto Moerbeek Date: Fri, 1 Jul 2022 11:18:58 +0000 (+0200) Subject: Remove > 5 check on ttl of glue from the cache. X-Git-Tag: auth-4.8.0-alpha0~32^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F11744%2Fhead;p=thirdparty%2Fpdns.git Remove > 5 check on ttl of glue from the cache. This makes the view of the record cache consistent with what syncres thinks. This > 5 has been there since https://github.com/PowerDNS/pdns/commit/7bf2638379826e89d655194bf5834bd7deda450a I *suppose* it was to prevent access data from the cache while it could be cleaned. But these days we copy data from the cache, so no need for that. --- diff --git a/pdns/syncres.cc b/pdns/syncres.cc index 856033da17..0ec7e29adc 100644 --- a/pdns/syncres.cc +++ b/pdns/syncres.cc @@ -2220,7 +2220,7 @@ void SyncRes::getBestNSFromCache(const DNSName &qname, const QType qtype, vector const DNSRecord& dr=*k; auto nrr = getRR(dr); if(nrr && (!nrr->getNS().isPartOf(subdomain) || g_recCache->get(d_now.tv_sec, nrr->getNS(), nsqt, - false, doLog() ? &aset : 0, d_cacheRemote, false, d_routingTag) > 5)) { + false, doLog() ? &aset : 0, d_cacheRemote, false, d_routingTag) > 0)) { bestns.push_back(dr); LOG(prefix< '"<getNS()<<"'"<getNS().isPartOf(subdomain));