ignore comment line in resolv.conf

This commit is contained in:
Jay Li
2020-02-28 10:06:50 +08:00
committed by 云风
parent 6de4a012a7
commit 3c425b76bc

View File

@@ -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