-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Ordering of getipaddrs
is inconsistent with system network interfaces
#32179
Comments
So would doing a stable sort by type be adequate? |
I think so. The simplest solution would be to avoid the sort entirely. |
The idea behind the sort was that |
I would say that |
Triage is in favor. Would you mind making a PR, @omus? |
Fixed by #32260 |
Introduced in #30609 the output from
getipaddrs
is now sorted byIPAddr
type and then IP address. Sorting this way ends up ignoring the network interface ordering of the system and may pick a less preferred interface.For example on my system the current behaviour is:
Where
ip"192.168.1.63"
is from my primary network interface "en0" and is my preferred address. The sorting also impactsgetipaddr()
which always returns the first address fromgetipaddrs
:The behaviour is different from previous versions of Julia and could cause issues when setting up a cluster.
We probably should avoid sorting the addresses from
getipaddrs
and at most only perform sorting of addresses that are from the same interface.The text was updated successfully, but these errors were encountered: