]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Remove > 5 check on ttl of glue from the cache. 11744/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 1 Jul 2022 11:18:58 +0000 (13:18 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 1 Jul 2022 11:18:58 +0000 (13:18 +0200)
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.

pdns/syncres.cc

index 856033da171b6e22b0aeea0eea8b3cdd69c33177..0ec7e29adc2e48d4e77fd030feccd06b5d22f434 100644 (file)
@@ -2220,7 +2220,7 @@ void SyncRes::getBestNSFromCache(const DNSName &qname, const QType qtype, vector
           const DNSRecord& dr=*k;
          auto nrr = getRR<NSRecordContent>(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<<qname<<": NS (with ip, or non-glue) in cache for '"<<subdomain<<"' -> '"<<nrr->getNS()<<"'"<<endl);
             LOG(prefix<<qname<<": within bailiwick: "<< nrr->getNS().isPartOf(subdomain));