Correctly format ipv6 resolver config for lua
It seems that when support was added for parsing resolv_conf directly a regression was introduced which effectively breaks anyone with ipv6 resolvers. Regression of #3895
This commit is contained in:
parent
eac8dec82b
commit
28a42686a5
1 changed files with 3 additions and 0 deletions
|
@ -51,6 +51,9 @@ local function parse_line(line)
|
|||
local keyword, value = parts[1], parts[2]
|
||||
|
||||
if keyword == "nameserver" then
|
||||
if not value:match("^%d+.%d+.%d+.%d+$") then
|
||||
value = string.format("[%s]", value)
|
||||
end
|
||||
nameservers[#nameservers + 1] = value
|
||||
elseif keyword == "search" then
|
||||
set_search(parts)
|
||||
|
|
Loading…
Reference in a new issue