diff options
author | John Heffner <jheffner@psc.edu> | 2007-04-13 21:31:34 +0200 |
---|---|---|
committer | Adrian Bunk <bunk@stusta.de> | 2007-04-13 22:58:26 +0200 |
commit | 19a0662baeb7f783d345ebdfe3048b834582b294 (patch) | |
tree | e4732dea4cda724d2e4801baf2d7454cb3d2a16b | |
parent | 889cde54cd2a82f6e4d7ed18440e0f6138b06d60 (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>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
-rw-r--r-- | net/ipv4/tcp_output.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index d31fb639761..dde7664a1d9 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -1319,6 +1319,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; |