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

cleanup of IPv6 scope-id handling

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 13
    • Fix Version/s: 13
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b25
    • Verification:
      Verified

      Backports

        Description

        There is a lot of OS specific native code (mostly Linux) around determining which network interface to use when binding/connecting sockets to link-local (LL) IPv6 addresses.

        Most of this code can be removed such that:

        1. when binding/connecting to a local LL address, a common Java level implementation can check local link-local addresses and supply the scope-id automatically.

        2. when connecting to a non local LL address, we can just require the scope-id to be set explicitly, like most native applications. Link-local addresses can sometimes, but not always be determined from routing tables, but it is more reliable to require them to be set by the caller.

        This change affects NIO as well classic sockets and fixes a problem on macos where channels could not bind to local link-local addresses without the scope-id being set explicitly.

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved: