diff options
author | Kim Alvefur <zash@zash.se> | 2016-01-08 16:16:08 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2016-01-08 16:16:08 +0100 |
commit | ebdebb946d9d2c501c0fe7d76d57798ab60e3ff9 (patch) | |
tree | fa735fdc4d7fd7f7b8f14ea5dc1e5a86a0ca5dde /net/dns.lua | |
parent | b057664428d529b182ac9a69800402d2f517b43b (diff) | |
parent | 224a98b2c63864a480ca38056ea945f92e8122b8 (diff) | |
download | prosody-ebdebb946d9d2c501c0fe7d76d57798ab60e3ff9.tar.gz prosody-ebdebb946d9d2c501c0fe7d76d57798ab60e3ff9.zip |
Merge 0.9->0.10
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 |