diff options
author | Stephen Hemminger <shemminger@osdl.org> | 2006-08-22 03:06:11 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-08-22 17:33:57 -0400 |
commit | 316c1592bea94ead75301cb764523661fbbcc1ca (patch) | |
tree | df27aac5ed7eab642d31be88150c080bf6f313ec /net | |
parent | e0b7cde9975e17a61b4511c7822803dfb7210011 (diff) |
[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>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/tcp_output.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 507adefbc17c..b4f3ffe1b3b4 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -201,6 +201,7 @@ void tcp_select_initial_window(int __space, __u32 mss, | |||
201 | * See RFC1323 for an explanation of the limit to 14 | 201 | * See RFC1323 for an explanation of the limit to 14 |
202 | */ | 202 | */ |
203 | space = max_t(u32, sysctl_tcp_rmem[2], sysctl_rmem_max); | 203 | space = max_t(u32, sysctl_tcp_rmem[2], sysctl_rmem_max); |
204 | space = min_t(u32, space, *window_clamp); | ||
204 | while (space > 65535 && (*rcv_wscale) < 14) { | 205 | while (space > 65535 && (*rcv_wscale) < 14) { |
205 | space >>= 1; | 206 | space >>= 1; |
206 | (*rcv_wscale)++; | 207 | (*rcv_wscale)++; |