Diff

net/dns.lua @ 8164:a395957f3bf2

Merge 0.9->0.10
author Kim Alvefur <zash@zash.se>
date Tue, 13 Jun 2017 16:38:52 +0200
parent 8154:6300394bb713
parent 8163:a55eb6c3b45c
child 8263:9b52b1f19b51
line wrap: on
line diff
--- a/net/dns.lua	Thu Jun 01 14:05:43 2017 +0200
+++ b/net/dns.lua	Tue Jun 13 16:38:52 2017 +0200
@@ -504,7 +504,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]];