diff options
author | jfrijters <jfrijters> | 2012-03-11 14:43:06 +0400 |
---|---|---|
committer | jfrijters <jfrijters> | 2012-03-11 14:43:06 +0400 |
commit | 1e8b49bd583561a84835ee7657e9c9637d28a792 (patch) | |
tree | 1b5cd67e1b3cd12155a45c3ecd1efec22adcc119 /openjdk/java/net | |
parent | 9c3d32b9e4d8cb61fd3508ca00cb556d489687b7 (diff) |
When the scope ID is zero we should pass -1 to the Inet6Address constructor (this will cause its scope_id to remain 0 and scope_id_set to remain false).
Diffstat (limited to 'openjdk/java/net')
-rw-r--r-- | openjdk/java/net/net_util_md.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/openjdk/java/net/net_util_md.java b/openjdk/java/net/net_util_md.java index 62b3e8b5..e9297696 100644 --- a/openjdk/java/net/net_util_md.java +++ b/openjdk/java/net/net_util_md.java @@ -746,7 +746,8 @@ final class net_util_md if (NET_IsIPv4Mapped(caddr)) { iaObj = new Inet4Address(null, NET_IPv4MappedToIPv4(caddr)); } else { - iaObj = new Inet6Address(null, caddr, getScopeID(him)); + int scope = getScopeID(him); + iaObj = new Inet6Address(null, caddr, scope > 0 ? scope : -1); } port[0] = ntohs(him.him6.sin_port); } else { |