diff options
author | Niels Provos <provos@cvs.openbsd.org> | 1999-12-15 16:37:21 +0000 |
---|---|---|
committer | Niels Provos <provos@cvs.openbsd.org> | 1999-12-15 16:37:21 +0000 |
commit | cfd41de5add80002d3c9bd01d5b05838e06f9f93 (patch) | |
tree | 5e3e1c5c24332883fb331973609d16e30d585e9d | |
parent | f6d7bd93b12781724f9154e7e7aab7b2ddbb82e3 (diff) |
never go into persist mode if there are still segments to be retransmitted.
set retransmit timer again if it was cleared, that can happen in SACK when
there are no elligble SACK holes to be retransmitted and the receiver window
is full.
-rw-r--r-- | sys/netinet/tcp_input.c | 25 | ||||
-rw-r--r-- | sys/netinet/tcp_output.c | 15 |
2 files changed, 15 insertions, 25 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index d5ff49496e7..f4195de21a1 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_input.c,v 1.53 1999/12/14 22:20:28 provos Exp $ */ +/* $OpenBSD: tcp_input.c,v 1.54 1999/12/15 16:37:20 provos Exp $ */ /* $NetBSD: tcp_input.c,v 1.23 1996/02/13 23:43:44 christos Exp $ */ /* @@ -1578,18 +1578,6 @@ trimthenstep6: tp->snd_cwnd = tp->snd_ssthresh+ tp->t_maxseg * tp->t_dupacks; #endif /* TCP_FACK */ - /* - * It is possible for - * tcp_output to fail to send - * a segment. If so, make - * sure that REMXT timer is set. - */ - if (SEQ_GT(tp->snd_max, - tp->snd_una) && - tp->t_timer[TCPT_REXMT] == 0 && - tp->t_timer[TCPT_PERSIST] == 0) - tp->t_timer[TCPT_REXMT] = - tp->t_rxtcur; goto drop; } #endif /* TCP_SACK */ @@ -2027,17 +2015,6 @@ dodata: /* XXX */ */ if (needoutput || (tp->t_flags & TF_ACKNOW)) { (void) tcp_output(tp); -#ifdef TCP_SACK - /* - * In SACK, it is possible for tcp_output() to fail to send a segment - * after the retransmission timer has been turned off. Make sure that - * the retransmission timer is set if we are in fast recovery. - */ - if (needoutput && SEQ_GT(tp->snd_max, tp->snd_una) && - tp->t_timer[TCPT_REXMT] == 0 && - tp->t_timer[TCPT_PERSIST] == 0) - tp->t_timer[TCPT_REXMT] = tp->t_rxtcur; -#endif } return; diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index 5b236f45cd2..593748d0d41 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_output.c,v 1.26 1999/12/10 17:51:10 itojun Exp $ */ +/* $OpenBSD: tcp_output.c,v 1.27 1999/12/15 16:37:20 provos Exp $ */ /* $NetBSD: tcp_output.c,v 1.16 1997/06/03 16:17:09 kml Exp $ */ /* @@ -399,6 +399,19 @@ again: if (flags & TH_FIN && ((tp->t_flags & TF_SENTFIN) == 0 || tp->snd_nxt == tp->snd_una)) goto send; +#ifdef TCP_SACK + /* + * In SACK, it is possible for tcp_output to fail to send a segment + * after the retransmission timer has been turned off. Make sure + * that the retransmission timer is set. + */ + if (SEQ_GT(tp->snd_max, tp->snd_una) && + tp->t_timer[TCPT_REXMT] == 0 && + tp->t_timer[TCPT_PERSIST] == 0) { + tp->t_timer[TCPT_REXMT] = tp->t_rxtcur; + return (0); + } +#endif /* TCP_SACK */ /* * TCP window updates are not reliable, rather a polling protocol |