diff options
author | Thorsten Lockert <tholo@cvs.openbsd.org> | 2004-06-21 23:50:39 +0000 |
---|---|---|
committer | Thorsten Lockert <tholo@cvs.openbsd.org> | 2004-06-21 23:50:39 +0000 |
commit | ee05a750df8c3f9f5d686affb4df7e316507797a (patch) | |
tree | 887af571215b85d480946bb169aafa0605c786db /sys/netinet/tcp_subr.c | |
parent | e84c5b85eb5d0fc9af7eb3cdcc77a22eb07dec74 (diff) |
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.c | 6 |
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 */ |