aboutsummaryrefslogtreecommitdiffstats
path: root/net/dns.lua
diff options
context:
space:
mode:
Diffstat (limited to 'net/dns.lua')
-rw-r--r--net/dns.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/dns.lua b/net/dns.lua
index d893e38f..d711af34 100644
--- a/net/dns.lua
+++ b/net/dns.lua
@@ -591,7 +591,7 @@ function resolver:adddefaultnameservers() -- - - - - adddefaultnameservers
if resolv_conf then
for line in resolv_conf:lines() do
line = line:gsub("#.*$", "")
- :match('^%s*nameserver%s+([%x:%.]*)%s*$');
+ :match('^%s*nameserver%s+([%x:%.]*%%?%S*)%s*$');
if line then
local ip = new_ip(line);
if ip then
@@ -853,7 +853,9 @@ function resolver:receive(rset) -- - - - - - - - - - - - - - - - - receive
--self.print(response);
for j,rr in pairs(response.answer) do
- self:remember(rr, response.question[1].type)
+ if rr.name:sub(-#response.question[1].name, -1) == response.question[1].name then
+ self:remember(rr, response.question[1].type)
+ end
end
-- retire the query