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

(so) SocketChannel/ServerSocketChannel cannot bind to IPv6 local address (macOS)

    Details

    • Type: Bug
    • Status: In Progress
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 13
    • Fix Version/s: tbd
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Understanding:
      Fix Understood

      Description

      On macOS, the network channels can't bind to an IPv6-local address, unless a valid scope-id is specified. The bind method fails with "Can't assign requested address". The issue is that setDefaultScopeID is not called so the scopeID is not set to the value of NetworkInterface.defaultIndex.

      This may be something to address in NET_InetAddressToSockaddr rather than in the NIO code.

        Attachments

          Activity

            People

            • Assignee:
              michaelm Michael McMahon
              Reporter:
              alanb Alan Bateman
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: