aboutsummaryrefslogtreecommitdiff
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
commitf043d24ecabf4d76a0a5db906b450e86bd799ff6 (patch)
treefaeabdcf9ad7ceb2e34153c87d35c0a94fb94b69
parent4aa3102ed5d0fb7e4a8db6c6890f52b048a9ea4a (diff)
downloadprosody-im-server-f043d24ecabf4d76a0a5db906b450e86bd799ff6.tar
prosody-im-server-f043d24ecabf4d76a0a5db906b450e86bd799ff6.zip
net.dns: Correctly apply lower bound of RTT (thanks Ge0rG)
-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]];