-
-
Notifications
You must be signed in to change notification settings - Fork 382
systemd socket activation fails on IPv6 #741
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
It turns out that unbound by default wants to create sockets with the ipv6-only option applied, and creates separate sockets for IP v4 and IPv6. This is because separate sockets was considered safer, so this is the default. But you specify the ipv6 only setting in the systemd config file, and then unbound tries to set its own, different default opinion. This is what causes the error printout, I think. It is fixed by having unbound not set the V6ONLY flag on IPv6 sockets for sockets from systemd. That can be controlled with the systemd |
Thank you for the incredibly fast fix! Will report back after testing the latest master.
The funny thing is, that option ( Edit: whoops. replied with my corporate account, anyway. |
Okay so interestingly enough, this time it can't create IPv4 only sockets (which isn't really an issue since the
|
Perhaps configuration with |
That'd also work, yeah. |
So far as I can tell, unbound still falls over when you try to use systemd socket activation with IPv6, unless you give it an explicit IPv6 interface to listen on (which is counter to the idea of socket activation). It will try to open its port on |
Describe the bug
When unbound is run with systemd's socket activation (see additional information below for an example socket file); unless you set specific IPv4 addresses to listen (like
127.0.0.1:553
) on the socket file and setdo-ip6: no
(also setport: 553
for this example) on unbound.conf, you will get these two error lines:To reproduce
Steps to reproduce the behavior:
--enable-systemd
).contrib/unbound.service
from source to/usr/lib/systemd/system/
./usr/lib/systemd/system/
./usr/local/etc/unbound/unbound.conf
like below.systemctl daemon-reload
)systemctl start unbound.socket
)systemctl start unbound.service
)journalctl -xeu unbound
)Expected behavior
Unbound starting.
System:
unbound -V
output:Additional information
File
/usr/lib/systemd/system/unbound.socket
:File
/usr/local/etc/unbound/unbound.conf
:The text was updated successfully, but these errors were encountered: