summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_subr.c
diff options
context:
space:
mode:
authortholo <tholo@openbsd.org>2004-06-21 23:50:35 +0000
committertholo <tholo@openbsd.org>2004-06-21 23:50:35 +0000
commit3212dc310ec9c3aa2cd9e7180fe81d66a37e4443 (patch)
treeb8b428eb79259cc5ab8e628e0b78b672af7aa38b /sys/netinet/tcp_subr.c
parentWhen in_ifinit fails and we've created a new address, clean it up before (diff)
downloadwireguard-openbsd-3212dc310ec9c3aa2cd9e7180fe81d66a37e4443.tar.xz
wireguard-openbsd-3212dc310ec9c3aa2cd9e7180fe81d66a37e4443.zip
First step towards more sane time handling in the kernel -- this changes
things such that code that only need a second-resolution uptime or wall time, and used to get that from time.tv_secs or mono_time.tv_secs now get this from separate time_t globals time_second and time_uptime. ok art@ niklas@ nordin@
Diffstat (limited to 'sys/netinet/tcp_subr.c')
-rw-r--r--sys/netinet/tcp_subr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c
index 13116592f04..f666cd62448 100644
--- a/sys/netinet/tcp_subr.c
+++ b/sys/netinet/tcp_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_subr.c,v 1.81 2004/06/08 19:47:24 markus Exp $ */
+/* $OpenBSD: tcp_subr.c,v 1.82 2004/06/21 23:50:37 tholo Exp $ */
/* $NetBSD: tcp_subr.c,v 1.22 1996/02/13 23:44:00 christos Exp $ */
/*
@@ -1128,7 +1128,7 @@ tcp_rndiss_init()
{
get_random_bytes(tcp_rndiss_sbox, sizeof(tcp_rndiss_sbox));
- tcp_rndiss_reseed = time.tv_sec + TCP_RNDISS_OUT;
+ tcp_rndiss_reseed = time_second + TCP_RNDISS_OUT;
tcp_rndiss_msb = tcp_rndiss_msb == 0x8000 ? 0 : 0x8000;
tcp_rndiss_cnt = 0;
}
@@ -1137,7 +1137,7 @@ tcp_seq
tcp_rndiss_next()
{
if (tcp_rndiss_cnt >= TCP_RNDISS_MAX ||
- time.tv_sec > tcp_rndiss_reseed)
+ time_second > tcp_rndiss_reseed)
tcp_rndiss_init();
/* (arc4random() & 0x7fff) ensures a 32768 byte gap between ISS */