aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorJohn Heffner <jheffner@psc.edu>2007-04-10 13:36:40 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2007-04-13 13:47:04 -0700
commit12da1b6a092a13c2cf4903fd0d39c139d511ef96 (patch)
tree45a52204faf76310fad14da1cb13bdb11b38e294 /net
parent0b3a1a3864038660bb03c39d4b0c8708390f238d (diff)
Fix TCP receiver side SWS handling.
[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: Greg Kroah-Hartman <gregkh@suse.de>
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 1951eaabee9..c99bbe2c535 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;