diff --git a/contrib/Dockerfile.tests b/contrib/Dockerfile.tests index 417daccb2..6cc3e4c1e 100644 --- a/contrib/Dockerfile.tests +++ b/contrib/Dockerfile.tests @@ -1,10 +1,8 @@ FROM gcc:latest WORKDIR /usr/src/unbound -RUN apt-get update # install semantic parser & lexical analyzer -RUN apt-get install -y bison flex # install packages used in tests -RUN apt-get install -y ldnsutils dnsutils xxd splint doxygen netcat +RUN apt-get update && apt-get install -y bison flex ldnsutils dnsutils xxd splint doxygen netcat-traditional # accept short rsa keys, which are used in tests RUN sed -i 's/SECLEVEL=2/SECLEVEL=1/g' /usr/lib/ssl/openssl.cnf diff --git a/iterator/iterator.c b/iterator/iterator.c index e7365c566..d04a1c3b5 100644 --- a/iterator/iterator.c +++ b/iterator/iterator.c @@ -1121,7 +1121,7 @@ generate_a_aaaa_check(struct module_qstate* qstate, struct iter_qstate* iq, * Generate a NS check request to obtain authoritative information * on an NS rrset. * - * @param qstate: the qtstate that triggered the need to prime. + * @param qstate: the qstate that triggered the need to prime. * @param iq: iterator query state. * @param id: module id. */ diff --git a/services/mesh.c b/services/mesh.c index 6148b0bc6..4dc0cf3a5 100644 --- a/services/mesh.c +++ b/services/mesh.c @@ -457,13 +457,14 @@ void mesh_new_client(struct mesh_area* mesh, struct query_info* qinfo, s->s.edns_opts_front_in = edns_opt_copy_region(edns->opt_list_in, s->s.region); if(!s->s.edns_opts_front_in) { - log_err("mesh_state_create: out of memory; SERVFAIL"); + log_err("edns_opt_copy_region: out of memory; SERVFAIL"); if(!inplace_cb_reply_servfail_call(mesh->env, qinfo, NULL, NULL, LDNS_RCODE_SERVFAIL, edns, rep, mesh->env->scratch, mesh->env->now_tv)) edns->opt_list_inplace_cb_out = NULL; error_encode(r_buffer, LDNS_RCODE_SERVFAIL, qinfo, qid, qflags, edns); comm_point_send_reply(rep); + mesh_state_delete(&s->s); return; } } @@ -576,6 +577,7 @@ mesh_new_callback(struct mesh_area* mesh, struct query_info* qinfo, s->s.edns_opts_front_in = edns_opt_copy_region(edns->opt_list_in, s->s.region); if(!s->s.edns_opts_front_in) { + mesh_state_delete(&s->s); return 0; } } @@ -892,12 +894,6 @@ mesh_state_create(struct module_env* env, struct query_info* qinfo, return mstate; } -int -mesh_state_is_unique(struct mesh_state* mstate) -{ - return mstate->unique != NULL; -} - void mesh_state_make_unique(struct mesh_state* mstate) { diff --git a/services/mesh.h b/services/mesh.h index 143078bdc..d926cfc9d 100644 --- a/services/mesh.h +++ b/services/mesh.h @@ -480,14 +480,6 @@ struct mesh_state* mesh_state_create(struct module_env* env, struct query_info* qinfo, struct respip_client_info* cinfo, uint16_t qflags, int prime, int valrec); -/** - * Check if the mesh state is unique. - * A unique mesh state uses it's unique member to point to itself, else NULL. - * @param mstate: mesh state to check. - * @return true if the mesh state is unique, false otherwise. - */ -int mesh_state_is_unique(struct mesh_state* mstate); - /** * Make a mesh state unique. * A unique mesh state uses it's unique member to point to itself.