From d748bca7de4dc43aaa9e2880ae165b44e2476c01 Mon Sep 17 00:00:00 2001 From: Wouter Wijngaards Date: Thu, 4 Nov 2010 11:38:23 +0000 Subject: [PATCH] use central entropy to seed threads. git-svn-id: file:///svn/unbound/trunk@2330 be551aaa-1e26-0410-a405-d3ace91eadb9 --- daemon/worker.c | 2 +- doc/Changelog | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/daemon/worker.c b/daemon/worker.c index 627f4104d..7024164f2 100644 --- a/daemon/worker.c +++ b/daemon/worker.c @@ -1068,7 +1068,7 @@ worker_init(struct worker* worker, struct config_file *cfg, seed = (unsigned int)time(NULL) ^ (unsigned int)getpid() ^ (((unsigned int)worker->thread_num)<<17); /* shift thread_num so it does not match out pid bits */ - if(!(worker->rndstate = ub_initstate(seed, NULL))) { + if(!(worker->rndstate = ub_initstate(seed, worker->daemon->rand))) { seed = 0; log_err("could not init random numbers."); worker_delete(worker); diff --git a/doc/Changelog b/doc/Changelog index 9963c0032..1492a023c 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,6 @@ +4 November 2010: Wouter + - Use central entropy to seed threads. + 3 November 2010: Wouter - Change the rtt used to probe EDNS-timeout hosts to 1000 msec. -- 2.47.2