8246114: java/net/MulticastSocket/Promiscuous.java fails after 8241072 (multi-homed systems)

Fixed the test - an IPv4 group cannot be joined from an interface that has no IPv4 address configured

Reviewed-by: alanb, amlu
This commit is contained in:
Daniel Fuchs 2020-06-30 18:52:59 +01:00
parent abc55dea7e
commit 0f43de9f02

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2020, 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
@ -119,7 +119,7 @@ public class Promiscuous {
// join groups on all network interfaces
NetworkConfiguration.probe()
.multicastInterfaces(false)
.ip4MulticastInterfaces(false)
.forEach((nic) -> {
try {
mc1.joinGroup(toSocketAddress(group1), nic);
@ -155,7 +155,7 @@ public class Promiscuous {
// leave groups on all network interfaces
NetworkConfiguration.probe()
.multicastInterfaces(false)
.ip4MulticastInterfaces(false)
.forEach((nic) -> {
try {
mc1.leaveGroup(toSocketAddress(group1), nic);