changeset 1703:5b1aaf2d7504

6884837: JTReg test SetOutgoingIf is not correct Summary: Added check of network interfaces status Reviewed-by: alanb, chegar
author ptisnovs
date Wed, 30 Sep 2009 11:49:10 +0200
parents bd928aefe692
children 896cbd9c91f4
files test/java/net/MulticastSocket/SetOutgoingIf.java
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/test/java/net/MulticastSocket/SetOutgoingIf.java	Thu Sep 24 21:35:34 2009 +0800
+++ b/test/java/net/MulticastSocket/SetOutgoingIf.java	Wed Sep 30 11:49:10 2009 +0200
@@ -70,7 +70,8 @@
         //
         List<NetworkInterface> nics = new ArrayList<NetworkInterface>();
         for (NetworkInterface nic : Collections.list(NetworkInterface.getNetworkInterfaces())) {
-            if (!nic.isLoopback())
+            // we should use only network interfaces with multicast support which are in "up" state
+            if (!nic.isLoopback() && nic.supportsMulticast() && nic.isUp())
                 nics.add(nic);
         }
         if (nics.size() <= 1) {