summaryrefslogtreecommitdiff
path: root/sys/netinet/tcp_timer.c
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2013-01-09 20:27:06 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2013-01-09 20:27:06 +0000
commit6c0ef8957f531d331b786924b97b9673cc86f440 (patch)
treeb2aca56ec54849882ea91f80c7d61d271af758e9 /sys/netinet/tcp_timer.c
parentd28396ae1352a52949dece899dfa672d752dfa00 (diff)
Notes
Diffstat (limited to 'sys/netinet/tcp_timer.c')
-rw-r--r--sys/netinet/tcp_timer.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/netinet/tcp_timer.c b/sys/netinet/tcp_timer.c
index b943eb6000c0..48444c1ffe72 100644
--- a/sys/netinet/tcp_timer.c
+++ b/sys/netinet/tcp_timer.c
@@ -119,6 +119,11 @@ SYSCTL_INT(_net_inet_tcp, OID_AUTO, keepcnt, CTLFLAG_RW, &tcp_keepcnt, 0,
/* max idle probes */
int tcp_maxpersistidle;
+static int tcp_rexmit_drop_options = 0;
+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");
@@ -595,7 +600,8 @@ tcp_timer_rexmt(void * xtp)
* 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|TF_SACK_PERMIT);
/*
* If we backed off this far, our srtt estimate is probably bogus.