Skip to content

Commit

Permalink
Merge pull request #4543 from jacksontj/ipv6_resolvers
Browse files Browse the repository at this point in the history
Correctly format ipv6 resolver config for lua
  • Loading branch information
k8s-ci-robot authored Sep 7, 2019
2 parents eac8dec + 28a4268 commit 6fceaf3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rootfs/etc/nginx/lua/util/resolv_conf.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6fceaf3

Please sign in to comment.