diff options
author | Thorsten Lockert <tholo@cvs.openbsd.org> | 2004-06-20 21:09:03 +0000 |
---|---|---|
committer | Thorsten Lockert <tholo@cvs.openbsd.org> | 2004-06-20 21:09:03 +0000 |
commit | 624c441d2780c4cd6d368c629cf0046776625c03 (patch) | |
tree | f4260622e976b51e0d4a545458fbf9be6edafc0a /sys | |
parent | 1b034cebeaec554ba60359069706e65a99ada2f7 (diff) |
Do not use time based randomization; ok deraadt@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netipx/ipx_input.c | 4 | ||||
-rw-r--r-- | sys/netiso/clnp_frag.c | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/sys/netipx/ipx_input.c b/sys/netipx/ipx_input.c index 9299c72793d..ed8a22aea76 100644 --- a/sys/netipx/ipx_input.c +++ b/sys/netipx/ipx_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ipx_input.c,v 1.17 2003/12/10 07:22:43 itojun Exp $ */ +/* $OpenBSD: ipx_input.c,v 1.18 2004/06/20 21:09:02 tholo Exp $ */ /*- * @@ -97,7 +97,7 @@ ipx_init() ipx_broadnet = * (union ipx_net *) allones; ipx_broadhost = * (union ipx_host *) allones; - ipx_pexseq = time.tv_usec; + ipx_pexseq = random(); ipxintrq.ifq_maxlen = ipxqmaxlen; ipx_netmask.sipx_len = 6; diff --git a/sys/netiso/clnp_frag.c b/sys/netiso/clnp_frag.c index 95fc88ea25b..80eeec257f6 100644 --- a/sys/netiso/clnp_frag.c +++ b/sys/netiso/clnp_frag.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clnp_frag.c,v 1.6 2003/12/10 07:22:43 itojun Exp $ */ +/* $OpenBSD: clnp_frag.c,v 1.7 2004/06/20 21:09:02 tholo Exp $ */ /* $NetBSD: clnp_frag.c,v 1.8 1996/04/13 01:34:23 cgd Exp $ */ /*- @@ -875,8 +875,7 @@ static int troll_cnt; float troll_random() { - extern struct timeval time; - long t = time.tv_usec % 100; + long t = random() % 100; return ((float) t / (float) 100); } |