File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
test/jdk/java/net/MulticastSocket Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 29
29
*/
30
30
import java .util .*;
31
31
import java .net .*;
32
+ import jdk .test .lib .NetworkConfiguration ;
32
33
import jdk .test .lib .net .IPSupport ;
33
34
34
35
public class NoLoopbackPackets {
@@ -62,7 +63,9 @@ public static void main(String[] args) throws Exception {
62
63
if (IPSupport .hasIPv4 ()) {
63
64
groups .add (new InetSocketAddress (InetAddress .getByName ("224.1.1.1" ), port ));
64
65
}
65
- if (IPSupport .hasIPv6 ()) {
66
+
67
+ NetworkConfiguration nc = NetworkConfiguration .probe ();
68
+ if (IPSupport .hasIPv6 () && nc .hasTestableIPv6Address ()) {
66
69
groups .add (new InetSocketAddress (InetAddress .getByName ("::ffff:224.1.1.2" ), port ));
67
70
groups .add (new InetSocketAddress (InetAddress .getByName ("ff02::1:1" ), port ));
68
71
}
You can’t perform that action at this time.
0 commit comments