From 429ae4cb4c414dce7061b9e24bb4d8095fbdf324 Mon Sep 17 00:00:00 2001 From: bert hubert Date: Thu, 26 Nov 2015 11:57:06 +0100 Subject: [PATCH] fix back the scopemask stuff we removed from the ueberbackend query cache --- pdns/ueberbackend.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pdns/ueberbackend.cc b/pdns/ueberbackend.cc index 0c8c3783f..6de8c33ea 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); } -- 2.40.0