From 3c425b76bc33d5b1e7e21205ae98ee7e87ec1c4e Mon Sep 17 00:00:00 2001 From: Jay Li Date: Fri, 28 Feb 2020 10:06:50 +0800 Subject: [PATCH] ignore comment line in resolv.conf --- lualib/skynet/dns.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lualib/skynet/dns.lua b/lualib/skynet/dns.lua index 22b3860f..3e112964 100644 --- a/lualib/skynet/dns.lua +++ b/lualib/skynet/dns.lua @@ -161,7 +161,7 @@ local function parse_resolv_conf() local server for line in f:lines() do - server = line:match("%s*nameserver%s+([^#;%s]+)") + server = line:match("^%s*nameserver%s+([^#;%s]+)") if server then break end