mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-22 07:41:16 -05:00
use central entropy to seed threads.
git-svn-id: file:///svn/unbound/trunk@2330 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
a3a1119f54
commit
d748bca7de
2 changed files with 4 additions and 1 deletions
|
|
@ -1068,7 +1068,7 @@ worker_init(struct worker* worker, struct config_file *cfg,
|
||||||
seed = (unsigned int)time(NULL) ^ (unsigned int)getpid() ^
|
seed = (unsigned int)time(NULL) ^ (unsigned int)getpid() ^
|
||||||
(((unsigned int)worker->thread_num)<<17);
|
(((unsigned int)worker->thread_num)<<17);
|
||||||
/* shift thread_num so it does not match out pid bits */
|
/* 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;
|
seed = 0;
|
||||||
log_err("could not init random numbers.");
|
log_err("could not init random numbers.");
|
||||||
worker_delete(worker);
|
worker_delete(worker);
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
4 November 2010: Wouter
|
||||||
|
- Use central entropy to seed threads.
|
||||||
|
|
||||||
3 November 2010: Wouter
|
3 November 2010: Wouter
|
||||||
- Change the rtt used to probe EDNS-timeout hosts to 1000 msec.
|
- Change the rtt used to probe EDNS-timeout hosts to 1000 msec.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue