]> git.ipfire.org Git - thirdparty/systemd.git/commit
resolved: add an explicit way to configure whether a link is useful as default route
authorLennart Poettering <lennart@poettering.net>
Tue, 4 Dec 2018 11:40:07 +0000 (12:40 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 21 Dec 2018 11:10:07 +0000 (12:10 +0100)
commitca5394d26039f58ea47255be61c265fee4c9597c
treedb0fb40dbf4ffbd2b2a04009c7d829ecdd478784
parentf76fa088994a74be5aae636e4695bc27a50f0cc2
resolved: add an explicit way to configure whether a link is useful as default route

Previously, we'd use a link as "default" route depending on whether
there are route-only domains defined on it or not. (If there are, it
would not be used as default route, if there aren't it would.)

Let's make this explicit and add a link variable controlling this. The
variable is not changeable from the outside yet, but subsequent commits
are supposed to add that.

Note that making this configurable adds a certain amount of redundancy,
as there are now two ways to ensure a link does not receive "default"
lookup (i.e. DNS queries matching no configured route):

1. By ensuring that at least one other link configures a route on it
   (for example by add "." to its search list)

2. By setting this new boolean to false.

But this is exactly what is intended with this patch: that there is an
explicit way to configure on the link itself whether it receives
'default' traffic, rather than require this to be configured on other
links.

The variable added is a tri-state: if true, the link is suitable for
recieving "default" traffic. If false, the link is not suitable for it.
If unset (i.e. negative) the original logic of "has this route-only
routes" is used, to ensure compatibility with the status quo ante.
src/resolve/resolved-dns-scope.c
src/resolve/resolved-dns-scope.h
src/resolve/resolved-link.c
src/resolve/resolved-link.h
src/resolve/resolved-resolv-conf.c