2.4 doesn't subtract the timestamp length from the MSS for outgoing
connects. This causes many problems from hosts on a network connection
with an MTU < ethernet talking to path mtu blackholed (=behind
a firewall that blocks all ICMPs) windows boxes.
This patch fixes the problem.
-Andi
Index: net/ipv4/tcp_output.c
===================================================================
RCS file: /cvs/linux/net/ipv4/tcp_output.c,v
retrieving revision 1.146
diff -u -u -r1.146 tcp_output.c
--- net/ipv4/tcp_output.c 2002/02/01 22:01:04 1.146
+++ net/ipv4/tcp_output.c 2002/02/05 01:13:44
@@ -86,14 +86,15 @@
{
struct tcp_opt *tp = tcp_sk(sk);
struct dst_entry *dst = __sk_dst_get(sk);
- int mss = tp->advmss;
- if (dst && dst->advmss < mss) {
- mss = dst->advmss;
- tp->advmss = mss;
+ if (dst && dst->advmss < tp->advmss) {
+ tp->advmss = dst->advmss;
}
- return (__u16)mss;
+ if (sysctl_tcp_timestamps)
+ tp->advmss -= TCPOLEN_TSTAMP_ALIGNED;
+
+ return (__u16)tp->advmss;
}
/* RFC2861. Reset CWND after idle period longer RTO to "restart window".
|