From 6f1020550628c90495e29d33a8952850d0e0ce83 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 13 Jun 2017 16:36:47 +0200 Subject: net.dns: Prevent answers from immediately expiring even if TTL=0 (see #919) --- net/dns.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/dns.lua') diff --git a/net/dns.lua b/net/dns.lua index 5e29e906..0d6a828c 100644 --- a/net/dns.lua +++ b/net/dns.lua @@ -513,7 +513,7 @@ function resolver:rr() -- - - - - - - - - - - - - - - - - - - - - - - - rr rr.ttl = 0x10000*self:word() + self:word(); rr.rdlength = self:word(); - rr.tod = self.time + rr.ttl; + rr.tod = self.time + math.min(rr.ttl, 1); local remember = self.offset; local rr_parser = self[dns.type[rr.type]]; -- cgit v1.2.3