diff options
Diffstat (limited to 'net')
| -rw-r--r-- | net/ipv4/tcp_output.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index d6e3d269e906..caf2e2cff293 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
| @@ -190,15 +190,16 @@ void tcp_select_initial_window(int __space, __u32 mss, | |||
| 190 | } | 190 | } |
| 191 | 191 | ||
| 192 | /* Set initial window to value enough for senders, | 192 | /* Set initial window to value enough for senders, |
| 193 | * following RFC1414. Senders, not following this RFC, | 193 | * following RFC2414. Senders, not following this RFC, |
| 194 | * will be satisfied with 2. | 194 | * will be satisfied with 2. |
| 195 | */ | 195 | */ |
| 196 | if (mss > (1<<*rcv_wscale)) { | 196 | if (mss > (1<<*rcv_wscale)) { |
| 197 | int init_cwnd = 4; | 197 | int init_cwnd; |
| 198 | if (mss > 1460*3) | 198 | |
| 199 | if (mss > 1460) | ||
| 199 | init_cwnd = 2; | 200 | init_cwnd = 2; |
| 200 | else if (mss > 1460) | 201 | else |
| 201 | init_cwnd = 3; | 202 | init_cwnd = (mss > 1095) ? 3 : 4; |
| 202 | if (*rcv_wnd > init_cwnd*mss) | 203 | if (*rcv_wnd > init_cwnd*mss) |
| 203 | *rcv_wnd = init_cwnd*mss; | 204 | *rcv_wnd = init_cwnd*mss; |
| 204 | } | 205 | } |
