Mercurial > prosody-hg
comparison 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 |
| parents | a1d186c8c65a |
| children | 4cd673721e72 |
comparison
equal
deleted
inserted
replaced
| 1981:ffbc57a4dea8 | 1982:df88f048c34d |
|---|---|
| 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 -- pass | 446 if rr.ttl <= 0 then rr.tod = self.time; |
| 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 |
