Software /
code /
prosody
Changeset
8163:a55eb6c3b45c
net.dns: Prevent answers from immediately expiring even if TTL=0 (see #919)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 13 Jun 2017 16:36:47 +0200 |
parents | 8160:5566f82ffea4 |
children | 8164:a395957f3bf2 8222:67a9d2de2300 |
files | net/dns.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/net/dns.lua Tue May 30 20:52:22 2017 +0100 +++ b/net/dns.lua Tue Jun 13 16:36:47 2017 +0200 @@ -513,7 +513,7 @@ 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]];