summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/ipv4/tcp_output.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index caf2e2cff29..c5b911f9b66 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -194,12 +194,11 @@ void tcp_select_initial_window(int __space, __u32 mss,
* will be satisfied with 2.
*/
if (mss > (1<<*rcv_wscale)) {
- int init_cwnd;
-
- if (mss > 1460)
+ int init_cwnd = 4;
+ if (mss > 1460*3)
init_cwnd = 2;
- else
- init_cwnd = (mss > 1095) ? 3 : 4;
+ else if (mss > 1460)
+ init_cwnd = 3;
if (*rcv_wnd > init_cwnd*mss)
*rcv_wnd = init_cwnd*mss;
}