]> granicus.if.org Git - pdns/commitdiff
fix back the scopemask stuff we removed from the ueberbackend query cache
authorbert hubert <bert.hubert@netherlabs.nl>
Thu, 26 Nov 2015 10:57:06 +0000 (11:57 +0100)
committerPieter Lexis <pieter.lexis@powerdns.com>
Thu, 26 Nov 2015 16:06:06 +0000 (17:06 +0100)
pdns/ueberbackend.cc

index 0c8c3783fcd510920debfebe62849d9cbc685ec6..6de8c33eac731ca0e0ddd365d648b8c1c2b2127f 100644 (file)
@@ -464,6 +464,13 @@ void UeberBackend::addCache(const Question &q, const vector<DNSResourceRecord> &
     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);
 }