Skip to content
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

resolved: turn off search domain logic for queries for dot-suffixed domains #17194

Merged
merged 2 commits into from Sep 29, 2020

Conversation

poettering
Copy link
Member

@poettering poettering commented Sep 29, 2020

This implies the SD_RESOLVED_NO_SEARCH flag if the specified domain for lookups has a trailing dot. Thus resolvectl query --search=false foo and resolvectl query foo. become equivalent.

This only touches requests via D-Bus and Varlink (and thus glibc nss through nss-resolve). Requests via the local DNS stub are untouched, because for them SD_RESOLVED_NO_SEARCH is implied anyway as search path stuff is done client side.

…mains

Let's turn off the search domain logic if a trailing dot is specified
when looking up hostnames and RRs via the Varlink + D-Bus APIs (and thus
also when doing so via nss-resolve). (This doesn't affect lookups via
the stub, since for the any search path logic is done client side
anyway)

It might make sense to force the DNS protocol in this case too (and
disable LLMR + mDNS), but we'll leave that for a different PR — if it
even makes sense. It might also make sense to disable the logic of never
routing single-label lookups to the Internet if a trailing to is
specified, but this needs more discussion too.
@keszybz
Copy link
Member

keszybz commented Sep 29, 2020

LGTM.

As you say in the commit message, we might do further changes, but whether we should is much less clear. This change done here is straightforward and I think the new behaviour is generally what people expect.

@keszybz keszybz added the good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed label Sep 29, 2020
@poettering poettering merged commit a182fa8 into systemd:master Sep 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed resolve
Development

Successfully merging this pull request may close these issues.

None yet

2 participants