daemon: windows: set DNS config on all adapters #46844
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related to:
- What I did
DNS config is a property of each adapter on Windows, thus we've a dedicated
EndpointOption
for that.The list of
EndpointOption
that should be applied to a given endpoint is built bybuildCreateEndpointOptions
. This function contains a seemingly flawed condition that adds the DNS config iff:While 1. does make sense, there's actually no justification for 2., hence this commit remove this part of the condition.
This logic flaw has been made obvious by 0fd0e82, but it was originally introduced by d1e0a78. Commit and PR comments don't mention why this is done like so. Most probably, this was overlooked both by the original author and the PR reviewers.