misc/138652: TCP window scaling value

Gaurav Goel gaurav0287 at gmail.com
Wed Sep 9 06:10:01 UTC 2009


>Number:         138652
>Category:       misc
>Synopsis:       TCP window scaling value
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Sep 09 06:10:01 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Gaurav Goel
>Release:        
>Organization:
MTree Software Pvt. Ltd.
>Environment:
>Description:
I found in file "tcp_input.c-orig" located at location "usr/src/sys/netinet" at line number 511, "tp->request_r_scale" is incremented depending on condition. 16 bits are reserved for window and its value could be MAX 30 bits.
In your if condition "TCP_MAXWIN << tp->request_r_scale < so->so_rcv.sb_hiwat", if I have "so->so_rcv.sb_hiwat" value to be 524286, then "tp->request_r_scale" is incremented four times but its value should be 3.

Reason being, while shifting TCP_MAXWIN,
1st iteration 1111111111111111 < 1111111111111111110 [TRUE]
increment once
2nd iteration 11111111111111110 < 1111111111111111110 [TRUE]
increment again
3rd iteration 111111111111111100 < 1111111111111111110 [TRUE]
increment once
4th iteration 1111111111111111000 < 1111111111111111110 [TRUE]
increment again
5th iteration 11111111111111110000 < 1111111111111111110 [FALSE]

The LSB are zeros, which should be one.

Please tell me if I am wrong.
>How-To-Repeat:

>Fix:


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


More information about the freebsd-bugs mailing list