NetworkManager/src/dns
Thomas Haller ee9fab0361
dns: fix handling default routing domains with systemd-resolved
We used to set "~." domains for all devices that should be used for
resolving unknown domains.

Systemd-resolved also supports setting "SetLinkDefaultRoute()".
We should only set the wildcard domain if we want that this
interface is used exclusively. Otherwise, we should only set
DefaultRoute. See ([1], [2], [3], [4]).

Otherwise the bad effect is if other components (wg-quick) want
to set exclusive DNS lookups on their link. That is achieved by
explicitly adding "~." and that is also what resolved's
`/usr/sbin/resolvconf -x` does. If NetworkManager sets "~." for
interfaces that are not important and should not be used exclusively,
then this steals the DNS requests from those external components.

In NetworkManager we know whether a link should get exclusive lookups
based on the "ipv[46].dns-priority" setting.

[1] https://www.freedesktop.org/software/systemd/man/org.freedesktop.resolve1.html
[2] https://www.freedesktop.org/software/systemd/man/systemd-resolved.service.html
[3] https://github.com/systemd/systemd/issues/17529#issuecomment-730522444
[4] https://github.com/systemd/systemd/pull/17678
2020-11-20 18:28:03 +01:00
..
nm-dns-dnsmasq.c dns: fix handling default routing domains with systemd-resolved 2020-11-20 18:28:03 +01:00
nm-dns-dnsmasq.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-dns-manager.c dns: fix handling default routing domains with systemd-resolved 2020-11-20 18:28:03 +01:00
nm-dns-manager.h dns: fix handling default routing domains with systemd-resolved 2020-11-20 18:28:03 +01:00
nm-dns-plugin.c all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-dns-plugin.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-dns-systemd-resolved.c dns: fix handling default routing domains with systemd-resolved 2020-11-20 18:28:03 +01:00
nm-dns-systemd-resolved.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-dns-unbound.c all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-dns-unbound.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00