aboutsummaryrefslogtreecommitdiffstats
path: root/net/dns.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-06-03 00:40:42 +0200
committerKim Alvefur <zash@zash.se>2018-06-03 00:40:42 +0200
commit73a7fa134dbd699120920d1f65b3224fc6aa5e5e (patch)
tree49ce1471ee03b83b8bfcc5d944015ac538aac775 /net/dns.lua
parentad268c9db3f4eec85a378f39d3186057568f0eeb (diff)
downloadprosody-73a7fa134dbd699120920d1f65b3224fc6aa5e5e.tar.gz
prosody-73a7fa134dbd699120920d1f65b3224fc6aa5e5e.zip
net.dns: Also cache records from the 'additional' section
Could be getting A/AAAA records here when asking for SRV
Diffstat (limited to 'net/dns.lua')
-rw-r--r--net/dns.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/dns.lua b/net/dns.lua
index 93c1805b..b69ba953 100644
--- a/net/dns.lua
+++ b/net/dns.lua
@@ -892,6 +892,10 @@ function resolver:feed(sock, packet, force)
self:remember(rr, rr.type);
end
+ for _, rr in pairs(response.additional) do
+ self:remember(rr, rr.type);
+ end
+
-- retire the query
local queries = self.active[response.header.id];
queries[response.question.raw] = nil;