net.dns: Be more strict about checking the DNS replies we receive

Wed, 18 Nov 2009 01:05:38 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Wed, 18 Nov 2009 01:05:38 +0000
changeset 2081
b9bbb709d62e
parent 2080
ca419b92a8c7
child 2082
1381b2071c2e

net.dns: Be more strict about checking the DNS replies we receive

net/dns.lua file | annotate | diff | comparison | revisions
--- a/net/dns.lua	Fri Nov 13 06:29:37 2009 +0500
+++ b/net/dns.lua	Wed Nov 18 01:05:38 2009 +0000
@@ -726,7 +726,8 @@
 			local packet = sock:receive();
 			if packet then
 				response = self:decode(packet);
-				if response then
+				if response and self.active[response.header.id] 
+					and self.active[response.header.id][response.question.raw] then
 					--print('received response');
 					--self.print(response);
 

mercurial