7078386: NetworkInterface.getNetworkInterfaces() may return corrupted results on linux
Reviewed-by: michaelm, alanb, chegar
Contributed-by: brandon.passanisi@oracle.com
--- a/jdk/src/solaris/native/java/net/NetworkInterface.c Wed Dec 21 17:09:39 2011 +0900
+++ b/jdk/src/solaris/native/java/net/NetworkInterface.c Wed Dec 21 10:06:32 2011 +0000
@@ -1109,7 +1109,7 @@
uint8_t ipv6addr[16];
if ((f = fopen(_PATH_PROCNET_IFINET6, "r")) != NULL) {
- while (fscanf(f, "%4s%4s%4s%4s%4s%4s%4s%4s %02x %02x %02x %02x %20s\n",
+ while (fscanf(f, "%4s%4s%4s%4s%4s%4s%4s%4s %08x %02x %02x %02x %20s\n",
addr6p[0], addr6p[1], addr6p[2], addr6p[3], addr6p[4], addr6p[5], addr6p[6], addr6p[7],
&if_idx, &plen, &scope, &dad_status, devname) != EOF) {