mirror of
https://github.com/monero-project/monero.git
synced 2025-07-23 19:50:39 -04:00
update unbound
This commit is contained in:
parent
7792255968
commit
93944333c5
45 changed files with 2290 additions and 3300 deletions
8
external/unbound/daemon/daemon.c
vendored
8
external/unbound/daemon/daemon.c
vendored
|
@ -399,6 +399,12 @@ daemon_create_workers(struct daemon* daemon)
|
|||
verbose(VERB_ALGO, "total of %d outgoing ports available", numport);
|
||||
|
||||
daemon->num = (daemon->cfg->num_threads?daemon->cfg->num_threads:1);
|
||||
if(daemon->reuseport && (int)daemon->num < (int)daemon->num_ports) {
|
||||
log_warn("cannot reduce num-threads to %d because so-reuseport "
|
||||
"so continuing with %d threads.", (int)daemon->num,
|
||||
(int)daemon->num_ports);
|
||||
daemon->num = (int)daemon->num_ports;
|
||||
}
|
||||
daemon->workers = (struct worker**)calloc((size_t)daemon->num,
|
||||
sizeof(struct worker*));
|
||||
if(daemon->cfg->dnstap) {
|
||||
|
@ -464,7 +470,7 @@ thread_start(void* arg)
|
|||
#endif
|
||||
#ifdef SO_REUSEPORT
|
||||
if(worker->daemon->cfg->so_reuseport)
|
||||
port_num = worker->thread_num;
|
||||
port_num = worker->thread_num % worker->daemon->num_ports;
|
||||
else
|
||||
port_num = 0;
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue