Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 31 May 1999 14:16:41 -0700 (PDT)
From:      aron@cs.rice.edu
To:        freebsd-gnats-submit@freebsd.org
Subject:   kern/11966: TCP copies send and receive socket buffer sizes from routing information even when user applications set them
Message-ID:  <19990531211641.8FDF314C16@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         11966
>Category:       kern
>Synopsis:       TCP copies send and receive socket buffer sizes from routing information even when user applications set them
>Confidential:   no
>Severity:       critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon May 31 14:20:01 PDT 1999
>Closed-Date:
>Last-Modified:
>Originator:     Mohit Aron
>Release:        FreeBSD-2.2.6-RELEASE
>Organization:
Rice University
>Environment:
FreeBSD pd01.cs.rice.edu 2.2.6-RELEASE FreeBSD 2.2.6-RELEASE #12: Sun Mar 14 23:50:03 CST 1999     aron@pd01.cs.rice.edu:/usr/users/aron/FreeBSD-2.2.6-src/sys/compile/PD0X  i386

>Description:
TCP (enabled with rfc1323 extensions) exchanges the window scale option
only during connection establishment in its SYN packet. Thus, it is 
imperative that applications should set the socket buffer sizes *before*
establishing the TCP connection. 

However, in function tcp_mss() (in netinet/tcp_input.c), the socket
buffer size is set from old information contained in the routing tables.
Thus even if the application had set the socketbuffer size, this 
part of the code completely ignores that and goes ahead and sets the
socket buffer size itself. As a result, TCP operates with the flow
control window size determined from past information rather than what
the user has set.

>How-To-Repeat:
Start a TCP transfer between two hosts (or just do a telnet) with the
default settings of socket buffer sizes. Then try starting a transfer
again transfer and try setting the TCP rcv socket buffer size on the 
TCP receiver to a large value. Check the size of the window scale option
exchanged - it'll still be small (perhaps 0). This is the result of
the user information being completely discarded away.
>Fix:
The socket code should keep track of the fact whether the socket 
buffer size was set explicitly by the user or whether it contains the
default setting. It should be copied over from the routing information
only if it contains the default setting.


>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990531211641.8FDF314C16>