aboutsummaryrefslogtreecommitdiffstats
path: root/net/dns.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2016-01-08 16:16:08 +0100
committerKim Alvefur <zash@zash.se>2016-01-08 16:16:08 +0100
commit6b1e54864c661211366d22a41435e5e3d07e71ac (patch)
treefa735fdc4d7fd7f7b8f14ea5dc1e5a86a0ca5dde /net/dns.lua
parent7baeaaa363aca2190c22f1bd4463ac52ab83bb99 (diff)
parentf9a3ca3602c72f24edecc95a886eace4edd42c5d (diff)
downloadprosody-6b1e54864c661211366d22a41435e5e3d07e71ac.tar.gz
prosody-6b1e54864c661211366d22a41435e5e3d07e71ac.zip
Merge 0.9->0.10
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