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.
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
feat(#23388): Add a preferred address family option for network-interface #23389
feat(#23388): Add a preferred address family option for network-interface #23389
Changes from 5 commits
90c14ce
776aee5
e25064c
979e61f
6f8a18d
54e31d0
7970755
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Wouldn't this be an error if the
CIDR
s are not equal? also the error output showsnet.IP
which confused me for a sec.that causes the test to fail:
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.
Nice catch!
I'm a bit confused about how CIDR
127.0.0.1/8
result in IP address127.0.0.0
instead of127.0.0.1
I'm going to compare the IP instead of the CIDR. In the end, we want to make sure they are on the expected family.
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.
looks like
127.0.0.0
is coming from the testNetworkInterfaceDetectorOnlyLo
's usage ofnet.ParseCIDR
the mockish test interface implementation is only using the
IPNet
and discardingIP
.I agree using the IP for this test is fine, since it does confirm the by-family sorting behavior we're expecting to see. 👍