mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 19:56:18 +00:00
[TCP]: Limit window scaling if window is clamped.
This small change allows for easy per-route workarounds for broken hosts or middleboxes that are not compliant with TCP standards for window scaling. Rather than having to turn off window scaling globally. This patch allows reducing or disabling window scaling if window clamp is present. Example: Mark Lord reported a problem with 2.6.17 kernel being unable to access http://www.everymac.com # ip route add 216.145.246.23/32 via 10.8.0.1 window 65535 Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
e0b7cde997
commit
316c1592be
1 changed files with 1 additions and 0 deletions
|
@ -201,6 +201,7 @@ void tcp_select_initial_window(int __space, __u32 mss,
|
|||
* See RFC1323 for an explanation of the limit to 14
|
||||
*/
|
||||
space = max_t(u32, sysctl_tcp_rmem[2], sysctl_rmem_max);
|
||||
space = min_t(u32, space, *window_clamp);
|
||||
while (space > 65535 && (*rcv_wscale) < 14) {
|
||||
space >>= 1;
|
||||
(*rcv_wscale)++;
|
||||
|
|
Loading…
Reference in a new issue