Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8304286

java/net/SocketOption/OptionsTest.java failing after JDK-8302659

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 21
    • 21
    • core-libs
    • None
    • b15

      The test selects the first interface for which supportsMulticast returns true, and tries to use it with setOption(IP_MULTICAST_IF). This used to work on Windows because loopback was always returned as the first interface; now the interface order is different, and the first interface might no longer support multicasting, usually because it's a filter interface with no IP addresses assigned.

      JDK-8302659 modified the test to only use interfaces with non-empty list of addresses in addition to supporting multicast. This worked well on Windows and Mac, but failed on Linux with the following security manager policy:
          permission java.net.SocketPermission "localhost:*", "connect, accept, listen, resolve";

      this is because the loopback interface does not support multicasting on Linux, and all other interfaces had their addresses filtered out by the security manager.

      We need a way to select an interface on Windows that would be usable with IP_MULTICAST_IF. One option to explore is returning false from supportsMulticast on filter interfaces.

        There are no Sub-Tasks for this issue.

            djelinski Daniel Jelinski
            djelinski Daniel Jelinski
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: