netty5/transport/src/main/java/io/netty
Trustin Lee 6cb238a673 Prefer the NIC with global IP address when getting the default machine 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
2014-03-21 13:01:55 +09:00
..
bootstrap Better exception message 2014-01-13 23:30:32 +09:00
channel Prefer the NIC with global IP address when getting the default machine ID 2014-03-21 13:01:55 +09:00