fix(nacos): backport loopback address filtering to 2025.0.x - #4363
Draft
coyaSONG wants to merge 1 commit into
Draft
fix(nacos): backport loopback address filtering to 2025.0.x#4363coyaSONG wants to merge 1 commit into
coyaSONG wants to merge 1 commit into
Conversation
|
|
Collaborator
|
Thank you for your first contribution. Please sign the CLA agreement above. |
Collaborator
|
Thank you for your first contribution. Please sign the CLA agreement above. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Describe what this PR does / why we need it
Backports #4350 to
2025.0.xso a configured Nacos discovery network interface cannot select an IPv4 loopback address before a usable address.Java previously parsed the condition as
IPv4 || (IPv6 && !loopback), which left IPv4 addresses outside the loopback check. The corrected grouping applies!isLoopbackAddress()to both address families.Does this pull request fix one issue?
Fixes #4362
Describe how you did it
NacosDiscoveryProperties.init()127.0.0.1before192.168.1.10Describe how to verify it
Using JDK 17.0.19:
192.168.1.10but actual127.0.0.1git diff --checkpassedCommands:
Special notes for reviews
This is a focused backport of the already merged 2025.1.x fix in #4350. Implementation and validation were assisted by OpenAI Codex; no human review is claimed.