diff options
| author | 1998-11-17 19:23:00 +0000 | |
|---|---|---|
| committer | 1998-11-17 19:23:00 +0000 | |
| commit | 201dac0fe332deeedd3063648eea7a618c7049bf (patch) | |
| tree | c783d955167db8ef59364a6dbe29ae101d63195a /sys/netinet/tcp_timer.c | |
| parent | Add RCS Ids from the EOM repository (diff) | |
| download | wireguard-openbsd-201dac0fe332deeedd3063648eea7a618c7049bf.tar.xz wireguard-openbsd-201dac0fe332deeedd3063648eea7a618c7049bf.zip | |
NewReno, SACK and FACK support for TCP, adapted from code for BSDI
by Hari Balakrishnan (hari@lcs.mit.edu), Tom Henderson (tomh@cs.berkeley.edu)
and Venkat Padmanabhan (padmanab@cs.berkeley.edu) as part of the
Daedalus research group at the University of California,
(http://daedalus.cs.berkeley.edu). [I was able to do this on time spent
at the Center for Information Technology Integration (citi.umich.edu)]
Diffstat (limited to 'sys/netinet/tcp_timer.c')
| -rw-r--r-- | sys/netinet/tcp_timer.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/sys/netinet/tcp_timer.c b/sys/netinet/tcp_timer.c index 357fa300db2..53f4ef0e130 100644 --- a/sys/netinet/tcp_timer.c +++ b/sys/netinet/tcp_timer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_timer.c,v 1.8 1997/08/26 20:02:34 deraadt Exp $ */ +/* $OpenBSD: tcp_timer.c,v 1.9 1998/11/17 19:23:02 provos Exp $ */ /* $NetBSD: tcp_timer.c,v 1.14 1996/02/13 23:44:09 christos Exp $ */ /* @@ -178,6 +178,26 @@ tcp_timers(tp, timer) int timer; { register int rexmt; +#ifdef TCP_SACK + struct sackhole *p, *q; + /* + * Free SACK holes for 2MSL and REXMT timers. + */ + if (timer == TCPT_2MSL || timer == TCPT_REXMT) { + q = p = tp->snd_holes; + while (p != 0) { + q = p->next; + free(p, M_PCB); + p = q; + } + tp->snd_holes = 0; +#if defined(TCP_SACK) && defined(TCP_FACK) + tp->snd_fack = tp->snd_una; + tp->retran_data = 0; + tp->snd_awnd = 0; +#endif /* TCP_FACK */ + } +#endif /* TCP_SACK */ switch (timer) { @@ -227,6 +247,9 @@ tcp_timers(tp, timer) tp->t_srtt = 0; } tp->snd_nxt = tp->snd_una; +#if defined (TCP_NEWRENO) || defined (TCP_SACK) + tp->snd_last = tp->snd_una; +#endif /* * If timing a segment in this window, stop the timer. */ |
