From f44b5b581292a5cba4be2f9b1b2ec0140bb0ba88 Mon Sep 17 00:00:00 2001 From: Brandon Passanisi Date: Tue, 10 Jan 2012 10:57:12 +0000 Subject: [PATCH] 7123415: Some cases of network interface indexes being read incorrectly Reviewed-by: chegar --- jdk/src/solaris/native/java/net/net_util_md.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jdk/src/solaris/native/java/net/net_util_md.c b/jdk/src/solaris/native/java/net/net_util_md.c index b542f4187bc..963ef2e4416 100644 --- a/jdk/src/solaris/native/java/net/net_util_md.c +++ b/jdk/src/solaris/native/java/net/net_util_md.c @@ -588,7 +588,7 @@ static void initLoopbackRoutes() { int plen, scope, dad_status, if_idx; if ((f = fopen("/proc/net/if_inet6", "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) == 13) { @@ -1078,7 +1078,7 @@ int getDefaultIPv6Interface(struct in6_addr *target_addr) { int plen, scope, dad_status, if_idx; if ((f = fopen("/proc/net/if_inet6", "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) == 13) {