Diff

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
line wrap: on
line diff
--- a/net/dns.lua	Fri Jun 08 16:02:57 2018 +0200
+++ b/net/dns.lua	Sat Jun 09 00:02:06 2018 +0200
@@ -889,7 +889,7 @@
 		--self.print(response);
 
 		for _, rr in pairs(response.answer) do
-			self:remember(rr, response.question[1].type);
+			self:remember(rr, rr.type);
 		end
 
 		-- retire the query