United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 6989190 SO_SNDBUF/SO_RCVBUF limits should only be checked when setsockopt fails (sol)
6989190 : SO_SNDBUF/SO_RCVBUF limits should only be checked when setsockopt fails (sol)

Details
Type:
Bug
Submit Date:
2010-10-04
Status:
Closed
Updated Date:
2011-03-08
Project Name:
JDK
Resolved Date:
2011-03-08
Component:
core-libs
OS:
generic
Sub-Component:
java.net
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:
7

Related Reports
Relates:

Sub Tasks

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).

                                    

Comments
EVALUATION

This seems a reasonably solution until we figure out the right solution for 6984182.
                                     
2010-10-04



Hardware and Software, Engineered to Work Together