summaryrefslogtreecommitdiffstats
path: root/sys/kern/init_main.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2011-01-08 19:45:07 +0000
committerderaadt <deraadt@openbsd.org>2011-01-08 19:45:07 +0000
commit39993f6f79b563bc0b480b3da7d5eaccc0bd722e (patch)
tree247e9bf792946973205c921d6293b249911da73d /sys/kern/init_main.c
parentChange detection of indefinite BER lenghts (which is not allowed). Only a (diff)
downloadwireguard-openbsd-39993f6f79b563bc0b480b3da7d5eaccc0bd722e.tar.xz
wireguard-openbsd-39993f6f79b563bc0b480b3da7d5eaccc0bd722e.zip
split randomattach into random_init() and random_start(), so that we
can make attempts to load 'entropy' into the RC4. ok miod ariane
Diffstat (limited to 'sys/kern/init_main.c')
-rw-r--r--sys/kern/init_main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index cb964b3a96f..fc78df2c2a3 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: init_main.c,v 1.173 2011/01/01 06:54:51 deraadt Exp $ */
+/* $OpenBSD: init_main.c,v 1.174 2011/01/08 19:45:09 deraadt Exp $ */
/* $NetBSD: init_main.c,v 1.84.4.1 1996/06/02 09:08:06 mrg Exp $ */
/*
@@ -220,6 +220,8 @@ main(void *framep)
KERNEL_LOCK_INIT();
SCHED_LOCK_INIT();
+ random_init();
+
uvm_init();
disk_init(); /* must come before autoconfiguration */
tty_init(); /* initialise tty's */
@@ -345,6 +347,8 @@ main(void *framep)
/* Initialize work queues */
workq_init();
+ random_start();
+
/* Initialize the interface/address trees */
ifinit();
@@ -382,7 +386,6 @@ main(void *framep)
#endif
/* Attach pseudo-devices. */
- randomattach();
for (pdev = pdevinit; pdev->pdev_attach != NULL; pdev++)
if (pdev->pdev_count > 0)
(*pdev->pdev_attach)(pdev->pdev_count);