changeset 6451:2578df0c85f1

7078386: NetworkInterface.getNetworkInterfaces() may return corrupted results on linux Reviewed-by: michaelm, alanb, chegar Contributed-by: brandon.passanisi@oracle.com
author michaelm
date Wed, 21 Dec 2011 10:06:32 +0000
parents 491e3b0c2105
children 901e346b6238
files src/solaris/native/java/net/NetworkInterface.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/solaris/native/java/net/NetworkInterface.c	Wed Mar 06 20:30:47 2013 +0400
+++ b/src/solaris/native/java/net/NetworkInterface.c	Wed Dec 21 10:06:32 2011 +0000
@@ -1129,7 +1129,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) {