mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-31 11:59:36 -05:00
random number seed pid-tid fixup, todo.
git-svn-id: file:///svn/unbound/trunk@463 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
5f9edd6ca6
commit
dc4d8d2838
3 changed files with 8 additions and 1 deletions
|
|
@ -651,7 +651,8 @@ worker_init(struct worker* worker, struct config_file *cfg,
|
|||
return 0;
|
||||
}
|
||||
seed = (unsigned int)time(NULL) ^ (unsigned int)getpid() ^
|
||||
(unsigned int)worker->thread_num;
|
||||
(((unsigned int)worker->thread_num)<<17);
|
||||
/* shift thread_num so it does not match out pid bits */
|
||||
if(!ub_initstate(seed, worker->rndstate, RND_STATE_SIZE)) {
|
||||
log_err("could not init random numbers.");
|
||||
worker_delete(worker);
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
30 July 2007: Wouter
|
||||
- changed random state init, so that sequential process IDs are not
|
||||
cancelled out by sequential thread-ids in the random number seed.
|
||||
|
||||
27 July 2007: Wouter
|
||||
- removed useless -C debug option. It did not work.
|
||||
- text edit of documentation.
|
||||
|
|
|
|||
2
doc/TODO
2
doc/TODO
|
|
@ -24,3 +24,5 @@ o check query, option to enforce presence of qdsection in noerror answers.
|
|||
o configuration option where port 53 is used for send and receive, no other
|
||||
ports are used.
|
||||
o prime sequence in multiple queries, if glue missing from prime sequence.
|
||||
o (option) to not send replies to clients after a timeout of (say 5 secs) has
|
||||
passed, but keep task active for later retries by client.
|
||||
|
|
|
|||
Loading…
Reference in a new issue