Repository navigation
fix: normalize DNS search-domain settings #3816
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -54,6 +54,13 @@ There are currently two implementations: | |
|
|
||
| `inet-address` is the default implementation as it pre-dates `async-dns`, `async-dns` may become the default in a future release. | ||
|
|
||
| For both `/etc/resolv.conf` and `pekko.io.dns.async-dns.search-domains`, `async-dns` ignores the exact | ||
| root marker `.`. If `.` is the only entry, the resolver does not append any search suffixes. A single | ||
| leading dot is removed from other search suffixes: `.example.org` is treated as `example.org`. | ||
| Identical entries after normalization are used once, in first-occurrence order. An explicitly | ||
| empty entry still adds no suffix at its position in that order. Trailing dots and `ndots` | ||
| are unchanged. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: the comment on |
||
|
|
||
| DNS lookups can be done via the `DNS` extension: | ||
|
|
||
| Scala | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Edge case: the root marker is filtered before the leading dot is stripped, so an entry of
..gets past the filter and is then turned into.. That leaves the root marker inSearchDomains, andAsyncDnsResolverbuildsname..from it, which is what this change is meant to avoid.It is an unlikely value, but could the root marker be filtered again after the strip, e.g.
Keeping the first filter matters, since stripping a plain
.would otherwise turn it into an explicit empty entry. A test case with..in the list would cover it.