Details
-
Bug
-
Resolution: Fixed
-
P2
-
8, 9
-
b32
-
windows_2012, windows_8
-
Verified
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8084316 | emb-9 | Chris Hegarty | P2 | Resolved | Fixed | team |
JDK-8063863 | 8u45 | Chris Hegarty | P2 | Resolved | Fixed | b01 |
JDK-8058323 | 8u40 | Chris Hegarty | P2 | Closed | Fixed | b08 |
JDK-8070131 | emb-8u47 | Chris Hegarty | P2 | Resolved | Fixed | team |
Description
$ cat ListHardwareAddresses.java
import java.net.*;
import java.util.*;
public class ListHardwareAddresses {
public static void main(String[] args) throws Exception {
Enumeration<NetworkInterface> netInterfaces = NetworkInterface.getNetworkInterfaces();
while (netInterfaces.hasMoreElements()) {
NetworkInterface netInterface = netInterfaces.nextElement();
byte[] addr = netInterface.getHardwareAddress();
System.out.format("%n%s : length %s", netInterface.getDisplayName(),
addr == null ? "null" : addr.length);
}
}
}
$ java ListHardwareAddresses
Software Loopback Interface 1 : length null
WAN Miniport (L2TP) : length null
WAN Miniport (SSTP) : length null
WAN Miniport (IKEv2) : length null
WAN Miniport (PPTP) : length null
WAN Miniport (PPPOE) : length null
WAN Miniport (IP) : length null
WAN Miniport (IPv6) : length null
WAN Miniport (Network Monitor) : length null
Microsoft Kernel Debug Network Adapter : length null
RAS Async Adapter : length null
Oracle VM Virtual Ethernet Adapter : length 6
Oracle VM Virtual Ethernet Adapter #2 : length null
Microsoft ISATAP Adapter #3 : length 8
WAN Miniport (IP)-WFP Native MAC Layer LightWeight Filter-0000 : length null
WAN Miniport (IP)-QoS Packet Scheduler-0000 : length null
WAN Miniport (IPv6)-WFP Native MAC Layer LightWeight Filter-0000 : length null
WAN Miniport (IPv6)-QoS Packet Scheduler-0000 : length null
WAN Miniport (Network Monitor)-WFP Native MAC Layer LightWeight Filter-0000 : length null
WAN Miniport (Network Monitor)-QoS Packet Scheduler-0000 : length null
Oracle VM Virtual Ethernet Adapter-WFP Native MAC Layer LightWeight Filter-0000 : length null
Oracle VM Virtual Ethernet Adapter-QoS Packet Scheduler-0000 : length null
Oracle VM Virtual Ethernet Adapter-WFP 802.3 MAC Layer LightWeight Filter-0000 : length null
$ java -Djava.net.preferIPv4Stack=true ListHardwareAddresses
Software Loopback Interface 1 : length null
WAN Miniport (L2TP) : length null
WAN Miniport (SSTP) : length null
WAN Miniport (IKEv2) : length null
WAN Miniport (PPTP) : length null
WAN Miniport (PPPOE) : length null
WAN Miniport (IP) : length 0
WAN Miniport (IPv6) : length 0
WAN Miniport (Network Monitor) : length 0
Microsoft Kernel Debug Network Adapter : length 0
RAS Async Adapter : length null
Oracle VM Virtual Ethernet Adapter : length 6
Oracle VM Virtual Ethernet Adapter #2 : length 6
Microsoft ISATAP Adapter #3 : length null
WAN Miniport (IP)-WFP Native MAC Layer LightWeight Filter-0000 : length 0
WAN Miniport (IP)-QoS Packet Scheduler-0000 : length 0
WAN Miniport (IPv6)-WFP Native MAC Layer LightWeight Filter-0000 : length 0
WAN Miniport (IPv6)-QoS Packet Scheduler-0000 : length 0
WAN Miniport (Network Monitor)-WFP Native MAC Layer LightWeight Filter-0000 : length 0
WAN Miniport (Network Monitor)-QoS Packet Scheduler-0000 : length 0
Oracle VM Virtual Ethernet Adapter-WFP Native MAC Layer LightWeight Filter-0000 : length 6
Oracle VM Virtual Ethernet Adapter-QoS Packet Scheduler-0000 : length 6
Oracle VM Virtual Ethernet Adapter-WFP 802.3 MAC Layer LightWeight Filter-0000 : length 6
import java.net.*;
import java.util.*;
public class ListHardwareAddresses {
public static void main(String[] args) throws Exception {
Enumeration<NetworkInterface> netInterfaces = NetworkInterface.getNetworkInterfaces();
while (netInterfaces.hasMoreElements()) {
NetworkInterface netInterface = netInterfaces.nextElement();
byte[] addr = netInterface.getHardwareAddress();
System.out.format("%n%s : length %s", netInterface.getDisplayName(),
addr == null ? "null" : addr.length);
}
}
}
$ java ListHardwareAddresses
Software Loopback Interface 1 : length null
WAN Miniport (L2TP) : length null
WAN Miniport (SSTP) : length null
WAN Miniport (IKEv2) : length null
WAN Miniport (PPTP) : length null
WAN Miniport (PPPOE) : length null
WAN Miniport (IP) : length null
WAN Miniport (IPv6) : length null
WAN Miniport (Network Monitor) : length null
Microsoft Kernel Debug Network Adapter : length null
RAS Async Adapter : length null
Oracle VM Virtual Ethernet Adapter : length 6
Oracle VM Virtual Ethernet Adapter #2 : length null
Microsoft ISATAP Adapter #3 : length 8
WAN Miniport (IP)-WFP Native MAC Layer LightWeight Filter-0000 : length null
WAN Miniport (IP)-QoS Packet Scheduler-0000 : length null
WAN Miniport (IPv6)-WFP Native MAC Layer LightWeight Filter-0000 : length null
WAN Miniport (IPv6)-QoS Packet Scheduler-0000 : length null
WAN Miniport (Network Monitor)-WFP Native MAC Layer LightWeight Filter-0000 : length null
WAN Miniport (Network Monitor)-QoS Packet Scheduler-0000 : length null
Oracle VM Virtual Ethernet Adapter-WFP Native MAC Layer LightWeight Filter-0000 : length null
Oracle VM Virtual Ethernet Adapter-QoS Packet Scheduler-0000 : length null
Oracle VM Virtual Ethernet Adapter-WFP 802.3 MAC Layer LightWeight Filter-0000 : length null
$ java -Djava.net.preferIPv4Stack=true ListHardwareAddresses
Software Loopback Interface 1 : length null
WAN Miniport (L2TP) : length null
WAN Miniport (SSTP) : length null
WAN Miniport (IKEv2) : length null
WAN Miniport (PPTP) : length null
WAN Miniport (PPPOE) : length null
WAN Miniport (IP) : length 0
WAN Miniport (IPv6) : length 0
WAN Miniport (Network Monitor) : length 0
Microsoft Kernel Debug Network Adapter : length 0
RAS Async Adapter : length null
Oracle VM Virtual Ethernet Adapter : length 6
Oracle VM Virtual Ethernet Adapter #2 : length 6
Microsoft ISATAP Adapter #3 : length null
WAN Miniport (IP)-WFP Native MAC Layer LightWeight Filter-0000 : length 0
WAN Miniport (IP)-QoS Packet Scheduler-0000 : length 0
WAN Miniport (IPv6)-WFP Native MAC Layer LightWeight Filter-0000 : length 0
WAN Miniport (IPv6)-QoS Packet Scheduler-0000 : length 0
WAN Miniport (Network Monitor)-WFP Native MAC Layer LightWeight Filter-0000 : length 0
WAN Miniport (Network Monitor)-QoS Packet Scheduler-0000 : length 0
Oracle VM Virtual Ethernet Adapter-WFP Native MAC Layer LightWeight Filter-0000 : length 6
Oracle VM Virtual Ethernet Adapter-QoS Packet Scheduler-0000 : length 6
Oracle VM Virtual Ethernet Adapter-WFP 802.3 MAC Layer LightWeight Filter-0000 : length 6
Attachments
Issue Links
- backported by
-
JDK-8063863 NetworkInterface.getHardwareAddress can return zero length byte array when run with preferIPv4Stack
- Resolved
-
JDK-8070131 NetworkInterface.getHardwareAddress can return zero length byte array when run with preferIPv4Stack
- Resolved
-
JDK-8084316 NetworkInterface.getHardwareAddress can return zero length byte array when run with preferIPv4Stack
- Resolved
-
JDK-8058323 NetworkInterface.getHardwareAddress can return zero length byte array when run with preferIPv4Stack
- Closed
- relates to
-
JDK-6594296 NetworkInterface.getHardwareAddress returns zero length byte array
- Closed