]> granicus.if.org Git - pdns/commitdiff
auth: Don't look up the packet cache for TSIG-enabled queries
authorRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 23 Aug 2016 13:51:11 +0000 (15:51 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 23 Aug 2016 13:51:11 +0000 (15:51 +0200)
We are rightfully careful about not caching responses for TSIG-enabled
queries, but we would nevertheless happily serve cached entries for those.

pdns/dnspacket.cc

index dd53ee7f0548f63777081cf7e7aecdd1027408d5..21fa80617b2cf747350a0d12af8d71780485131f 100644 (file)
@@ -246,7 +246,7 @@ void DNSPacket::setCompress(bool compress)
 
 bool DNSPacket::couldBeCached()
 {
-  return d_ednsping.empty() && !d_wantsnsid && qclass==QClass::IN;
+  return d_ednsping.empty() && !d_wantsnsid && qclass==QClass::IN && !d_havetsig;
 }
 
 unsigned int DNSPacket::getMinTTL()