From b5f24a866e8fa64b39fd150b267d69a4b56e076c Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Fri, 4 Dec 1998 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 1998-12-04 --- ip/tcp.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/ip/tcp.c b/ip/tcp.c index 792548093f70b7817da052cb5c41ac62f2a747db..e5421ead375f51b93ce561f679656a8f4f5da06e 100644 --- a/ip/tcp.c +++ b/ip/tcp.c @@ -933,6 +933,10 @@ tcpincoming(Conv *s, Tcp *segp, uchar *src, uchar *dst) tcb->timer.state = TimerOFF; tcb->acktimer.arg = new; tcb->acktimer.state = TimerOFF; + tcb->katimer.arg = new; + tcb->katimer.state = TimerOFF; + tcb->rtt_timer.arg = new; + tcb->rtt_timer.state = TimerOFF; h = &tcb->protohdr; memset(h, 0, sizeof(*h)); @@ -1293,6 +1297,9 @@ tcpiput(Proto *tcp, uchar*, Block *bp) netlog(f, Logtcp, "tcp len < 0, %lux\n", seg.seq); update(s, &seg); if(tcb->sndcnt == 0 && tcb->state == Closing) { + tcphalt(tpriv, &tcb->rtt_timer); + tcphalt(tpriv, &tcb->acktimer); + tcphalt(tpriv, &tcb->katimer); tcpsetstate(s, Time_wait); tcb->timer.start = MSL2*(1000 / MSPTICK); tcpgo(tpriv, &tcb->timer); @@ -1353,6 +1360,8 @@ tcpiput(Proto *tcp, uchar*, Block *bp) case Finwait1: update(s, &seg); if(tcb->sndcnt == 0){ + tcphalt(tpriv, &tcb->rtt_timer); + tcphalt(tpriv, &tcb->acktimer); tcb->kacounter = MAXBACKOFF; tcpsetstate(s, Finwait2); tcb->katimer.start = MSL2 * (1000 / MSPTICK); @@ -1365,6 +1374,9 @@ tcpiput(Proto *tcp, uchar*, Block *bp) case Closing: update(s, &seg); if(tcb->sndcnt == 0) { + tcphalt(tpriv, &tcb->rtt_timer); + tcphalt(tpriv, &tcb->acktimer); + tcphalt(tpriv, &tcb->katimer); tcpsetstate(s, Time_wait); tcb->timer.start = MSL2*(1000 / MSPTICK); tcpgo(tpriv, &tcb->timer); @@ -1454,6 +1466,9 @@ tcpiput(Proto *tcp, uchar*, Block *bp) case Finwait1: tcb->rcv.nxt++; if(tcb->sndcnt == 0) { + tcphalt(tpriv, &tcb->rtt_timer); + tcphalt(tpriv, &tcb->acktimer); + tcphalt(tpriv, &tcb->katimer); tcpsetstate(s, Time_wait); tcb->timer.start = MSL2*(1000/MSPTICK); tcpgo(tpriv, &tcb->timer); @@ -1463,6 +1478,9 @@ tcpiput(Proto *tcp, uchar*, Block *bp) break; case Finwait2: tcb->rcv.nxt++; + tcphalt(tpriv, &tcb->rtt_timer); + tcphalt(tpriv, &tcb->acktimer); + tcphalt(tpriv, &tcb->katimer); tcpsetstate(s, Time_wait); tcb->timer.start = MSL2 * (1000/MSPTICK); tcpgo(tpriv, &tcb->timer);