diff options
author | John Heffner <jheffner@psc.edu> | 2007-04-10 13:36:40 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-04-13 13:47:04 -0700 |
commit | 12da1b6a092a13c2cf4903fd0d39c139d511ef96 (patch) | |
tree | 45a52204faf76310fad14da1cb13bdb11b38e294 | |
parent | 0b3a1a3864038660bb03c39d4b0c8708390f238d (diff) | |
download | linux-stable-12da1b6a092a13c2cf4903fd0d39c139d511ef96.tar.gz linux-stable-12da1b6a092a13c2cf4903fd0d39c139d511ef96.tar.bz2 linux-stable-12da1b6a092a13c2cf4903fd0d39c139d511ef96.zip |
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>
-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 1951eaabee95..c99bbe2c5355 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; |