diff options
Diffstat (limited to 'daemon')
| -rw-r--r-- | daemon/daemon.c | 13 | ||||
| -rw-r--r-- | daemon/remote.c | 4 | ||||
| -rw-r--r-- | daemon/unbound.c | 2 | ||||
| -rw-r--r-- | daemon/worker.c | 6 |
4 files changed, 12 insertions, 13 deletions
diff --git a/daemon/daemon.c b/daemon/daemon.c index a6bfe390271e..4c3d5f1c1a17 100644 --- a/daemon/daemon.c +++ b/daemon/daemon.c @@ -660,18 +660,15 @@ daemon_fork(struct daemon* daemon) /* Start resolver service on main thread. */ #ifdef HAVE_SYSTEMD - if(daemon->cfg->use_systemd) - sd_notify(0, "READY=1"); + sd_notify(0, "READY=1"); #endif log_info("start of service (%s).", PACKAGE_STRING); worker_work(daemon->workers[0]); #ifdef HAVE_SYSTEMD - if(daemon->cfg->use_systemd) { - if (daemon->workers[0]->need_to_exit) - sd_notify(0, "STOPPING=1"); - else - sd_notify(0, "RELOADING=1"); - } + if (daemon->workers[0]->need_to_exit) + sd_notify(0, "STOPPING=1"); + else + sd_notify(0, "RELOADING=1"); #endif log_info("service stopped (%s).", PACKAGE_STRING); diff --git a/daemon/remote.c b/daemon/remote.c index 91e5609f50f8..3971e4540510 100644 --- a/daemon/remote.c +++ b/daemon/remote.c @@ -275,12 +275,13 @@ add_open(const char* ip, int nr, struct listen_port** list, int noproto_is_err, struct addrinfo hints; struct addrinfo* res; struct listen_port* n; - int noproto; + int noproto = 0; int fd, r; char port[15]; snprintf(port, sizeof(port), "%d", nr); port[sizeof(port)-1]=0; memset(&hints, 0, sizeof(hints)); + log_assert(ip); if(ip[0] == '/') { /* This looks like a local socket */ @@ -1069,6 +1070,7 @@ do_stats(RES* ssl, struct daemon_remote* rc, int reset) struct ub_stats_info total; struct ub_stats_info s; int i; + memset(&total, 0, sizeof(total)); log_assert(daemon->num > 0); /* gather all thread statistics in one place */ for(i=0; i<daemon->num; i++) { diff --git a/daemon/unbound.c b/daemon/unbound.c index 3f0f75a560c5..020e453034ad 100644 --- a/daemon/unbound.c +++ b/daemon/unbound.c @@ -730,7 +730,7 @@ main(int argc, char* argv[]) } } argc -= optind; - argv += optind; + /* argv += optind; not using further arguments */ if(winopt) { #ifdef UB_ON_WINDOWS diff --git a/daemon/worker.c b/daemon/worker.c index 9551c60f4a6a..2697ea6534f1 100644 --- a/daemon/worker.c +++ b/daemon/worker.c @@ -1180,7 +1180,7 @@ worker_handle_request(struct comm_point* c, void* arg, int error, char addrbuf[128]; addr_to_str(&repinfo->addr, repinfo->addrlen, addrbuf, sizeof(addrbuf)); - verbose(VERB_OPS, "ip_ratelimit allowed through for ip address %s ", + verbose(VERB_QUERY, "ip_ratelimit allowed through for ip address %s because of slip in ip_ratelimit_factor", addrbuf); } else { worker->stats.num_queries_ip_ratelimited++; @@ -1671,14 +1671,14 @@ worker_create(struct daemon* daemon, int id, int* ports, int n) (((unsigned int)worker->thread_num)<<17); /* shift thread_num so it does not match out pid bits */ if(!(worker->rndstate = ub_initstate(seed, daemon->rand))) { - seed = 0; + explicit_bzero(&seed, sizeof(seed)); log_err("could not init random numbers."); tube_delete(worker->cmd); free(worker->ports); free(worker); return NULL; } - seed = 0; + explicit_bzero(&seed, sizeof(seed)); #ifdef USE_DNSTAP if(daemon->cfg->dnstap) { log_assert(daemon->dtenv != NULL); |
