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

SO_SNDBUF/SO_RCVBUF limits should only be checked when setsockopt fails (sol)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 7
    • 7
    • core-libs
    • b114
    • generic
    • generic
    • Verified

    Description

      On Solaris, attempts to set the SO_SNDBUF/SO_RCVBUF socket options cause the buffer size to be clamped by the value of the tcp_max_buf/udp_max_buf parameters. This code no longer works on Solaris 11 (see 6984182). As an initial fix for this issue, this bug proposes:

      1. First attempt setsockopt with the original buffer size and only clamp the value if it fails because the value exceeds the system limit.

      2. Change the fallback limit to 1MB for tcp, and 2MB for udp. Currently it falls back to a limit of 64k if the values of tcp_max_buf/udp_max_buf cannot be obtained. If the fallback limits are changed to 1MB for tcp, and 2MB for udp then it reduces the problem in 6984182 to only the case where these parameters have been changed (which should be rare).

      Attachments

        Issue Links

          Activity

            People

              alanb Alan Bateman
              alanb Alan Bateman
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: