Software /
code /
prosody
Comparison
net/dns.lua @ 8897:102242a7ee60
net.dns: Cache all records from the 'answer' section (fixes #487)
This should preserve CNAME records included here
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 09 Jun 2018 00:02:06 +0200 |
parent | 8421:3d21c63ec03f |
child | 8898:e6ba0e5260b4 |
comparison
equal
deleted
inserted
replaced
8887:c47f220580fd | 8897:102242a7ee60 |
---|---|
887 and self.active[response.header.id][response.question.raw] then | 887 and self.active[response.header.id][response.question.raw] then |
888 --print('received response'); | 888 --print('received response'); |
889 --self.print(response); | 889 --self.print(response); |
890 | 890 |
891 for _, rr in pairs(response.answer) do | 891 for _, rr in pairs(response.answer) do |
892 self:remember(rr, response.question[1].type); | 892 self:remember(rr, rr.type); |
893 end | 893 end |
894 | 894 |
895 -- retire the query | 895 -- retire the query |
896 local queries = self.active[response.header.id]; | 896 local queries = self.active[response.header.id]; |
897 queries[response.question.raw] = nil; | 897 queries[response.question.raw] = nil; |