Software /
code /
prosody
Comparison
net/dns.lua @ 2027:4cd673721e72
net.dns: Don't expire records with TTL of 0 instantly
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 21 Oct 2009 00:01:50 +0100 |
parent | 1982:df88f048c34d |
child | 2067:0ed6369605bf |
comparison
equal
deleted
inserted
replaced
2026:97b17187b29d | 2027:4cd673721e72 |
---|---|
441 rr.type = dns.type[self:word ()] or rr.type | 441 rr.type = dns.type[self:word ()] or rr.type |
442 rr.class = dns.class[self:word ()] or rr.class | 442 rr.class = dns.class[self:word ()] or rr.class |
443 rr.ttl = 0x10000*self:word () + self:word () | 443 rr.ttl = 0x10000*self:word () + self:word () |
444 rr.rdlength = self:word () | 444 rr.rdlength = self:word () |
445 | 445 |
446 if rr.ttl <= 0 then rr.tod = self.time; | 446 if rr.ttl <= 0 then rr.tod = self.time + 30; |
447 else rr.tod = self.time + rr.ttl end | 447 else rr.tod = self.time + rr.ttl end |
448 | 448 |
449 local remember = self.offset | 449 local remember = self.offset |
450 local rr_parser = self[dns.type[rr.type]] | 450 local rr_parser = self[dns.type[rr.type]] |
451 if rr_parser then rr_parser (self, rr) end | 451 if rr_parser then rr_parser (self, rr) end |