From: John Heffner Date: Mon, 2 Apr 2007 20:56:32 +0000 (-0700) Subject: [TCP]: Do receiver-side SWS avoidance for rcvbuf < MSS. X-Git-Tag: v2.6.21-rc6~21^2 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=84565070e442583ec67fb08a5962c80203e491c3;p=linux-2.6-omap-h63xx.git [TCP]: Do receiver-side SWS avoidance for rcvbuf < MSS. Signed-off-by: John Heffner Signed-off-by: David S. Miller --- diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index dc151139b5a..688b95594f2 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -1607,6 +1607,9 @@ u32 __tcp_select_window(struct sock *sk) */ if (window <= free_space - mss || window > free_space) window = (free_space/mss)*mss; + else if (mss == full_space && + free_space > window + full_space/2) + window = free_space; } return window;