yym108 opened a new pull request, #11240: URL: https://github.com/apache/rocketmq/pull/11240
### Which Issue(s) This PR Fixes - Fixes #9859 ### Brief Description Backport #5856 (`e0ed87dc9c261b74225de5b67acee141d36ff593`) to **4.9.x**. Treat `127.0.0.0/8` as internal and allow a later private IPv4 address to replace a stored loopback candidate, preventing interface enumeration order from making `UtilAll.getIP()` choose loopback when a usable private address is available. The commit retains credit to the original author. ### How Did You Test This Change? - `UtilAllTest`: all 12 tests passed on macOS ARM64 with Zulu JDK 21, including 3 new tests for loopback, private ranges and public IPv4 boundaries. - Command: `mvn -B -pl common -am -Dtest=UtilAllTest -Dsurefire.failIfNoSpecifiedTests=false -Djacoco-maven-plugin.version=0.8.12 verify`. - Verified that the production change matches the original #5856 patch; `git diff --check` passed. - The added tests cover address classification; they do not simulate network-interface enumeration order. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
