Author: tuexen
Date: Wed Jun  6 22:02:44 2018
New Revision: 334740
URL: https://svnweb.freebsd.org/changeset/base/334740

Log:
  MFstable/11 334731
  
  Limit the retransmission timer for SYN-ACKs by TCPTV_REXMTMAX.
  
  Use the same logic to handle the SYN-ACK retransmission when sent from
  the syn cache code as when sent from the main code.
  
  Approved by:  re (gjb@)
  Sponsored by: Netflix, Inc.

Modified:
  releng/11.2/sys/netinet/tcp_syncache.c
Directory Properties:
  releng/11.2/   (props changed)

Modified: releng/11.2/sys/netinet/tcp_syncache.c
==============================================================================
--- releng/11.2/sys/netinet/tcp_syncache.c      Wed Jun  6 22:02:20 2018        
(r334739)
+++ releng/11.2/sys/netinet/tcp_syncache.c      Wed Jun  6 22:02:44 2018        
(r334740)
@@ -407,8 +407,14 @@ syncache_drop(struct syncache *sc, struct syncache_hea
 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;
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to