Skip to content

Re-order list of resolvers according to their searchOrder#11236

Merged
normanmaurer merged 1 commit intonetty:4.1from
gwre-ivan:fixing-resolvers-ordering
May 11, 2021
Merged

Re-order list of resolvers according to their searchOrder#11236
normanmaurer merged 1 commit intonetty:4.1from
gwre-ivan:fixing-resolvers-ordering

Conversation

@gwre-ivan
Copy link
Copy Markdown
Contributor

@gwre-ivan gwre-ivan commented May 7, 2021

Motivation:
Mac OS specific DNS resolver fails to take into account search order
of resolvers causing wrong resolver being used is some circumstances

Modifications:
Re-order array of resolvers using their sort order as an ordering key.
Final order is opposite of the search order to make sure that resolver
with the lower sort order goes last (so it overrides previous one
in the resolverMap).

Result:
Fixes issue #11225

@normanmaurer
Copy link
Copy Markdown
Member

@gwre-ivan did you sign our icla:

https://netty.io/s/icla

@normanmaurer normanmaurer added this to the 4.1.64.Final milestone May 10, 2021
@gwre-ivan gwre-ivan force-pushed the fixing-resolvers-ordering branch from 8d2ff4d to 9432206 Compare May 10, 2021 14:46
@normanmaurer
Copy link
Copy Markdown
Member

@gwre-ivan ok once you signed the ICLA (https://netty.io/s/icla) I can merge this in ... thanks!

@gwre-ivan
Copy link
Copy Markdown
Contributor Author

Signed.

@normanmaurer
Copy link
Copy Markdown
Member

@gwre-ivan please fix the check style error:

Error:  /home/runner/work/netty/netty/resolver-dns-native-macos/src/main/java/io/netty/resolver/dns/macos/MacOSDnsServerAddressStreamProvider.java:52: Line is longer than 120 characters (found 128). [LineLength]
5083
Audit done.

Motivation:
Mac OS specific DNS resolver fails to take into account search order
of resolvers causing wrong resolver being used is some circumstances

Modifications:
Re-order array of resolvers using their sort order as an ordering key.
Final order is opposite of the search order to make sure that resolver
with the lower sort order goes last (so it overrides previous one
in the `resolverMap`).

Result:
Fixes issue netty#11225
@gwre-ivan gwre-ivan force-pushed the fixing-resolvers-ordering branch from 9432206 to d77aedc Compare May 10, 2021 15:58
@normanmaurer normanmaurer merged commit 0d00903 into netty:4.1 May 11, 2021
@normanmaurer
Copy link
Copy Markdown
Member

@gwre-ivan thanks a lot!

normanmaurer pushed a commit that referenced this pull request May 11, 2021
Motivation:
Mac OS specific DNS resolver fails to take into account search order
of resolvers causing wrong resolver being used is some circumstances

Modifications:
Re-order array of resolvers using their sort order as an ordering key.
Final order is opposite of the search order to make sure that resolver
with the lower sort order goes last (so it overrides previous one
in the `resolverMap`).

Result:
Fixes issue #11225
raidyue pushed a commit to raidyue/netty that referenced this pull request Jul 8, 2022
Motivation:
Mac OS specific DNS resolver fails to take into account search order
of resolvers causing wrong resolver being used is some circumstances

Modifications:
Re-order array of resolvers using their sort order as an ordering key.
Final order is opposite of the search order to make sure that resolver
with the lower sort order goes last (so it overrides previous one
in the `resolverMap`).

Result:
Fixes issue netty#11225
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants