From: Attila Molnar Date: Sat, 13 Feb 2016 18:21:30 +0000 (+0100) Subject: Cap TTL of DNS cache entries X-Git-Tag: v2.0.23~32 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=24438c074648c16fa1adb2a8b2b18d4f8d916214;p=user%2Fhenk%2Fcode%2Finspircd.git Cap TTL of DNS cache entries --- 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; }