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

(dc) DatagramChannel::disconnect re-binds socket to the wildcard address (macOS)

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 7u4
    • Fix Version/s: 14
    • Component/s: core-libs
    • Subcomponent:
    • Resolved In Build:
      b24
    • OS:
      os_x

      Description

      A DatagramChannel is bound to a specific local address, connected, and then disconnect is invoked to dissolve the association. On macOS the disconnect rebinds the socket to the wildcard address.

      The linked test case fails with:

      java.lang.AssertionError: local address after disconnect should be /127.0.0.1:59449 found /0:0:0:0:0:0:0:0:59449

        Attachments

        1. disconnect.patch
          9 kB
        2. udp_connect_dual.c
          4 kB
        3. udp_connect_v6.c
          4 kB
        4. udp_connect.c
          4 kB

          Issue Links

            Activity

              People

              • Assignee:
                alanb Alan Bateman
                Reporter:
                dfuchs Daniel Fuchs
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: