Diff

net/dns.lua @ 1982:df88f048c34d

net.dns: Don't cache some records indefinitely
author Matthew Wild <mwild1@gmail.com>
date Sat, 17 Oct 2009 17:56:51 +0100
parent 1950:a1d186c8c65a
child 2027:4cd673721e72
line wrap: on
line diff
--- a/net/dns.lua	Sat Oct 17 16:25:28 2009 +0100
+++ b/net/dns.lua	Sat Oct 17 17:56:51 2009 +0100
@@ -443,7 +443,7 @@
   rr.ttl      = 0x10000*self:word () + self:word ()
   rr.rdlength = self:word ()
 
-  if rr.ttl == 0 then  -- pass
+  if rr.ttl <= 0 then rr.tod = self.time;
   else  rr.tod = self.time + rr.ttl  end
 
   local remember = self.offset