aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-09-24 23:25:18 +0100
committerMatthew Wild <mwild1@gmail.com>2009-09-24 23:25:18 +0100
commit775c721023130e7ced2abb28ec7ff3a035328253 (patch)
tree98d2efe02b35726679c84361a77908931c79d989
parente0c4e19bab9f19717c626bba804f2421823d2be7 (diff)
downloadprosody-775c721023130e7ced2abb28ec7ff3a035328253.tar.gz
prosody-775c721023130e7ced2abb28ec7ff3a035328253.zip
net.dns: Stricter matching of nameserver entries in resolv.conf
-rw-r--r--net/dns.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/dns.lua b/net/dns.lua
index da06ceaa..8448b7ca 100644
--- a/net/dns.lua
+++ b/net/dns.lua
@@ -507,7 +507,7 @@ function resolver:adddefaultnameservers () -- - - - - adddefaultnameservers
local resolv_conf = io.open("/etc/resolv.conf");
if resolv_conf then
for line in resolv_conf:lines() do
- local address = string.match (line, '^%s*nameserver%s+(%d+%.%d+%.%d+%.%d+)')
+ local address = string.match (line, '^%s*nameserver%s+(%d+%.%d+%.%d+%.%d+)%s*$')
if address then self:addnameserver (address) end
end
elseif os.getenv("WINDIR") then