From: bert hubert Date: Wed, 29 May 2013 14:25:11 +0000 (+0200) Subject: and add support for not query-caching scopemasked answers X-Git-Tag: auth-3.3-rc2~65^2^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ee5e1751e088a0424a673ff10e93aae7e9d9a7ed;p=thirdparty%2Fpdns.git and add support for not query-caching scopemasked answers --- diff --git a/pdns/ueberbackend.cc b/pdns/ueberbackend.cc index 4f73028ff4..9d2a35ac25 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;