Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P5
    • Resolution: Fixed
    • Affects Version/s: 5.0
    • Fix Version/s: 9
    • Component/s: core-libs
    • Subcomponent:
    • Resolved In Build:
      b108
    • CPU:
      sparc
    • OS:
      solaris_10

      Description

      A DESCRIPTION OF THE REQUEST :
      There is no way to access the SO_REUSEPORT socket option in the JDK. The addition of a setReusePort() and getReusePort() function equivalent to setReuseAddress() and getReuseAddress() would fill this gap.

      Alternatively, a more generic way of setting and querying individual socket options would suffice.

      JUSTIFICATION :
      Quite a lot of peer to peer systems are now making use of this flag in order to avoid having to configure many ports on network address translators. With this flag, both outgoing and incoming connections can be bound to the same port and consequently remain bound to the same external port of the NAT.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Add setReusePort() and getReusePort() to the JDK.
      ACTUAL -
      Not applicable.

      ---------- BEGIN SOURCE ----------
      Not applicable.
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Not applicable.

        Issue Links

          Activity

          Hide
          yuwangsunw Yujiang Wang (Inactive) added a comment -
          BT2:EVALUATION

          SO_REUSEPORT is introduced in BSD4.4, mainly for multicast. The sematic is to allow completely duplicate bindings, but only if each socket that wants to bind the same IP address and port specify this socket option.

          The problem is not all systems support this option. Currently, Solaris and Windows seem not support it yet. But when binding to multicast IP address, SO_REUSEADDR is considered equivalent to SO_REUSEPORT.

          May check the situation in future release.
          Show
          yuwangsunw Yujiang Wang (Inactive) added a comment - BT2:EVALUATION SO_REUSEPORT is introduced in BSD4.4, mainly for multicast. The sematic is to allow completely duplicate bindings, but only if each socket that wants to bind the same IP address and port specify this socket option. The problem is not all systems support this option. Currently, Solaris and Windows seem not support it yet. But when binding to multicast IP address, SO_REUSEADDR is considered equivalent to SO_REUSEPORT. May check the situation in future release.
          Hide
          khazra Kurchi Subhra Hazra added a comment -
          SO_REUSEPORT is not supported on Windows and Solaris. We do not have plans of supporting this option unless it is available on all platforms.
          Show
          khazra Kurchi Subhra Hazra added a comment - SO_REUSEPORT is not supported on Windows and Solaris. We do not have plans of supporting this option unless it is available on all platforms.
          Hide
          smarks Stuart Marks added a comment -
          SO_REUSEPORT is now in Solaris. It might have been added in Solaris 11.
          Show
          smarks Stuart Marks added a comment - SO_REUSEPORT is now in Solaris. It might have been added in Solaris 11.
          Hide
          smarks Stuart Marks added a comment -
          SO_REUSEPORT is now on MacOS (possibly introduced in 10.9). Not sure about the status of Windows.

          I'm reopening this RFE. I think we should reconsider the possibility of adding this since it's become more widespread.
          Show
          smarks Stuart Marks added a comment - SO_REUSEPORT is now on MacOS (possibly introduced in 10.9). Not sure about the status of Windows. I'm reopening this RFE. I think we should reconsider the possibility of adding this since it's become more widespread.
          Hide
          mcberg Michael Berg added a comment - - edited
          Show
          mcberg Michael Berg added a comment - - edited Code contributed by Yingqi (Lucy) Lu http://cr.openjdk.java.net/~mcberg/jdk/6432031/webrev.02/ Most recent version is: http://cr.openjdk.java.net/~mcberg/jdk/6432031/webrev.11/
          Hide
          alanb Alan Bateman added a comment -
          Should the option be added to jdk.net.ExtendedSocketOption instead?
          Show
          alanb Alan Bateman added a comment - Should the option be added to jdk.net.ExtendedSocketOption instead?
          Hide
          hgupdate HG Updates added a comment -
          URL: http://hg.openjdk.java.net/jdk9/dev/jdk/rev/f92af283ab18
          User: alanb
          Date: 2016-02-23 17:51:19 +0000
          Show
          hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/dev/jdk/rev/f92af283ab18 User: alanb Date: 2016-02-23 17:51:19 +0000
          Hide
          hgupdate HG Updates added a comment -
          URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/f92af283ab18
          User: lana
          Date: 2016-03-02 19:34:40 +0000
          Show
          hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/f92af283ab18 User: lana Date: 2016-03-02 19:34:40 +0000

            People

            • Assignee:
              alanb Alan Bateman
              Reporter:
              ndcosta Nelson Dcosta
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: