diff options
| author | Michael Tuexen <tuexen@FreeBSD.org> | 2018-06-06 22:02:44 +0000 |
|---|---|---|
| committer | Michael Tuexen <tuexen@FreeBSD.org> | 2018-06-06 22:02:44 +0000 |
| commit | a3aad3b17d2fcfdac5daface1377faafdfa6cbb4 (patch) | |
| tree | 0c39909ae5871ae416a37159720069780ac3931b | |
| parent | a99194d3fa4cf177175c2b350e39e222975231e0 (diff) | |
Notes
| -rw-r--r-- | sys/netinet/tcp_syncache.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index 26249993340e..69806ce14e59 100644 --- a/sys/netinet/tcp_syncache.c +++ b/sys/netinet/tcp_syncache.c @@ -407,8 +407,14 @@ syncache_drop(struct syncache *sc, struct syncache_head *sch) static void syncache_timeout(struct syncache *sc, struct syncache_head *sch, int docallout) { - sc->sc_rxttime = ticks + - TCPTV_RTOBASE * (tcp_syn_backoff[sc->sc_rxmits]); + int rexmt; + + if (sc->sc_rxmits == 0) + rexmt = TCPTV_RTOBASE; + else + TCPT_RANGESET(rexmt, TCPTV_RTOBASE * tcp_syn_backoff[sc->sc_rxmits], + tcp_rexmit_min, TCPTV_REXMTMAX); + sc->sc_rxttime = ticks + rexmt; sc->sc_rxmits++; if (TSTMP_LT(sc->sc_rxttime, sch->sch_nextc)) { sch->sch_nextc = sc->sc_rxttime; |
