test/jdk/java/net/MulticastSocket/PromiscuousIPv6.java
author prappo
Mon, 12 Nov 2018 12:55:36 +0000
changeset 52491 23b3a46fa159
permissions -rw-r--r--
8210493: Bind to node- or linklocal ipv6 multicast address fails Reviewed-by: alanb, chegar
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
52491
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
     1
/*
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
     2
 * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
     4
 *
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
     7
 * published by the Free Software Foundation.
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
     8
 *
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    13
 * accompanied this code).
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    14
 *
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    18
 *
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    21
 * questions.
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    22
 *
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    23
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    24
/*
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    25
 * @test
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    26
 * @bug 8210493
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    27
 * @requires os.family == "linux"
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    28
 * @library /test/lib
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    29
 * @build jdk.test.lib.NetworkConfiguration
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    30
 *        PromiscuousIPv6
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    31
 * @run main PromiscuousIPv6
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    32
 */
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    33
import jdk.test.lib.NetworkConfiguration;
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    34
import jtreg.SkippedException;
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    35
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    36
import java.io.IOException;
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    37
import java.net.DatagramPacket;
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    38
import java.net.DatagramSocket;
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    39
import java.net.InetAddress;
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    40
import java.net.InetSocketAddress;
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    41
import java.net.MulticastSocket;
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    42
import java.net.SocketTimeoutException;
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    43
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    44
import static java.lang.System.out;
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    45
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    46
/*
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    47
 * This test was created as a copy of the Promiscuous test and adapted for
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    48
 * IPv6 node-local and link-local multicast addresses on Linux.
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    49
 */
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    50
public class PromiscuousIPv6 {
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    51
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    52
    static final int TIMEOUT =  5 * 1000; // 5 secs
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    53
    static int id = 1000;
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    54
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    55
    static void receive(DatagramSocket mc, boolean datagramExpected, int id)
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    56
            throws IOException
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    57
    {
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    58
        byte[] ba = new byte[100];
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    59
        DatagramPacket p = new DatagramPacket(ba, ba.length);
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    60
        try {
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    61
            mc.receive(p);
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    62
            int recvId = Integer.parseInt(
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    63
                    new String(p.getData(), 0, p.getLength(), "UTF-8"));
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    64
            if (datagramExpected) {
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    65
                if (recvId != id)
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    66
                    throw new RuntimeException("Unexpected id, got " + recvId
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    67
                                                       + ", expected: " + id);
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    68
                out.printf("Received message as expected, %s\n", p.getAddress());
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    69
            } else {
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    70
                throw new RuntimeException("Unexpected message received, "
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    71
                                                   + p.getAddress());
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    72
            }
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    73
        } catch (SocketTimeoutException e) {
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    74
            if (datagramExpected)
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    75
                throw new RuntimeException("Expected message not received, "
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    76
                                                   + e.getMessage());
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    77
            else
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    78
                out.printf("Message not received, as expected\n");
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    79
        }
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    80
    }
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    81
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    82
    static void test(InetAddress group1, InetAddress group2)
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    83
            throws IOException
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    84
    {
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    85
        try (MulticastSocket mc1 = new MulticastSocket(new InetSocketAddress(group1, 0));
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    86
             MulticastSocket mc2 = new MulticastSocket(new InetSocketAddress(group2, mc1.getLocalPort()));
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    87
             DatagramSocket ds = new DatagramSocket()) {
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    88
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    89
            final int port = mc1.getLocalPort();
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    90
            out.printf("Using port: %d\n", port);
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    91
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    92
            mc1.setSoTimeout(TIMEOUT);
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    93
            mc2.setSoTimeout(TIMEOUT);
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    94
            int nextId = id;
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    95
            byte[] msg = Integer.toString(nextId).getBytes("UTF-8");
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    96
            DatagramPacket p = new DatagramPacket(msg, msg.length);
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    97
            p.setAddress(group1);
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    98
            p.setPort(port);
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
    99
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   100
            mc1.joinGroup(group1);
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   101
            out.printf("mc1 joined the MC group: %s\n", group1);
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   102
            mc2.joinGroup(group2);
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   103
            out.printf("mc2 joined the MC group: %s\n", group2);
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   104
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   105
            out.printf("Sending datagram to: %s/%d\n", group1, port);
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   106
            ds.send(p);
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   107
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   108
            // the packet should be received by mc1 only
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   109
            receive(mc1, true, nextId);
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   110
            receive(mc2, false, 0);
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   111
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   112
            nextId = ++id;
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   113
            msg = Integer.toString(nextId).getBytes("UTF-8");
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   114
            p = new DatagramPacket(msg, msg.length);
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   115
            p.setAddress(group2);
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   116
            p.setPort(port);
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   117
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   118
            out.printf("Sending datagram to: %s/%d\n", group2, port);
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   119
            ds.send(p);
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   120
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   121
            // the packet should be received by mc2 only
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   122
            receive(mc2, true, nextId);
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   123
            receive(mc1, false, 0);
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   124
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   125
            mc1.leaveGroup(group1);
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   126
            mc2.leaveGroup(group2);
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   127
        }
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   128
    }
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   129
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   130
    public static void main(String args[]) throws IOException {
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   131
        String os = System.getProperty("os.name");
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   132
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   133
        if (!os.equals("Linux")) {
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   134
            throw new SkippedException("This test should be run only on Linux");
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   135
        } else {
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   136
            String osVersion = System.getProperty("os.version");
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   137
            String prefix = "3.10.0";
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   138
            if (osVersion.startsWith(prefix)) {
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   139
                throw new SkippedException(
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   140
                        String.format("The behavior under test is known NOT to work on '%s' kernels", prefix));
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   141
            }
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   142
        }
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   143
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   144
        NetworkConfiguration.printSystemConfiguration(System.out);
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   145
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   146
        if (NetworkConfiguration.probe()
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   147
                                .ip6MulticastInterfaces()
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   148
                                .findAny()
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   149
                                .isEmpty()) {
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   150
            throw new SkippedException(
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   151
                    "No IPv6 interfaces that support multicast found");
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   152
        }
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   153
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   154
        InetAddress interfaceLocal1 = InetAddress.getByName("ff11::2.3.4.5");
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   155
        InetAddress interfaceLocal2 = InetAddress.getByName("ff11::6.7.8.9");
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   156
        test(interfaceLocal1, interfaceLocal2);
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   157
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   158
        InetAddress linkLocal1 = InetAddress.getByName("ff12::2.3.4.5");
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   159
        InetAddress linkLocal2 = InetAddress.getByName("ff12::6.7.8.9");
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   160
        test(linkLocal1, linkLocal2);
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   161
    }
23b3a46fa159 8210493: Bind to node- or linklocal ipv6 multicast address fails
prappo
parents:
diff changeset
   162
}