[Midnightbsd-cvs] src [8861] trunk/sys/netinet/tcp_timer.c: add an option to not drop options from the third retransmitted SYN.
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Mon Sep 26 09:05:44 EDT 2016
Revision: 8861
http://svnweb.midnightbsd.org/src/?rev=8861
Author: laffer1
Date: 2016-09-26 09:05:44 -0400 (Mon, 26 Sep 2016)
Log Message:
-----------
add an option to not drop options from the third retransmitted SYN. if the SYNs are dropped due to network congestion, then the remote end of the connection may act as if options such as window scaling are enabled but the local end with think they are not. This is not on by default.
Modified Paths:
--------------
trunk/sys/netinet/tcp_timer.c
Modified: trunk/sys/netinet/tcp_timer.c
===================================================================
--- trunk/sys/netinet/tcp_timer.c 2016-09-26 13:04:34 UTC (rev 8860)
+++ trunk/sys/netinet/tcp_timer.c 2016-09-26 13:05:44 UTC (rev 8861)
@@ -118,6 +118,11 @@
/* max idle probes */
int tcp_maxpersistidle;
+static int tcp_rexmit_drop_options = 1;
+SYSCTL_INT(_net_inet_tcp, OID_AUTO, rexmit_drop_options, CTLFLAG_RW,
+ &tcp_rexmit_drop_options, 0,
+ "Drop TCP options from 3rd and later retransmitted SYN");
+
static int per_cpu_timers = 0;
SYSCTL_INT(_net_inet_tcp, OID_AUTO, per_cpu_timers, CTLFLAG_RW,
&per_cpu_timers , 0, "run tcp timers on all cpus");
@@ -578,7 +583,8 @@
* header compression code which trashes TCP segments containing
* unknown-to-them TCP options.
*/
- if ((tp->t_state == TCPS_SYN_SENT) && (tp->t_rxtshift == 3))
+ if (tcp_rexmit_drop_options && (tp->t_state == TCPS_SYN_SENT) &&
+ (tp->t_rxtshift == 3))
tp->t_flags &= ~(TF_REQ_SCALE|TF_REQ_TSTMP);
/*
* If we backed off this far, our srtt estimate is probably bogus.
More information about the Midnightbsd-cvs
mailing list