]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Cap TTL of DNS cache entries
authorAttila Molnar <attilamolnar@hush.com>
Sat, 13 Feb 2016 18:21:30 +0000 (19:21 +0100)
committerAttila Molnar <attilamolnar@hush.com>
Sat, 13 Feb 2016 18:21:30 +0000 (19:21 +0100)
src/dns.cpp

index 1755c7dac85f1c9b474fb2cd4291269e91062a07..ff823524c347f0fad7c865e6fb9fc7df1d960f99 100644 (file)
@@ -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;
 }