changeset 56085:85fbdb87baad

8229706: java/net/MulticastSocket/NoLoopbackPackets.java fails on some AIX machines Reviewed-by: chegar, clanger
author mbaesken
date Wed, 14 Aug 2019 15:07:04 +0200
parents c414c554b38b
children cb836bd08d58
files test/jdk/java/net/MulticastSocket/NoLoopbackPackets.java
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/test/jdk/java/net/MulticastSocket/NoLoopbackPackets.java	Mon Aug 26 07:14:15 2019 -0700
+++ b/test/jdk/java/net/MulticastSocket/NoLoopbackPackets.java	Wed Aug 14 15:07:04 2019 +0200
@@ -29,6 +29,7 @@
  */
 import java.util.*;
 import java.net.*;
+import jdk.test.lib.NetworkConfiguration;
 import jdk.test.lib.net.IPSupport;
 
 public class NoLoopbackPackets {
@@ -62,7 +63,9 @@
             if (IPSupport.hasIPv4()) {
                 groups.add(new InetSocketAddress(InetAddress.getByName("224.1.1.1"), port));
             }
-            if (IPSupport.hasIPv6()) {
+
+            NetworkConfiguration nc = NetworkConfiguration.probe();
+            if (IPSupport.hasIPv6() && nc.hasTestableIPv6Address()) {
                 groups.add(new InetSocketAddress(InetAddress.getByName("::ffff:224.1.1.2"), port));
                 groups.add(new InetSocketAddress(InetAddress.getByName("ff02::1:1"), port));
             }