-
Bug
-
Resolution: Fixed
-
P4
-
9
-
b129
-
Not verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8183723 | 8u161 | Christoph Langer | P4 | Resolved | Fixed | b01 |
JDK-8164849 | 8u152 | Christoph Langer | P4 | Resolved | Fixed | b01 |
JDK-8192459 | emb-8u161 | Christoph Langer | P4 | Resolved | Fixed | b01 |
The coding to list network interfaces contains several minor bugs and issues which should be addressed:
- have an explicit implementation of enumIPv4Interfaces and enumIPv6Interfaces for the 4 main Unix types (Linux, AIX, Solaris, BSD) to make the code more readable
- consolidate detection of subnets/network prefixes and broadcast addresses into the enumIPv*Interfaces methods to avoid redundant/unnecessary ioctl calls
- never detect broadcast addresses for IPv6 interfaces as this does not apply for this address family
- remove some unused variable declarations
- enumIPv4Interfaces on Linux/AIX: add misising SIOCGIFFLAGS call and fix flags check before determining broadcast address (only return broadcast address if IFF_BROADCAST flag is set)
- enumIPv6Interfaces on AIX: add network prefix detection
- enumIPv6Interfaces on Linux: optimization, avoid unnecessary memcpy
- enumIPv6Interfaces on BSD: remove ioctl call for netmask detection as the information is already contained in getifaddrs result
- remove redundant check for ifname==NULL in getMTU
- have an explicit implementation of enumIPv4Interfaces and enumIPv6Interfaces for the 4 main Unix types (Linux, AIX, Solaris, BSD) to make the code more readable
- consolidate detection of subnets/network prefixes and broadcast addresses into the enumIPv*Interfaces methods to avoid redundant/unnecessary ioctl calls
- never detect broadcast addresses for IPv6 interfaces as this does not apply for this address family
- remove some unused variable declarations
- enumIPv4Interfaces on Linux/AIX: add misising SIOCGIFFLAGS call and fix flags check before determining broadcast address (only return broadcast address if IFF_BROADCAST flag is set)
- enumIPv6Interfaces on AIX: add network prefix detection
- enumIPv6Interfaces on Linux: optimization, avoid unnecessary memcpy
- enumIPv6Interfaces on BSD: remove ioctl call for netmask detection as the information is already contained in getifaddrs result
- remove redundant check for ifname==NULL in getMTU
- backported by
-
JDK-8164849 java.net.NetworkInterface - fixes and improvements for network interface listing
-
- Resolved
-
-
JDK-8183723 java.net.NetworkInterface - fixes and improvements for network interface listing
-
- Resolved
-
-
JDK-8192459 java.net.NetworkInterface - fixes and improvements for network interface listing
-
- Resolved
-
- relates to
-
JDK-8165320 Small flaw when integrating 8160174 to JDK8
-
- Resolved
-