On Tue, 15 Apr 2025 08:58:21 GMT, Jaikiran Pai <j...@openjdk.org> wrote:
> Can I please get a review of this change which proposes to address the issue > noted in https://bugs.openjdk.org/browse/JDK-8354576? > > As noted in that issue, the current code in the `lookupAllHostAddr()` > function of `Inet4AddressImpl.c` and `Inet6AddressImpl.c` has a macos > specific implementation, where we call `getifaddrs()` and iterate over the > returned addresses. In its current form this code doesn't check to see if the > interface is UP or not. This can result in returing an address belonging to > an interface which is not UP. That can cause subsequent usage of the address > for networking operations to result in a "Network is down" error. > > The commit in this PR skips interfaces that are not UP. The change only > impacts the result of `getLocalHost()` call and that too only on macos. Given > the nature of this change no new regression test has been introduced. > Existing tests in tier1, tier2 and tier3 continue to pass with this change. Look reasonable to me. ------------- Marked as reviewed by dfuchs (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24653#pullrequestreview-2768259475