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

Closed
opeter opened this issue Mar 8, 2017 · 1 comment
Closed

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

opeter opened this issue Mar 8, 2017 · 1 comment

Comments

@opeter
Copy link

@opeter 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.

Usecase

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

Description

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/dnsdist-cache.cc b/pdns/dnsdist-cache.cc
index 9b5b48c..9f5abd0 100644
--- a/pdns/dnsdist-cache.cc
+++ b/pdns/dnsdist-cache.cc
@@ -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);
+  //}
 
   d_hits++;
   return true;
@rgacogne
Copy link
Member

@rgacogne 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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants