forked from netty/netty
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prefer the NIC with global IP address when getting the default machin…
…e ID Motivation: When there are two MAC addresses which are good enough, we can choose the one with better IP address rather than just choosing the first appeared one. Modification: Replace isBetterAddress() with compareAddresses() to make it return if both addresses are in the same preference level. Add compareAddresses() which compare InetAddresses and use it when compareAddress(byte[], byte[]) returns 0 (same preference) Result: More correct primary MAC address detection
- Loading branch information
Showing
1 changed file
with
65 additions
and
16 deletions.
There are no files selected for viewing
This file contains 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