Commit 84565070 authored by John Heffner's avatar John Heffner Committed by David S. Miller

[TCP]: Do receiver-side SWS avoidance for rcvbuf < MSS.

Signed-off-by: default avatarJohn Heffner <jheffner@psc.edu>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c873879c
...@@ -1607,6 +1607,9 @@ u32 __tcp_select_window(struct sock *sk) ...@@ -1607,6 +1607,9 @@ u32 __tcp_select_window(struct sock *sk)
*/ */
if (window <= free_space - mss || window > free_space) if (window <= free_space - mss || window > free_space)
window = (free_space/mss)*mss; window = (free_space/mss)*mss;
else if (mss == full_space &&
free_space > window + full_space/2)
window = free_space;
} }
return window; return window;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment