summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortuexen <tuexen@FreeBSD.org>2017-08-13 07:40:05 +0000
committertuexen <tuexen@FreeBSD.org>2017-08-13 07:40:05 +0000
commit72b75bf249770e65048a82996a1ffd271e8200e1 (patch)
tree6a966379b9f3cfac71a09b951a1517885b77f28c
parentff91b7277c5acc8bf03c0931a978110c7c6ec373 (diff)
downloadFreeBSD-src-72b75bf249770e65048a82996a1ffd271e8200e1.zip
FreeBSD-src-72b75bf249770e65048a82996a1ffd271e8200e1.tar.gz
MFC r317244:
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. Approved by: re (kib)
-rw-r--r--sys/netinet/tcp_syncache.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c
index bcfe784..0485116 100644
--- a/sys/netinet/tcp_syncache.c
+++ b/sys/netinet/tcp_syncache.c
@@ -277,7 +277,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. */
OpenPOWER on IntegriCloud