-
-
Notifications
You must be signed in to change notification settings - Fork 15.9k
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
Incorrect UnixResolverDnsServerAddressStreamProvider #6736
Comments
@trustin can you submit a pr with a fix ? |
Can't promise it at the moment because of busyness... 😢 |
The behavior of modifying the hostname should be provided at a higher layer (e.g. DnsNameResolverContext.java). However |
See PR #6748 |
…ion and ordering bug Motivation: UnixResolverDnsServerAddressStreamProvider allows the default name server address stream to be null, but there should always be a default stream to fall back to ([1] Search Strategy). UnixResolverDnsServerAddressStreamProvider currently shuffles the names servers are multiple are present, but the defined behavior is to try them sequentially [2]. [1] Search Strategy Section - https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man5/resolver.5.html [2] DESCRIPTION/nameserver Section - https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man5/resolver.5.html Modifications: - UnixResolverDnsServerAddressStreamProvider should always use the first file provided to derive the default domain server address stream. Currently if there are multiple domain names in the file identified by the first argument of the constructor then one will be selected at random. - UnixResolverDnsServerAddressStreamProvider should return name servers sequentially. - Reduce access level on some methods which don't have known use-cases externally. Result: Fixes netty#6736
…ion and ordering bug Motivation: UnixResolverDnsServerAddressStreamProvider allows the default name server address stream to be null, but there should always be a default stream to fall back to ([1] Search Strategy). UnixResolverDnsServerAddressStreamProvider currently shuffles the names servers are multiple are present, but the defined behavior is to try them sequentially [2]. [1] Search Strategy Section - https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man5/resolver.5.html [2] DESCRIPTION/nameserver Section - https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man5/resolver.5.html Modifications: - UnixResolverDnsServerAddressStreamProvider should always use the first file provided to derive the default domain server address stream. Currently if there are multiple domain names in the file identified by the first argument of the constructor then one will be selected at random. - UnixResolverDnsServerAddressStreamProvider should return name servers sequentially. - Reduce access level on some methods which don't have known use-cases externally. Result: Fixes netty#6736
…ion and ordering bug Motivation: UnixResolverDnsServerAddressStreamProvider allows the default name server address stream to be null, but there should always be a default stream to fall back to ([1] Search Strategy). UnixResolverDnsServerAddressStreamProvider currently shuffles the names servers are multiple are present, but the defined behavior is to try them sequentially [2]. [1] Search Strategy Section - https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man5/resolver.5.html [2] DESCRIPTION/nameserver Section - https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man5/resolver.5.html Modifications: - UnixResolverDnsServerAddressStreamProvider should always use the first file provided to derive the default domain server address stream. Currently if there are multiple domain names in the file identified by the first argument of the constructor then one will be selected at random. - UnixResolverDnsServerAddressStreamProvider should return name servers sequentially. - Reduce access level on some methods which don't have known use-cases externally. Result: Fixes netty#6736
Minimal yet complete reproducer code (or URL to code)
Expected behavior
UnixResolverDnsServerAddressStreamProvider.nameServerAddressStream()
should not returnnull
.The expected behavior of
DnsNameResolver
is to trysomehost.
and thensomehost.linecorp.local.
Actual behavior
Attempting to resolve a host will trigger a NPE:
Netty version
4.1.11
Workaround
Use
DefaultDnsServerAddressStreamProvider.INSTANCE
instead ofDnsServerAddressStreamProviders.platformDefault()
.The text was updated successfully, but these errors were encountered: