Permalink
Browse files

and add support for not query-caching scopemasked answers

  • Loading branch information...
1 parent 606018f commit ee5e1751e088a0424a673ff10e93aae7e9d9a7ed @ahupowerdns ahupowerdns committed May 29, 2013
Showing with 3 additions and 0 deletions.
  1. +3 −0 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<DNSResourceRecord> &
BOOST_FOREACH(DNSResourceRecord rr, rrs) {
if (rr.ttl < queryttl)
cachettl = rr.ttl;
+ if (rr.scopeMask)
+ return;
}
boa << rrs;

0 comments on commit ee5e175

Please sign in to comment.