Skip to content
Snippets Groups Projects
Commit 5c0e6878 authored by Marek Vavruša's avatar Marek Vavruša
Browse files

daemon/config: bind to v4 and v6 loopback separately

parent 6171faeb
Branches
Tags
No related merge requests found
-- Listen on localhost
if not next(net.list()) then
local ok, err = pcall(net.listen, {'127.0.0.1', '::1'})
local ok, err = pcall(net.listen, '127.0.0.1')
if not ok then
error('bind to localhost#53 '..err)
error('bind to 127.0.0.1#53 '..err)
end
-- IPv6 loopback may fail
ok, err = pcall(net.listen, '::1')
if not ok and verbose() then
print('bind to ::1#53 '..err)
end
end
-- Open cache if not set/disabled
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment