aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-06-13 16:36:47 +0200
committerKim Alvefur <zash@zash.se>2017-06-13 16:36:47 +0200
commitf46de2488a3faca070845c6a2cbdd3dc210e2042 (patch)
tree26204fccb7fe3577227a71b9034331171eb68cfc /net
parent5f515cd53c09a001229785caf2c3b28aaf2de17a (diff)
downloadprosody-im-server-f46de2488a3faca070845c6a2cbdd3dc210e2042.tar
prosody-im-server-f46de2488a3faca070845c6a2cbdd3dc210e2042.zip
net.dns: Prevent answers from immediately expiring even if TTL=0 (see #919)
Diffstat (limited to 'net')
-rw-r--r--net/dns.lua2
1 files changed, 1 insertions, 1 deletions
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]];