...which is wrong. the default behaviour should be to add default set of servers only when no dns is specified (either static or via dhcp).
it the current state, extra (and unwanted) servers are being added despite nameservers from dhcp are received and processed correctly. this breaks some setups since the local (dhcp supplied) nameservers are set to answer local-scope queries but google's servers are not.
please fix the default behaviour.
Could you explain your usecase a bit more? Currently the globally configured servers are only added as fallback, so your queries should first got to your local servers, and only hit the global ones if those fail.
Is the issue that you _want_ some queries to fail? Note that you can Set "DNS=" in resolved.conf to not get any global servers at all. Would that work for you?
yes, setting DNS= is what i've been using so far to work-around it but it simply feels wrong.
when my network is configured correctly (dhcp sending resolvers), i see no reason to add arbitrary (why google's 18.104.22.168?) servers to resolv.conf. also, when something breaks, i think it would be better to get to notice as soon as possible instead of having seemingly weird behaviour (1).
as for the "fallback", the resolv.conf also supports the 'rotate' option (see man resolv.conf) which changes the behaviour to be round-robin. i can't even imagine how stressful debugging broken resolver would be in such case.
i totally understand having sane defaults for non-auto-configured systems (virtual machines, ...) but let's not interfere with centrally driven network configuration (dhcp).
(1): as an example: windows machines would stop working but linux one won't. or even better, some linux machines will fail because they're not systemd-based. also, ever more delicate things may start to happen (dnssec, site-local resolution, ...).
Fixed in current git.