diff options
author | Attila Molnar <attilamolnar@hush.com> | 2016-02-13 19:21:30 +0100 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2016-02-13 19:21:30 +0100 |
commit | 24438c074648c16fa1adb2a8b2b18d4f8d916214 (patch) | |
tree | 8af599504258341a2a96c4d17ea5a474c18c3281 /src/dns.cpp | |
parent | 2fe72dc9a8533e880f53d9f37bd1684f41052035 (diff) |
Cap TTL of DNS cache entries
Diffstat (limited to 'src/dns.cpp')
-rw-r--r-- | src/dns.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/dns.cpp b/src/dns.cpp index 1755c7dac..ff823524c 100644 --- a/src/dns.cpp +++ b/src/dns.cpp @@ -162,6 +162,8 @@ class RequestTimeout : public Timer CachedQuery::CachedQuery(const std::string &res, QueryType qt, unsigned int ttl) : data(res), type(qt) { + if (ttl > 5*60) + ttl = 5*60; expires = ServerInstance->Time() + ttl; } |