From: bert hubert Date: Thu, 26 Nov 2015 10:57:06 +0000 (+0100) Subject: fix back the scopemask stuff we removed from the ueberbackend query cache X-Git-Tag: dnsdist-1.0.0-alpha1~190^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=429ae4cb4c414dce7061b9e24bb4d8095fbdf324;p=thirdparty%2Fpdns.git fix back the scopemask stuff we removed from the ueberbackend query cache --- diff --git a/pdns/ueberbackend.cc b/pdns/ueberbackend.cc index 0c8c3783fc..6de8c33eac 100644 --- a/pdns/ueberbackend.cc +++ b/pdns/ueberbackend.cc @@ -464,6 +464,13 @@ void UeberBackend::addCache(const Question &q, const vector & return; unsigned int store_ttl = d_cache_ttl; + for(const DNSResourceRecord& rr : rrs) { + if (rr.ttl < d_cache_ttl) + store_ttl = rr.ttl; + if (rr.scopeMask) + return; + } + PC.insert(q.qname, q.qtype, PacketCache::QUERYCACHE, rrs, store_ttl, q.zoneId); }