Mercurial > prosody-hg
comparison 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 |
| parents | 6300394bb713 a55eb6c3b45c |
| children | 9b52b1f19b51 |
comparison
equal
deleted
inserted
replaced
| 8161:31938a0c398f | 8164:a395957f3bf2 |
|---|---|
| 502 rr.type = dns.type[self:word()] or rr.type; | 502 rr.type = dns.type[self:word()] or rr.type; |
| 503 rr.class = dns.class[self:word()] or rr.class; | 503 rr.class = dns.class[self:word()] or rr.class; |
| 504 rr.ttl = 0x10000*self:word() + self:word(); | 504 rr.ttl = 0x10000*self:word() + self:word(); |
| 505 rr.rdlength = self:word(); | 505 rr.rdlength = self:word(); |
| 506 | 506 |
| 507 rr.tod = self.time + rr.ttl; | 507 rr.tod = self.time + math.min(rr.ttl, 1); |
| 508 | 508 |
| 509 local remember = self.offset; | 509 local remember = self.offset; |
| 510 local rr_parser = self[dns.type[rr.type]]; | 510 local rr_parser = self[dns.type[rr.type]]; |
| 511 if rr_parser then rr_parser(self, rr); end | 511 if rr_parser then rr_parser(self, rr); end |
| 512 self.offset = remember; | 512 self.offset = remember; |
