diff options
author | Kim Alvefur <zash@zash.se> | 2017-06-13 16:36:47 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-06-13 16:36:47 +0200 |
commit | 5ca772b7a74cf4ce5d5a9f1fcc810a9ebfcc470a (patch) | |
tree | 59e70424f0024537ff1bf358520a87ef28f04af4 | |
parent | 463ae920091de0ba7be52f6526620cd6eaac8f05 (diff) | |
download | prosody-5ca772b7a74cf4ce5d5a9f1fcc810a9ebfcc470a.tar.gz prosody-5ca772b7a74cf4ce5d5a9f1fcc810a9ebfcc470a.zip |
net.dns: Prevent answers from immediately expiring even if TTL=0 (see #919)
-rw-r--r-- | net/dns.lua | 2 |
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]]; |