summaryrefslogtreecommitdiff
path: root/sys/netinet/tcp_var.h
diff options
context:
space:
mode:
authorRyan Thomas McBride <mcbride@cvs.openbsd.org>2005-01-10 23:53:50 +0000
committerRyan Thomas McBride <mcbride@cvs.openbsd.org>2005-01-10 23:53:50 +0000
commitca6f4dedf7deebc0146f43142008b43fa50903a4 (patch)
tree9332686e1751a4754bb55b4e3610c0f01279a46e /sys/netinet/tcp_var.h
parentcea4da524a79850924b7b29f5df029661c360a26 (diff)
Make sure bogus values don't make their way into tcp_xmit_timer() calculations.
- Ignore ts_ecr if it is 0, or the resulting rtt is out of range. (use tp->t_rtttime instead) - Initialise tcp_now to 1, to avoid the 500ms window where a valid ts_ecr of 0 could be ignored. - Convert out-of-range rtt values to valid ones in tcp_xmit_timer(). ok frantzen@ markus@
Diffstat (limited to 'sys/netinet/tcp_var.h')
-rw-r--r--sys/netinet/tcp_var.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h
index 66999823ae4..ccf1a802b97 100644
--- a/sys/netinet/tcp_var.h
+++ b/sys/netinet/tcp_var.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_var.h,v 1.68 2004/11/25 15:32:08 markus Exp $ */
+/* $OpenBSD: tcp_var.h,v 1.69 2005/01/10 23:53:49 mcbride Exp $ */
/* $NetBSD: tcp_var.h,v 1.17 1996/02/13 23:44:24 christos Exp $ */
/*
@@ -331,6 +331,7 @@ tcp_reass_unlock(struct tcpcb *tp)
#define TCP_RTT_SHIFT 3 /* shift for srtt; 3 bits frac. */
#define TCP_RTTVAR_SCALE 4 /* multiplier for rttvar; 2 bits */
#define TCP_RTTVAR_SHIFT 2 /* multiplier for rttvar; 2 bits */
+#define TCP_RTT_MAX (1<<9) /* maximum rtt */
/*
* The initial retransmission should happen at rtt + 4 * rttvar.