mirror of
https://github.com/openjdk/jdk.git
synced 2026-07-24 18:03:10 +00:00
8386595: Two java/net/MulticastSocket tests fail on machines with no ipv6 address other than loopback
Reviewed-by: jpai
This commit is contained in:
parent
e487b0dd02
commit
2ac4a2db14
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2007, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2007, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -56,7 +56,7 @@ public class NoLoopbackPackets {
|
||||
}
|
||||
|
||||
NetworkConfiguration nc = NetworkConfiguration.probe();
|
||||
if (IPSupport.hasIPv6() && nc.hasTestableIPv6Address()) {
|
||||
if (IPSupport.hasIPv6() && nc.ip6MulticastInterfaces().findAny().isPresent()) {
|
||||
groups.add(new InetSocketAddress(InetAddress.getByName("::ffff:224.1.1.2"), port));
|
||||
groups.add(new InetSocketAddress(InetAddress.getByName("ff02::1:1"), port));
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -141,7 +141,7 @@ public class Test {
|
||||
doTest("224.80.80.80");
|
||||
|
||||
// If IPv6 is enabled perform multicast tests with various scopes
|
||||
if (nc.hasTestableIPv6Address()) {
|
||||
if (nc.ip6MulticastInterfaces().findAny().isPresent()) {
|
||||
doTest("ff01::a");
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user