summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2016-02-13 19:21:30 +0100
committerAttila Molnar <attilamolnar@hush.com>2016-02-13 19:21:30 +0100
commit24438c074648c16fa1adb2a8b2b18d4f8d916214 (patch)
tree8af599504258341a2a96c4d17ea5a474c18c3281 /src
parent2fe72dc9a8533e880f53d9f37bd1684f41052035 (diff)
Cap TTL of DNS cache entries
Diffstat (limited to 'src')
-rw-r--r--src/dns.cpp2
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;
}