From ee5e1751e088a0424a673ff10e93aae7e9d9a7ed Mon Sep 17 00:00:00 2001 From: bert hubert Date: Wed, 29 May 2013 16:25:11 +0200 Subject: [PATCH] and add support for not query-caching scopemasked answers --- pdns/ueberbackend.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pdns/ueberbackend.cc b/pdns/ueberbackend.cc index 4f73028ff..9d2a35ac2 100644 --- a/pdns/ueberbackend.cc +++ b/pdns/ueberbackend.cc @@ -347,6 +347,7 @@ void UeberBackend::addNegCache(const Question &q) static int negqueryttl=::arg().asNum("negquery-cache-ttl"); if(!negqueryttl) return; + // we should also not be storing negative answers if a pipebackend does scopeMask, but we can't pass a negative scopeMask in an empty set! PC.insert(q.qname, q.qtype, PacketCache::QUERYCACHE, "", negqueryttl, q.zoneId); } @@ -367,6 +368,8 @@ void UeberBackend::addCache(const Question &q, const vector & BOOST_FOREACH(DNSResourceRecord rr, rrs) { if (rr.ttl < queryttl) cachettl = rr.ttl; + if (rr.scopeMask) + return; } boa << rrs; -- 2.40.0