net.dns: Add 'force' parameter to resolver:feed() to force decoding a packet even if it doesn't match an outstanding request
authorMatthew Wild <mwild1@gmail.com>
Tue, 05 Oct 2010 18:55:17 +0100
changeset 3512 e344b00f2cc9
parent 3511 4495403470cb
child 3513 4cf5962747fc
net.dns: Add 'force' parameter to resolver:feed() to force decoding a packet even if it doesn't match an outstanding request
net/dns.lua
--- a/net/dns.lua	Fri Oct 01 16:44:49 2010 +0200
+++ b/net/dns.lua	Tue Oct 05 18:55:17 2010 +0100
@@ -798,11 +798,11 @@
 end
 
 
-function resolver:feed(sock, packet)
+function resolver:feed(sock, packet, force)
 	--print('receive'); print(self.socket);
 	self.time = socket.gettime();
 
-	local response = self:decode(packet);
+	local response = self:decode(packet, force);
 	if response and self.active[response.header.id]
 		and self.active[response.header.id][response.question.raw] then
 		--print('received response');