aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJohn Heffner <jheffner@psc.edu>2007-04-02 16:56:32 -0400
committerDavid S. Miller <davem@davemloft.net>2007-04-02 16:56:32 -0400
commit84565070e442583ec67fb08a5962c80203e491c3 (patch)
treeb28b0fa66b3feb2f3dddb9db9a9a9c031681a3f5 /net
parentc873879c4db31bab414655e191cf56019b48c751 (diff)
[TCP]: Do receiver-side SWS avoidance for rcvbuf < MSS.
Signed-off-by: John Heffner <jheffner@psc.edu> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/tcp_output.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index dc151139b5af..688b95594f2e 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -1607,6 +1607,9 @@ u32 __tcp_select_window(struct sock *sk)
1607 */ 1607 */
1608 if (window <= free_space - mss || window > free_space) 1608 if (window <= free_space - mss || window > free_space)
1609 window = (free_space/mss)*mss; 1609 window = (free_space/mss)*mss;
1610 else if (mss == full_space &&
1611 free_space > window + full_space/2)
1612 window = free_space;
1610 } 1613 }
1611 1614
1612 return window; 1615 return window;