|
@@ -231,11 +231,10 @@ void tcp_select_initial_window(int __space, __u32 mss,
|
|
/* when initializing use the value from init_rcv_wnd
|
|
/* when initializing use the value from init_rcv_wnd
|
|
* rather than the default from above
|
|
* rather than the default from above
|
|
*/
|
|
*/
|
|
- if (init_rcv_wnd &&
|
|
|
|
- (*rcv_wnd > init_rcv_wnd * mss))
|
|
|
|
- *rcv_wnd = init_rcv_wnd * mss;
|
|
|
|
- else if (*rcv_wnd > init_cwnd * mss)
|
|
|
|
- *rcv_wnd = init_cwnd * mss;
|
|
|
|
|
|
+ if (init_rcv_wnd)
|
|
|
|
+ *rcv_wnd = min(*rcv_wnd, init_rcv_wnd * mss);
|
|
|
|
+ else
|
|
|
|
+ *rcv_wnd = min(*rcv_wnd, init_cwnd * mss);
|
|
}
|
|
}
|
|
|
|
|
|
/* Set the clamp no higher than max representable value */
|
|
/* Set the clamp no higher than max representable value */
|