From 11402a46bb145ad626c775f02d15d6a68b48ec1d Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 24 Sep 2017 01:04:56 +0200 Subject: net.dns: Correctly apply lower bound of RTT (thanks Ge0rG) --- net/dns.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/dns.lua b/net/dns.lua index 188bdf43..5ba3db0e 100644 --- a/net/dns.lua +++ b/net/dns.lua @@ -504,7 +504,7 @@ function resolver:rr() -- - - - - - - - - - - - - - - - - - - - - - - - rr rr.ttl = 0x10000*self:word() + self:word(); rr.rdlength = self:word(); - rr.tod = self.time + math.min(rr.ttl, 1); + rr.tod = self.time + math.max(rr.ttl, 1); local remember = self.offset; local rr_parser = self[dns.type[rr.type]]; -- cgit v1.2.3