Commit 9f858b07 by Gary Benson Committed by Gary Benson

NetworkInterface.java (getInetAddresses): Bracket IPv6 addresses.

2006-08-24  Gary Benson  <gbenson@redhat.com>

	* java/net/NetworkInterface.java (getInetAddresses): Bracket IPv6
	addresses.

From-SVN: r116375
parent a418679d
2006-08-24 Gary Benson <gbenson@redhat.com>
* java/net/NetworkInterface.java (getInetAddresses): Bracket IPv6
addresses.
2006-08-18 Roger Sayle <roger@eyesopen.com>
* scripts/check_jni_methods.sh: Don't use the "set -C" command
......
......@@ -112,7 +112,10 @@ public final class NetworkInterface
InetAddress addr = (InetAddress) addresses.nextElement();
try
{
s.checkConnect(addr.getHostAddress(), 58000);
String hostAddress = addr.getHostAddress();
if (addr instanceof Inet6Address)
hostAddress = "[" + hostAddress + "]";
s.checkConnect(hostAddress, 58000);
tmpInetAddresses.add(addr);
}
catch (SecurityException e)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment