diff options
Diffstat (limited to 'net/ipv4/tcp_output.c')
-rw-r--r-- | net/ipv4/tcp_output.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 95feffb6d53f..d07c0dcc99aa 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -229,11 +229,9 @@ void tcp_select_initial_window(const struct sock *sk, int __space, __u32 mss, | |||
229 | } | 229 | } |
230 | } | 230 | } |
231 | 231 | ||
232 | if (mss > (1 << *rcv_wscale)) { | 232 | if (!init_rcv_wnd) /* Use default unless specified otherwise */ |
233 | if (!init_rcv_wnd) /* Use default unless specified otherwise */ | 233 | init_rcv_wnd = tcp_default_init_rwnd(mss); |
234 | init_rcv_wnd = tcp_default_init_rwnd(mss); | 234 | *rcv_wnd = min(*rcv_wnd, init_rcv_wnd * mss); |
235 | *rcv_wnd = min(*rcv_wnd, init_rcv_wnd * mss); | ||
236 | } | ||
237 | 235 | ||
238 | /* Set the clamp no higher than max representable value */ | 236 | /* Set the clamp no higher than max representable value */ |
239 | (*window_clamp) = min_t(__u32, U16_MAX << (*rcv_wscale), *window_clamp); | 237 | (*window_clamp) = min_t(__u32, U16_MAX << (*rcv_wscale), *window_clamp); |