]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[TCP]: Do receiver-side SWS avoidance for rcvbuf < MSS.
authorJohn Heffner <jheffner@psc.edu>
Fri, 13 Apr 2007 19:31:34 +0000 (21:31 +0200)
committerAdrian Bunk <bunk@stusta.de>
Fri, 13 Apr 2007 20:58:26 +0000 (22:58 +0200)
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>
net/ipv4/tcp_output.c

index d31fb639761fe9f1537cfebe1fc9867474b39538..dde7664a1d990902b307c117070787551c0c4a07 100644 (file)
@@ -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;