[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>
This commit is contained in:
parent
c873879c4d
commit
84565070e4
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue