Software /
code /
prosody
Diff
net/dns.lua @ 7061:eda0feeaf759
Merge 0.9->0.10
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 08 Jan 2016 16:16:08 +0100 |
parent | 6866:abff7543b79c |
parent | 7059:7ec52755622f |
child | 7098:5286e79c6829 |
line wrap: on
line diff
--- a/net/dns.lua Wed Jan 06 03:28:56 2016 +0100 +++ b/net/dns.lua Fri Jan 08 16:16:08 2016 +0100 @@ -591,7 +591,7 @@ 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 @@ --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