Software /
code /
prosody
Comparison
net/dns.lua @ 8898:e6ba0e5260b4
net.dns: Also cache records from the 'additional' section
Could be getting A/AAAA records here when asking for SRV
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 03 Jun 2018 00:40:42 +0200 |
parent | 8897:102242a7ee60 |
child | 8900:fcf42bd7d067 |
comparison
equal
deleted
inserted
replaced
8897:102242a7ee60 | 8898:e6ba0e5260b4 |
---|---|
890 | 890 |
891 for _, rr in pairs(response.answer) do | 891 for _, rr in pairs(response.answer) do |
892 self:remember(rr, rr.type); | 892 self:remember(rr, rr.type); |
893 end | 893 end |
894 | 894 |
895 for _, rr in pairs(response.additional) do | |
896 self:remember(rr, rr.type); | |
897 end | |
898 | |
895 -- retire the query | 899 -- retire the query |
896 local queries = self.active[response.header.id]; | 900 local queries = self.active[response.header.id]; |
897 queries[response.question.raw] = nil; | 901 queries[response.question.raw] = nil; |
898 if not next(queries) then self.active[response.header.id] = nil; end | 902 if not next(queries) then self.active[response.header.id] = nil; end |
899 if not next(self.active) then self:closeall(); end | 903 if not next(self.active) then self:closeall(); end |