diff options
author | Kim Alvefur <zash@zash.se> | 2016-01-08 16:21:05 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2016-01-08 16:21:05 +0100 |
commit | fb972a1ea95f574ecacd7a213a04c4cab5e41f56 (patch) | |
tree | b72ea8b35e4dae603543a1b490f959f32b930870 /net/dns.lua | |
parent | 8502b7dc5d7169a43be5dd6fca14417ed39187a4 (diff) | |
parent | 9b4c1c40131ef343f5141242e134b18c45c2f128 (diff) | |
download | prosody-fb972a1ea95f574ecacd7a213a04c4cab5e41f56.tar.gz prosody-fb972a1ea95f574ecacd7a213a04c4cab5e41f56.zip |
Merge 0.10->trunk
Diffstat (limited to 'net/dns.lua')
-rw-r--r-- | net/dns.lua | 6 |
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 |