aboutsummaryrefslogtreecommitdiffstats
path: root/net/dns.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-09-24 01:04:56 +0200
committerKim Alvefur <zash@zash.se>2017-09-24 01:04:56 +0200
commit9c1cbdf6125c08e9bac5331f13e8dd6dd01c9f67 (patch)
tree5cb67de72151ebb6b394b3e7ff5761b260a19f03 /net/dns.lua
parent058cac6c4c892d0ad60bdf93e838eb0f9791f070 (diff)
downloadprosody-9c1cbdf6125c08e9bac5331f13e8dd6dd01c9f67.tar.gz
prosody-9c1cbdf6125c08e9bac5331f13e8dd6dd01c9f67.zip
net.dns: Correctly apply lower bound of RTT (thanks Ge0rG)
Diffstat (limited to 'net/dns.lua')
-rw-r--r--net/dns.lua2
1 files changed, 1 insertions, 1 deletions
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]];