Skip to content
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

1.12.0 error: failed to list interfaces: getifaddrs: Address family not supported by protocol #350

Closed
dvzrv opened this issue Nov 21, 2020 · 1 comment · Fixed by #351
Closed

Comments

@dvzrv
Copy link
Contributor

dvzrv commented Nov 21, 2020

Hi! I'm packaging unbound for Arch Linux.
I am currently trying to upgrade the package to 1.12.0. Unfortunately I am running into serious issues with the service right on start.
With my configuration file, compatible with 1.11.0 I am trying to start unbound.service, but it returns:

unbound[1610946:0] error: failed to list interfaces: getifaddrs: Address family not supported by protocol
unbound[1610946:0] fatal error: could not open ports

I see that f6a527c has changed the behavior of the *interface: settings in the configuration. Unfortunately, this doesn't seem to work out of the box with the systemd unit anymore (or because of another problem?).

Even if I provide interface names to the respective *interface: configuration settings, I get the above error message.

@dvzrv
Copy link
Contributor Author

dvzrv commented Nov 21, 2020

Okay, after some investigation I have found the issue.

It seems that the systemd service now requires AF_NETLINK in the RestrictAddressFamilies setting for the aforementioned changes to work and the service not to fail right away.

I'll open a pull request for this.

dvzrv added a commit to dvzrv/unbound that referenced this issue Nov 21, 2020
contrib/unbound{,_portable}.service.in:
With the changes introduced in f6a527c
it is now necessary to also allow access to the AF_NETLINK socket
address family to be able to get information from interfaces.

Without the AF_NETLINK address family the systemd service errors with:

```
error: failed to list interfaces: getifaddrs: Address family not
supported by protocol
```

Fixes NLnetLabs#350
wcawijngaards added a commit that referenced this issue Nov 23, 2020
- Merge #351 from dvzrv: Add AF_NETLINK to set of allowed socket
  address families.
- Fix #350: with the AF_NETLINK permission, to fix 1.12.0 error:
  failed to list interfaces: getifaddrs: Address family not
  supported by protocol.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant