Comparison

net/dns.lua @ 2081:b9bbb709d62e

net.dns: Be more strict about checking the DNS replies we receive
author Matthew Wild <mwild1@gmail.com>
date Wed, 18 Nov 2009 01:05:38 +0000
parent 2069:72357b1c6d88
child 2082:1381b2071c2e
comparison
equal deleted inserted replaced
2080:ca419b92a8c7 2081:b9bbb709d62e
724 724
725 if self.socketset[sock] then 725 if self.socketset[sock] then
726 local packet = sock:receive(); 726 local packet = sock:receive();
727 if packet then 727 if packet then
728 response = self:decode(packet); 728 response = self:decode(packet);
729 if response then 729 if response and self.active[response.header.id]
730 and self.active[response.header.id][response.question.raw] then
730 --print('received response'); 731 --print('received response');
731 --self.print(response); 732 --self.print(response);
732 733
733 for i,section in pairs({ 'answer', 'authority', 'additional' }) do 734 for i,section in pairs({ 'answer', 'authority', 'additional' }) do
734 for j,rr in pairs(response[section]) do 735 for j,rr in pairs(response[section]) do