-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
FallbackDNS shouldn't have values set at compile time #494
Comments
I very much disagree. Note that FallbackDNS= is really just the last resort setting, if no other DNS servers are known: if none could be learnt via dhcp or ppp, and none have been configured explicitly in /etc/resolv.conf or in the DNS= setting. We generally try to make our code work so that it works fine even without any configuration in /etc being around. As such resolved should come with compiled-in settings that make things work as last resort. |
I understand and i agree that this has the best of intentions my point here is that having values like DNS hardcoded in the binary might result in confusion. |
Well, DNS is not hardcoded, it's just the fallback DNS that is hardcoded. It's the one that is used if nobody configured anything, if /etc is empty, if the resolved configuration is missing. That's a major distinction. Also note that this is explicitly documented in the resolved.conf man page. Also note that the default /etc/systemd/resolved.conf that we install actually lists the very same DNS servers in the FallbackDNS= line that are also compiled in (following our general logic that the default configuration file contains the default settings that are also compiled in and is thus fully redundant, resulting in the exact same behaviour if the file is missing and if it is in the vendor default state). |
Oh yeah i'm assuming we're talking about the fallback DNS, and yes i noticed that it's well documented. this are just my 5 cents, keep up the good work! |
As written twice above: we want systems that can boot up without /etc around, and they should do the right thing then. Hence: resolved should have fallback dns servers configured in the binary if /etc/systemd/resolved.conf is missing. |
No files should be shipped in /etc fullstop. I even dislike the commented .conf files in /etc and for clearlinux we even purge those. There are man-pages describing everything what's listed there anyway. Arguably the compiled in defaults should be expressed somewhere, e.g. manpage or --help output or somewhere else under /usr, but not in /etc. /etc is for admin configuration & modifications, not documentation. |
The build moved to Meson, so the configure.ac link in the OP is no longer valid. Anyone looking for the up to date definition, see Line 227 in b895fa0
At time of writing, the fallback list is set to :
|
Currently systemd-resolved has it's fallback DNS hardcoded at compile time, this values might not even be used since there are a lot of layers that configure this stuff (DHCP, NetworkManager, /etc/systemd/resolved.conf, etc...) but still having this buried inside the code might lead to confusion on the user side and if for some reason you want to change this value you'll have to compile at least systemd-resolved.
I think this value shouldn't be hardcoded an should be explicitly set in the configuration file, which BTW already has this value commented as an example configuration.
This is the place where the DNS values are set:
https://github.com/systemd/systemd/blob/master/configure.ac#L1106
The text was updated successfully, but these errors were encountered: