From 73a7fa134dbd699120920d1f65b3224fc6aa5e5e Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 3 Jun 2018 00:40:42 +0200 Subject: net.dns: Also cache records from the 'additional' section Could be getting A/AAAA records here when asking for SRV --- net/dns.lua | 4 ++++ 1 file changed, 4 insertions(+) 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; -- cgit v1.2.3