net.dns: Don't expire records with TTL of 0 instantly

Wed, 21 Oct 2009 00:01:50 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Wed, 21 Oct 2009 00:01:50 +0100
changeset 2027
4cd673721e72
parent 2026
97b17187b29d
child 2034
38d4694828e6

net.dns: Don't expire records with TTL of 0 instantly

net/dns.lua file | annotate | diff | comparison | revisions
--- a/net/dns.lua	Wed Oct 21 01:02:26 2009 +0500
+++ b/net/dns.lua	Wed Oct 21 00:01:50 2009 +0100
@@ -443,7 +443,7 @@
   rr.ttl      = 0x10000*self:word () + self:word ()
   rr.rdlength = self:word ()
 
-  if rr.ttl <= 0 then rr.tod = self.time;
+  if rr.ttl <= 0 then rr.tod = self.time + 30;
   else  rr.tod = self.time + rr.ttl  end
 
   local remember = self.offset

mercurial