nixos/kresd: Listen on IPv4 wildcard, too #101043
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If only a port is specified in listen{Plain,TLS,DoH} option, kresd will now listen on IPv4 and IPv6 wildcard.
Motivation for this change
As specified here (https://github.com/CZ-NIC/knot-resolver/blob/d5fc45b3ac2aec9aba82c9b4868dc52a4ccbf026/daemon/io.c#L137) kresd 5.x will listen to IPv6 only, if a IPv6 address is specified in the
net.listen
directive.Listening on IPv6 wildcard and IPv4 localhost looks like a mistake to me.
In addition, the current behavior tries to mimic the syntax of systemd.socket(5)
ListenStream
directive.While the default for a port-only configuration depends on
/proc/sys/net/ipv6/bindv6only
, assuming this to be false seem fair to me.Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)