Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dnsdist] packetcache::get make skipAging configurable #5126

opeter opened this issue Mar 8, 2017 · 1 comment

[dnsdist] packetcache::get make skipAging configurable #5126

opeter opened this issue Mar 8, 2017 · 1 comment


Copy link

opeter commented Mar 8, 2017

  • Program: dnsdist
  • Issue type:Feature request

Short description

Behavior of dnsdist in front of an auth dns with cache pool enabled is wrong as it counts down the cached TTL.


Put dnsdist in front of an auth dns and activate a cache pool.


We want to put dnsdist in front of our auth nameserver and also use it's cache functionality.
Current behavior caches the records from the auth nameserver but counts down the TTL like a resolver.
From an authoritative point of view this is incorrect so it would be nice to have a feature flag to disable aging of the records.

Quick & Dirty patch:

diff --git a/pdns/ b/pdns/
index 9b5b48c..9f5abd0 100644
--- a/pdns/
+++ b/pdns/
@@ -209,9 +209,9 @@ bool DNSDistPacketCache::get(const DNSQuestion& dq, uint16_t consumed, uint16_t
-  if (!skipAging) {
-    ageDNSPacket(response, *responseLen, age);
-  }
+  //if (!skipAging) {
+  //  ageDNSPacket(response, *responseLen, age);
+  //}
   return true;
Copy link

rgacogne commented Mar 8, 2017

We should probably make that an optional parameter to newPacketCache(), although we could also easily make it configurable per query.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

2 participants