Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Daniel Kahn Gillmor
Knot DNS Resolver
Commits
5c0e6878
Commit
5c0e6878
authored
Feb 03, 2016
by
Marek Vavrusa
Browse files
daemon/config: bind to v4 and v6 loopback separately
parent
6171faeb
Changes
1
Hide whitespace changes
Inline
Side-by-side
daemon/lua/config.lua
View file @
5c0e6878
-- 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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment