< prev index next >

test/jdk/java/net/MulticastSocket/NoLoopbackPackets.java

Print this page
rev 55983 : 8229706: java/net/MulticastSocket/NoLoopbackPackets.java fails on some AIX machines

*** 27,36 **** --- 27,37 ---- * @library /test/lib * @summary Re-test IPv6 (and specifically MulticastSocket) with latest Linux & USAGI code */ import java.util.*; import java.net.*; + import jdk.test.lib.NetworkConfiguration; import jdk.test.lib.net.IPSupport; public class NoLoopbackPackets { private static String osname;
*** 60,70 **** // List<SocketAddress> groups = new ArrayList<SocketAddress>(); if (IPSupport.hasIPv4()) { groups.add(new InetSocketAddress(InetAddress.getByName("224.1.1.1"), port)); } ! if (IPSupport.hasIPv6()) { groups.add(new InetSocketAddress(InetAddress.getByName("::ffff:224.1.1.2"), port)); groups.add(new InetSocketAddress(InetAddress.getByName("ff02::1:1"), port)); } if (groups.isEmpty()) { System.err.println("Nothing to test: there are no network interfaces"); --- 61,74 ---- // List<SocketAddress> groups = new ArrayList<SocketAddress>(); if (IPSupport.hasIPv4()) { groups.add(new InetSocketAddress(InetAddress.getByName("224.1.1.1"), port)); } ! ! // see also JDK-8207404 where similar checks were added ! 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)); } if (groups.isEmpty()) { System.err.println("Nothing to test: there are no network interfaces");
< prev index next >