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

Improve Exception thrown when MulticastSocket.setInterface fails on AIX(Unix)

    XMLWordPrintable

Details

    • b05
    • Not verified

    Backports

      Description

        On Unix platforms, the native code to set the mutlicast interface for multicast sockets (IPv6 enabled implementation) makes use of a setsockopt call for the option IPV6_MULTICAST_IF. It is located in src/java.base/unix/native/libnet/PlainDatagramSocketImpl.c, function mcast_set_if_by_if_v6.

        When the setsockopt call fails, errno is explicitly checked for EINVAL and in that case a custom tailored SocketException is thrown indicating an IPv6 address could be missing on the interface. For AIX one will see EADDRNOTAVAIL in that case, so the errno check should be extended. It should be safe to do this commonly on all Unix platforms.

        Attachments

          Issue Links

            Activity

              People

                clanger Christoph Langer
                clanger Christoph Langer
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: