From 24438c074648c16fa1adb2a8b2b18d4f8d916214 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Sat, 13 Feb 2016 19:21:30 +0100 Subject: Cap TTL of DNS cache entries --- src/dns.cpp | 2 ++ 1 file changed, 2 insertions(+) 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; } -- cgit v1.2.3