summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_subr.c
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1996-06-05 16:57:38 +0000
committerwollman <wollman@FreeBSD.org>1996-06-05 16:57:38 +0000
commit63dc6bde0f5c1d7fba259a7287ef49d65338a72d (patch)
tree6aeb9f9911d474b15c9349bf64c57e77e0a785e8 /sys/netinet/tcp_subr.c
parent8f86d5aeb7d5fb40bccebdbb159a30dbe16ec37e (diff)
downloadFreeBSD-src-63dc6bde0f5c1d7fba259a7287ef49d65338a72d.zip
FreeBSD-src-63dc6bde0f5c1d7fba259a7287ef49d65338a72d.tar.gz
Correct formula for TCP RTO calculation. Also try to do a better job in
filling in a new PCB's rttvar (but this is not the last word on the subject). And get rid of `#ifdef RTV_RTT', it's been true for four years now...
Diffstat (limited to 'sys/netinet/tcp_subr.c')
-rw-r--r--sys/netinet/tcp_subr.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c
index 87137f4..c3100f3 100644
--- a/sys/netinet/tcp_subr.c
+++ b/sys/netinet/tcp_subr.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)tcp_subr.c 8.2 (Berkeley) 5/24/95
- * $Id: tcp_subr.c,v 1.27 1996/03/22 18:11:25 wollman Exp $
+ * $Id: tcp_subr.c,v 1.28 1996/03/27 18:23:16 wollman Exp $
*/
#include <sys/param.h>
@@ -270,7 +270,7 @@ tcp_newtcpcb(inp)
* reasonable initial retransmit time.
*/
tp->t_srtt = TCPTV_SRTTBASE;
- tp->t_rttvar = tcp_rttdflt * PR_SLOWHZ << 2;
+ tp->t_rttvar = tcp_rttdflt * PR_SLOWHZ << TCP_RTTVAR_SHIFT;
tp->t_rttmin = TCPTV_MIN;
TCPT_RANGESET(tp->t_rxtcur,
((TCPTV_SRTTBASE >> 2) + (TCPTV_SRTTDFLT << 2)) >> 1,
@@ -320,7 +320,6 @@ tcp_close(tp)
struct inpcb *inp = tp->t_inpcb;
struct socket *so = inp->inp_socket;
register struct mbuf *m;
-#ifdef RTV_RTT
register struct rtentry *rt;
/*
@@ -391,7 +390,6 @@ tcp_close(tp)
tcpstat.tcps_cachedssthresh++;
}
}
-#endif /* RTV_RTT */
/* free the reassembly queue, if any */
t = tp->seg_next;
while (t != (struct tcpiphdr *)tp) {
OpenPOWER on IntegriCloud