Author: tuexen
Date: Fri Apr 21 06:05:34 2017
New Revision: 317244
URL: https://svnweb.freebsd.org/changeset/base/317244

Log:
  Represent "a syncache overflow hasn't happend yet" by using
  -(SYNCOOKIE_LIFETIME + 1) instead of INT64_MIN, since it is
  good enough and works when time_t is int32 or int64.
  This fixes the issue reported by cy@ on i386.
  
  Reported by:  cy
  MFC after:    1 week
  Sponsored by: Netflix, Inc.

Modified:
  head/sys/netinet/tcp_syncache.c

Modified: head/sys/netinet/tcp_syncache.c
==============================================================================
--- head/sys/netinet/tcp_syncache.c     Fri Apr 21 02:11:44 2017        
(r317243)
+++ head/sys/netinet/tcp_syncache.c     Fri Apr 21 06:05:34 2017        
(r317244)
@@ -260,7 +260,8 @@ syncache_init(void)
                         &V_tcp_syncache.hashbase[i].sch_mtx, 0);
                V_tcp_syncache.hashbase[i].sch_length = 0;
                V_tcp_syncache.hashbase[i].sch_sc = &V_tcp_syncache;
-               V_tcp_syncache.hashbase[i].sch_last_overflow = INT64_MIN;
+               V_tcp_syncache.hashbase[i].sch_last_overflow =
+                   -(SYNCOOKIE_LIFETIME + 1);
        }
 
        /* Create the syncache entry zone. */
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to