Skip to content

resolved: allow LLMNR & DNS to both resolve short names - #11425

Closed
aaronp24 wants to merge 1 commit into
systemd:masterfrom
aaronp24:fix-dns-search-with-llmnr
Closed

aaronp24 wants to merge 1 commit into
systemd:masterfrom
aaronp24:fix-dns-search-with-llmnr

Conversation

@aaronp24

@aaronp24 aaronp24 commented Jan 14, 2019 •

Copy link
Copy Markdown
Contributor

Commit 1750854 caused a regression in the
handling of single-label name lookups on interfaces that have both link-local
multicast name resolution (LLMNR) and DNS enabled. The expected behavior is for
the DNS search domains to be appended when looking up a short name, but that
commit modified dns_scope_good_domain() to cause it to return
DNS_SCOPE_YES_BASE + 1 for the LLMNR scope for all short names, preventing
dns_query_go() from even attempting to use DNS.

Fix the problem by reverting the part of commit 1750854 that affected
DNS_PROTOCOL_LLMNR. Go back to returning DNS_SCOPE_MAYBE for single-label names.

Fixes #11391

Commit 1750854 caused a regression in the
handling of single-label name lookups on interfaces that have both link-local
multicast name resolution (LLMNR) and DNS enabled. The expected behavior is for
the DNS search domains to be appended when looking up a short name, but that
commit modified dns_scope_good_domain() to cause it to return DNS_SCOPE_YES_BASE
+ 1 for the LLMNR scope for all short names, preventing dns_query_go() from even
attempting to use DNS.

Fix the problem by reverting the part of commit 1750854 that affected
DNS_PROTOCOL_LLMNR. Go back to returning DNS_SCOPE_MAYBE for single-label names.

Fixes systemd#11391
@aaronp24

Copy link
Copy Markdown
Contributor Author

+@poettering since this is reverting part of one of his changes.

@aaronp24

Copy link
Copy Markdown
Contributor Author

Is there someone who can interpret this bionic-i386 test failure? The log is 12 MB and full of errors that don't seem to be fatal, so it's hard to tell what's actually going wrong or whether it's relevant.

@aaronp24

Copy link
Copy Markdown
Contributor Author

Looking into it some more, it looks like systemd-run is pretty broken, even without this change. Just running systemd-run --wait -p FailureAction="echo hi" false causes PID 1 to abort.

@aaronp24

Copy link
Copy Markdown
Contributor Author

I misunderstood how FailureAction works and fixed this particular problem with #11451

I don't know if that's related to this CI failure, because it uses FailureAction with /bin/true and SuccessAction with /bin/false, so it shouldn't be hitting that particular abort. I still don't know why it timed out and can't reproduce that problem on my system.

@keszybz keszybz added this to the v241 milestone Jan 17, 2019
@poettering

Copy link
Copy Markdown
Member

Hmm, I think this should go the opposite direction: single-label nmes should be bound to classic DNS scopes which have search domains defined with a higher preference, too. will prep a fix for that.

@poettering

Copy link
Copy Markdown
Member

I prepped #11485 that goes the opposite direction. Instead of lowering the preference single-label queries get for LLMNR scopes it increases the preference for single-label queries on DNS scopes that have at least one search domain applied.

I think that's better approach, as the reason why 1750854 was made of course still applies: we want that LLMNR is preferably used for single label names over scopes that have "." on their search domain list...

@poettering

Copy link
Copy Markdown
Member

Let's close this one hence in favour of #11485. I hope that makes sense?

@poettering poettering closed this Jan 18, 2019
@aaronp24
aaronp24 deleted the fix-dns-search-with-llmnr branch January 19, 2019 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

4 participants