aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2016-01-08 16:21:05 +0100
committerKim Alvefur <zash@zash.se>2016-01-08 16:21:05 +0100
commit8cdd08825d3ab4afddc12ddf75dc9af1924e8518 (patch)
treeb72ea8b35e4dae603543a1b490f959f32b930870 /net
parent3d0f3a9db092d06daa782135077acfaf9b40b69c (diff)
parentb3d9c810676d288d193e4dcc3d95456e8a050f0e (diff)
downloadprosody-8cdd08825d3ab4afddc12ddf75dc9af1924e8518.tar.gz
prosody-8cdd08825d3ab4afddc12ddf75dc9af1924e8518.zip
Merge 0.10->trunk
Diffstat (limited to 'net')
-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