Changeset

8263:9b52b1f19b51

net.dns: Correctly apply lower bound of RTT (thanks Ge0rG)
author Kim Alvefur <zash@zash.se>
date Sun, 24 Sep 2017 01:04:56 +0200
parents 8262:e6f3e440c843
children 8264:23aee8ccfe9b
files net/dns.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/net/dns.lua	Sat Sep 23 23:32:08 2017 +0100
+++ b/net/dns.lua	Sun Sep 24 01:04:56 2017 +0200
@@ -504,7 +504,7 @@
 	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]];