Repository navigation
resolved: add new "DNS Delegate" concepts - #34368
Merged
Merged
Conversation
poettering
force-pushed
the
resolved-static-scopes
branch
from
September 12, 2024 08:01
4e51aa1 to
95b1dd0
Compare
poettering
force-pushed
the
resolved-static-scopes
branch
from
May 8, 2025 06:53
95b1dd0 to
cd52118
Compare
poettering
force-pushed
the
resolved-static-scopes
branch
from
May 9, 2025 09:21
cd52118 to
46a3091
Compare
Member
Author
|
This is complete now, now contains a simple integration test |
poettering
force-pushed
the
resolved-static-scopes
branch
2 times, most recently
from
May 13, 2025 12:56
4a1fd82 to
dc74b43
Compare
daandemeyer
requested changes
May 13, 2025
poettering
force-pushed
the
resolved-static-scopes
branch
from
May 13, 2025 20:15
dc74b43 to
1c1dfda
Compare
rsmarples
added a commit
to NetworkConfiguration/openresolv
that referenced
this pull request
May 13, 2025
Set the defaults dirs directly as they are pretty much hard-coded in systemd itself. Write out DNS delegates so that when systemd/systemd#34368 is merged into a release we support it out of the box.
behrmann
reviewed
May 16, 2025
poettering
force-pushed
the
resolved-static-scopes
branch
from
May 16, 2025 10:31
1c1dfda to
20e9a3a
Compare
daandemeyer
approved these changes
May 20, 2025
Member
Author
|
@daandemeyer any reason you set the "ci-fails" label? can't find any ci that failed related to any resolved issue? |
Collaborator
I saw a lot of red so I figured it wasn't flakyness, ignore the label |
… DnsScope explicitly This new enum field is supposed to indicate why a DnsScope came to be. For now it distinguishes two origins: the "global" one (which is what is configured in resolved.conf) and "link" ones (which are synthesized for each link). The field as is is pretty redundant, the same information can be determined from whether the .link field is set or not. This is pretty much just preparation for later commits that add statically configured additional DnsScopes whose origin shall be encoded with this.
…specific DNS servers This permits configuration of additional "delegates" which ensure that lookups for certain DNS zones are routed to specific sets of DNS servers, in addition to the routes we create for each network interface. For now, this allows only static configuration, but eventually we should open this up to IPC. Fixes: systemd#5573 systemd#14159 systemd#20485 systemd#21260 systemd#24532 systemd#32022 (Fixes systemd#32022, because now redundant)
Let's handle the per-link and the global dns server/search domain property parsing the same. Let's use a flags field for three separate booleans, and unify more code.
poettering
force-pushed
the
resolved-static-scopes
branch
from
May 20, 2025 21:12
20e9a3a to
88d2cb3
Compare
bluca
added a commit
to bluca/systemd-suse
that referenced
this pull request
May 21, 2025
g7
pushed a commit
to droidian/systemd
that referenced
this pull request
Aug 17, 2025
systemd/systemd#34368 Gbp-Dch: ignore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Various long standing issues (at least: #5573 #14159 #20485 #21260 #24532 #32022 #18056) have been asking for a way to delegate DNS resolution of specific domains to very specific DNS servers.
This PR goes a major step towards that goal by adding a new concept "DNS Delegate" which allows to configure just that. Basically, this adds a third kind of DNS scope to resolved's logic: besides the per-link and global DNS scopes there are now also "delegate" scopes, which can be created by dropping in a new file /etc/systemd/dns-delegate/*.conf. They carry DNS= and Domains= lines just like the global setting or what the per-link configuration can carry.
And they are consulted the same way as link DNS scopes are considered, following the same routing rules.
This allows to configure these DNS delegates statically via drop-in files as mentioned, and only adds the most basic functionality. Later on we might want to extend this:
This PR is not complete yet. Lacks docs and tests. Seems to work fine in my local tests however.
Fixes: #5573
Fixes: #18056
Fixes: #20485