mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
alloc of table makes it aligned.
git-svn-id: file:///svn/unbound/trunk@102 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
a45ca399fe
commit
6f94bd720d
4 changed files with 8 additions and 2 deletions
|
|
@ -246,6 +246,11 @@ worker_init(const char* port, int do_ip4, int do_ip6, int do_udp, int do_tcp,
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
/* init random(), large table size. */
|
/* init random(), large table size. */
|
||||||
|
if(!(worker->rndstate = (char*)malloc(RND_STATE_SIZE))) {
|
||||||
|
log_err("malloc rndtable failed.");
|
||||||
|
worker_delete(worker);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
if(!initstate(time(NULL)^getpid(), worker->rndstate, RND_STATE_SIZE)) {
|
if(!initstate(time(NULL)^getpid(), worker->rndstate, RND_STATE_SIZE)) {
|
||||||
log_err("could not init random numbers.");
|
log_err("could not init random numbers.");
|
||||||
worker_delete(worker);
|
worker_delete(worker);
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@ struct worker {
|
||||||
socklen_t fwd_addrlen;
|
socklen_t fwd_addrlen;
|
||||||
|
|
||||||
/** random() table for this worker. */
|
/** random() table for this worker. */
|
||||||
char rndstate[RND_STATE_SIZE];
|
char* rndstate;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
15 February 2007: Wouter
|
15 February 2007: Wouter
|
||||||
- port to FreeBSD 4.11 Dec Alpha. Also works on Solaris 10 sparc64,
|
- port to FreeBSD 4.11 Dec Alpha. Also works on Solaris 10 sparc64,
|
||||||
Solaris 9, FreeBSD 6, Linux i386 and OSX powerpc.
|
Solaris 9, FreeBSD 6, Linux i386 and OSX powerpc.
|
||||||
|
- malloc rndstate, so that it is aligned for access.
|
||||||
|
|
||||||
14 February 2007: Wouter
|
14 February 2007: Wouter
|
||||||
- Included configure.ac changes from ldns.
|
- Included configure.ac changes from ldns.
|
||||||
|
|
|
||||||
2
testdata/fwd_error.rpl
vendored
2
testdata/fwd_error.rpl
vendored
|
|
@ -1,4 +1,4 @@
|
||||||
SCENARIO_BEGIN Forwarder and a timeout happens on server query.
|
SCENARIO_BEGIN Forwarder and an error happens on server query.
|
||||||
STEP 1 QUERY
|
STEP 1 QUERY
|
||||||
ENTRY_BEGIN
|
ENTRY_BEGIN
|
||||||
SECTION QUESTION
|
SECTION QUESTION
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue