mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
complete renaming of the modules edns list
This commit is contained in:
parent
fa73142b79
commit
8205c87a96
11 changed files with 31 additions and 32 deletions
|
|
@ -522,7 +522,7 @@ answer_norec_from_cache(struct worker* worker, struct query_info* qinfo,
|
||||||
if(!inplace_cb_reply_servfail_call(&worker->env, qinfo, NULL, NULL,
|
if(!inplace_cb_reply_servfail_call(&worker->env, qinfo, NULL, NULL,
|
||||||
LDNS_RCODE_SERVFAIL, edns, repinfo, worker->scratchpad,
|
LDNS_RCODE_SERVFAIL, edns, repinfo, worker->scratchpad,
|
||||||
worker->env.now_tv))
|
worker->env.now_tv))
|
||||||
edns->opt_list_modules_out = NULL;
|
edns->opt_list_inplace_cb_out = NULL;
|
||||||
error_encode(repinfo->c->buffer, LDNS_RCODE_SERVFAIL,
|
error_encode(repinfo->c->buffer, LDNS_RCODE_SERVFAIL,
|
||||||
&msg->qinfo, id, flags, edns);
|
&msg->qinfo, id, flags, edns);
|
||||||
}
|
}
|
||||||
|
|
@ -722,7 +722,7 @@ answer_from_cache(struct worker* worker, struct query_info* qinfo,
|
||||||
if(!inplace_cb_reply_servfail_call(&worker->env, qinfo, NULL, NULL,
|
if(!inplace_cb_reply_servfail_call(&worker->env, qinfo, NULL, NULL,
|
||||||
LDNS_RCODE_SERVFAIL, edns, repinfo, worker->scratchpad,
|
LDNS_RCODE_SERVFAIL, edns, repinfo, worker->scratchpad,
|
||||||
worker->env.now_tv))
|
worker->env.now_tv))
|
||||||
edns->opt_list_modules_out = NULL;
|
edns->opt_list_inplace_cb_out = NULL;
|
||||||
error_encode(repinfo->c->buffer, LDNS_RCODE_SERVFAIL,
|
error_encode(repinfo->c->buffer, LDNS_RCODE_SERVFAIL,
|
||||||
qinfo, id, flags, edns);
|
qinfo, id, flags, edns);
|
||||||
}
|
}
|
||||||
|
|
@ -788,7 +788,7 @@ chaos_replystr(sldns_buffer* pkt, char** str, int num, struct edns_data* edns,
|
||||||
if(!inplace_cb_reply_local_call(&worker->env, NULL, NULL, NULL,
|
if(!inplace_cb_reply_local_call(&worker->env, NULL, NULL, NULL,
|
||||||
LDNS_RCODE_NOERROR, edns, repinfo, worker->scratchpad,
|
LDNS_RCODE_NOERROR, edns, repinfo, worker->scratchpad,
|
||||||
worker->env.now_tv))
|
worker->env.now_tv))
|
||||||
edns->opt_list_modules_out = NULL;
|
edns->opt_list_inplace_cb_out = NULL;
|
||||||
sldns_buffer_clear(pkt);
|
sldns_buffer_clear(pkt);
|
||||||
sldns_buffer_skip(pkt, (ssize_t)sizeof(uint16_t)); /* skip id */
|
sldns_buffer_skip(pkt, (ssize_t)sizeof(uint16_t)); /* skip id */
|
||||||
sldns_buffer_write_u16(pkt, (uint16_t)(BIT_QR|BIT_RA));
|
sldns_buffer_write_u16(pkt, (uint16_t)(BIT_QR|BIT_RA));
|
||||||
|
|
@ -1262,7 +1262,7 @@ worker_handle_request(struct comm_point* c, void* arg, int error,
|
||||||
edns.bits &= EDNS_DO;
|
edns.bits &= EDNS_DO;
|
||||||
edns.opt_list_in = NULL;
|
edns.opt_list_in = NULL;
|
||||||
edns.opt_list_out = NULL;
|
edns.opt_list_out = NULL;
|
||||||
edns.opt_list_modules_out = NULL;
|
edns.opt_list_inplace_cb_out = NULL;
|
||||||
edns.padding_block_size = 0;
|
edns.padding_block_size = 0;
|
||||||
verbose(VERB_ALGO, "query with bad edns version.");
|
verbose(VERB_ALGO, "query with bad edns version.");
|
||||||
log_addr(VERB_CLIENT,"from",&repinfo->addr, repinfo->addrlen);
|
log_addr(VERB_CLIENT,"from",&repinfo->addr, repinfo->addrlen);
|
||||||
|
|
|
||||||
|
|
@ -602,7 +602,7 @@ setup_qinfo_edns(struct libworker* w, struct ctx_query* q,
|
||||||
edns->bits = EDNS_DO;
|
edns->bits = EDNS_DO;
|
||||||
edns->opt_list_in = NULL;
|
edns->opt_list_in = NULL;
|
||||||
edns->opt_list_out = NULL;
|
edns->opt_list_out = NULL;
|
||||||
edns->opt_list_modules_out = NULL;
|
edns->opt_list_inplace_cb_out = NULL;
|
||||||
edns->padding_block_size = 0;
|
edns->padding_block_size = 0;
|
||||||
if(sldns_buffer_capacity(w->back->udp_buff) < 65535)
|
if(sldns_buffer_capacity(w->back->udp_buff) < 65535)
|
||||||
edns->udp_size = (uint16_t)sldns_buffer_capacity(
|
edns->udp_size = (uint16_t)sldns_buffer_capacity(
|
||||||
|
|
|
||||||
|
|
@ -3518,7 +3518,7 @@ auth_error_encode(struct query_info* qinfo, struct module_env* env,
|
||||||
|
|
||||||
if(!inplace_cb_reply_local_call(env, qinfo, NULL, NULL,
|
if(!inplace_cb_reply_local_call(env, qinfo, NULL, NULL,
|
||||||
rcode, edns, repinfo, temp, env->now_tv))
|
rcode, edns, repinfo, temp, env->now_tv))
|
||||||
edns->opt_list_modules_out = NULL;
|
edns->opt_list_inplace_cb_out = NULL;
|
||||||
error_encode(buf, rcode|BIT_AA, qinfo,
|
error_encode(buf, rcode|BIT_AA, qinfo,
|
||||||
*(uint16_t*)sldns_buffer_begin(buf),
|
*(uint16_t*)sldns_buffer_begin(buf),
|
||||||
sldns_buffer_read_u16_at(buf, 2), edns);
|
sldns_buffer_read_u16_at(buf, 2), edns);
|
||||||
|
|
@ -5360,7 +5360,7 @@ xfr_transfer_lookup_host(struct auth_xfer* xfr, struct module_env* env)
|
||||||
edns.bits = EDNS_DO;
|
edns.bits = EDNS_DO;
|
||||||
edns.opt_list_in = NULL;
|
edns.opt_list_in = NULL;
|
||||||
edns.opt_list_out = NULL;
|
edns.opt_list_out = NULL;
|
||||||
edns.opt_list_modules_out = NULL;
|
edns.opt_list_inplace_cb_out = NULL;
|
||||||
edns.padding_block_size = 0;
|
edns.padding_block_size = 0;
|
||||||
if(sldns_buffer_capacity(buf) < 65535)
|
if(sldns_buffer_capacity(buf) < 65535)
|
||||||
edns.udp_size = (uint16_t)sldns_buffer_capacity(buf);
|
edns.udp_size = (uint16_t)sldns_buffer_capacity(buf);
|
||||||
|
|
@ -6551,7 +6551,7 @@ xfr_probe_lookup_host(struct auth_xfer* xfr, struct module_env* env)
|
||||||
edns.bits = EDNS_DO;
|
edns.bits = EDNS_DO;
|
||||||
edns.opt_list_in = NULL;
|
edns.opt_list_in = NULL;
|
||||||
edns.opt_list_out = NULL;
|
edns.opt_list_out = NULL;
|
||||||
edns.opt_list_modules_out = NULL;
|
edns.opt_list_inplace_cb_out = NULL;
|
||||||
edns.padding_block_size = 0;
|
edns.padding_block_size = 0;
|
||||||
if(sldns_buffer_capacity(buf) < 65535)
|
if(sldns_buffer_capacity(buf) < 65535)
|
||||||
edns.udp_size = (uint16_t)sldns_buffer_capacity(buf);
|
edns.udp_size = (uint16_t)sldns_buffer_capacity(buf);
|
||||||
|
|
@ -8328,7 +8328,7 @@ zonemd_lookup_dnskey(struct auth_zone* z, struct module_env* env)
|
||||||
edns.bits = EDNS_DO;
|
edns.bits = EDNS_DO;
|
||||||
edns.opt_list_in = NULL;
|
edns.opt_list_in = NULL;
|
||||||
edns.opt_list_out = NULL;
|
edns.opt_list_out = NULL;
|
||||||
edns.opt_list_modules_out = NULL;
|
edns.opt_list_inplace_cb_out = NULL;
|
||||||
if(sldns_buffer_capacity(buf) < 65535)
|
if(sldns_buffer_capacity(buf) < 65535)
|
||||||
edns.udp_size = (uint16_t)sldns_buffer_capacity(buf);
|
edns.udp_size = (uint16_t)sldns_buffer_capacity(buf);
|
||||||
else edns.udp_size = 65535;
|
else edns.udp_size = 65535;
|
||||||
|
|
|
||||||
|
|
@ -1299,7 +1299,7 @@ local_error_encode(struct query_info* qinfo, struct module_env* env,
|
||||||
|
|
||||||
if(!inplace_cb_reply_local_call(env, qinfo, NULL, NULL,
|
if(!inplace_cb_reply_local_call(env, qinfo, NULL, NULL,
|
||||||
rcode, edns, repinfo, temp, env->now_tv))
|
rcode, edns, repinfo, temp, env->now_tv))
|
||||||
edns->opt_list_modules_out = NULL;
|
edns->opt_list_inplace_cb_out = NULL;
|
||||||
error_encode(buf, r, qinfo, *(uint16_t*)sldns_buffer_begin(buf),
|
error_encode(buf, r, qinfo, *(uint16_t*)sldns_buffer_begin(buf),
|
||||||
sldns_buffer_read_u16_at(buf, 2), edns);
|
sldns_buffer_read_u16_at(buf, 2), edns);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -505,7 +505,7 @@ void mesh_new_client(struct mesh_area* mesh, struct query_info* qinfo,
|
||||||
log_err("mesh_state_create: out of memory; SERVFAIL");
|
log_err("mesh_state_create: out of memory; SERVFAIL");
|
||||||
if(!inplace_cb_reply_servfail_call(mesh->env, qinfo, NULL, NULL,
|
if(!inplace_cb_reply_servfail_call(mesh->env, qinfo, NULL, NULL,
|
||||||
LDNS_RCODE_SERVFAIL, edns, rep, mesh->env->scratch, mesh->env->now_tv))
|
LDNS_RCODE_SERVFAIL, edns, rep, mesh->env->scratch, mesh->env->now_tv))
|
||||||
edns->opt_list_modules_out = NULL;
|
edns->opt_list_inplace_cb_out = NULL;
|
||||||
error_encode(r_buffer, LDNS_RCODE_SERVFAIL,
|
error_encode(r_buffer, LDNS_RCODE_SERVFAIL,
|
||||||
qinfo, qid, qflags, edns);
|
qinfo, qid, qflags, edns);
|
||||||
comm_point_send_reply(rep);
|
comm_point_send_reply(rep);
|
||||||
|
|
@ -521,7 +521,7 @@ void mesh_new_client(struct mesh_area* mesh, struct query_info* qinfo,
|
||||||
log_err("mesh_state_create: out of memory; SERVFAIL");
|
log_err("mesh_state_create: out of memory; SERVFAIL");
|
||||||
if(!inplace_cb_reply_servfail_call(mesh->env, qinfo, NULL,
|
if(!inplace_cb_reply_servfail_call(mesh->env, qinfo, NULL,
|
||||||
NULL, LDNS_RCODE_SERVFAIL, edns, rep, mesh->env->scratch, mesh->env->now_tv))
|
NULL, LDNS_RCODE_SERVFAIL, edns, rep, mesh->env->scratch, mesh->env->now_tv))
|
||||||
edns->opt_list_modules_out = NULL;
|
edns->opt_list_inplace_cb_out = NULL;
|
||||||
error_encode(r_buffer, LDNS_RCODE_SERVFAIL,
|
error_encode(r_buffer, LDNS_RCODE_SERVFAIL,
|
||||||
qinfo, qid, qflags, edns);
|
qinfo, qid, qflags, edns);
|
||||||
comm_point_send_reply(rep);
|
comm_point_send_reply(rep);
|
||||||
|
|
@ -594,7 +594,7 @@ void mesh_new_client(struct mesh_area* mesh, struct query_info* qinfo,
|
||||||
servfail_mem:
|
servfail_mem:
|
||||||
if(!inplace_cb_reply_servfail_call(mesh->env, qinfo, &s->s,
|
if(!inplace_cb_reply_servfail_call(mesh->env, qinfo, &s->s,
|
||||||
NULL, LDNS_RCODE_SERVFAIL, edns, rep, mesh->env->scratch, mesh->env->now_tv))
|
NULL, LDNS_RCODE_SERVFAIL, edns, rep, mesh->env->scratch, mesh->env->now_tv))
|
||||||
edns->opt_list_modules_out = NULL;
|
edns->opt_list_inplace_cb_out = NULL;
|
||||||
error_encode(r_buffer, LDNS_RCODE_SERVFAIL,
|
error_encode(r_buffer, LDNS_RCODE_SERVFAIL,
|
||||||
qinfo, qid, qflags, edns);
|
qinfo, qid, qflags, edns);
|
||||||
comm_point_send_reply(rep);
|
comm_point_send_reply(rep);
|
||||||
|
|
@ -1145,11 +1145,11 @@ mesh_do_callback(struct mesh_state* m, int rcode, struct reply_info* rep,
|
||||||
if(rcode == LDNS_RCODE_SERVFAIL) {
|
if(rcode == LDNS_RCODE_SERVFAIL) {
|
||||||
if(!inplace_cb_reply_servfail_call(m->s.env, &m->s.qinfo, &m->s,
|
if(!inplace_cb_reply_servfail_call(m->s.env, &m->s.qinfo, &m->s,
|
||||||
rep, rcode, &r->edns, NULL, m->s.region, start_time))
|
rep, rcode, &r->edns, NULL, m->s.region, start_time))
|
||||||
r->edns.opt_list_modules_out = NULL;
|
r->edns.opt_list_inplace_cb_out = NULL;
|
||||||
} else {
|
} else {
|
||||||
if(!inplace_cb_reply_call(m->s.env, &m->s.qinfo, &m->s, rep, rcode,
|
if(!inplace_cb_reply_call(m->s.env, &m->s.qinfo, &m->s, rep, rcode,
|
||||||
&r->edns, NULL, m->s.region, start_time))
|
&r->edns, NULL, m->s.region, start_time))
|
||||||
r->edns.opt_list_modules_out = NULL;
|
r->edns.opt_list_inplace_cb_out = NULL;
|
||||||
}
|
}
|
||||||
fptr_ok(fptr_whitelist_mesh_cb(r->cb));
|
fptr_ok(fptr_whitelist_mesh_cb(r->cb));
|
||||||
(*r->cb)(r->cb_arg, rcode, r->buf, sec_status_unchecked, NULL,
|
(*r->cb)(r->cb_arg, rcode, r->buf, sec_status_unchecked, NULL,
|
||||||
|
|
@ -1267,7 +1267,7 @@ mesh_send_reply(struct mesh_state* m, int rcode, struct reply_info* rep,
|
||||||
prev->edns.bits == r->edns.bits &&
|
prev->edns.bits == r->edns.bits &&
|
||||||
prev->edns.udp_size == r->edns.udp_size &&
|
prev->edns.udp_size == r->edns.udp_size &&
|
||||||
edns_opt_list_compare(prev->edns.opt_list_out, r->edns.opt_list_out) == 0 &&
|
edns_opt_list_compare(prev->edns.opt_list_out, r->edns.opt_list_out) == 0 &&
|
||||||
edns_opt_list_compare(prev->edns.opt_list_modules_out, r->edns.opt_list_modules_out) == 0
|
edns_opt_list_compare(prev->edns.opt_list_inplace_cb_out, r->edns.opt_list_inplace_cb_out) == 0
|
||||||
) {
|
) {
|
||||||
/* if the previous reply is identical to this one, fix ID */
|
/* if the previous reply is identical to this one, fix ID */
|
||||||
if(prev_buffer != r_buffer)
|
if(prev_buffer != r_buffer)
|
||||||
|
|
@ -1284,11 +1284,11 @@ mesh_send_reply(struct mesh_state* m, int rcode, struct reply_info* rep,
|
||||||
if(rcode == LDNS_RCODE_SERVFAIL) {
|
if(rcode == LDNS_RCODE_SERVFAIL) {
|
||||||
if(!inplace_cb_reply_servfail_call(m->s.env, &m->s.qinfo, &m->s,
|
if(!inplace_cb_reply_servfail_call(m->s.env, &m->s.qinfo, &m->s,
|
||||||
rep, rcode, &r->edns, &r->query_reply, m->s.region, &r->start_time))
|
rep, rcode, &r->edns, &r->query_reply, m->s.region, &r->start_time))
|
||||||
r->edns.opt_list_modules_out = NULL;
|
r->edns.opt_list_inplace_cb_out = NULL;
|
||||||
} else {
|
} else {
|
||||||
if(!inplace_cb_reply_call(m->s.env, &m->s.qinfo, &m->s, rep, rcode,
|
if(!inplace_cb_reply_call(m->s.env, &m->s.qinfo, &m->s, rep, rcode,
|
||||||
&r->edns, &r->query_reply, m->s.region, &r->start_time))
|
&r->edns, &r->query_reply, m->s.region, &r->start_time))
|
||||||
r->edns.opt_list_modules_out = NULL;
|
r->edns.opt_list_inplace_cb_out = NULL;
|
||||||
}
|
}
|
||||||
error_encode(r_buffer, rcode, &m->s.qinfo, r->qid,
|
error_encode(r_buffer, rcode, &m->s.qinfo, r->qid,
|
||||||
r->qflags, &r->edns);
|
r->qflags, &r->edns);
|
||||||
|
|
@ -1312,7 +1312,7 @@ mesh_send_reply(struct mesh_state* m, int rcode, struct reply_info* rep,
|
||||||
{
|
{
|
||||||
if(!inplace_cb_reply_servfail_call(m->s.env, &m->s.qinfo, &m->s,
|
if(!inplace_cb_reply_servfail_call(m->s.env, &m->s.qinfo, &m->s,
|
||||||
rep, LDNS_RCODE_SERVFAIL, &r->edns, &r->query_reply, m->s.region, &r->start_time))
|
rep, LDNS_RCODE_SERVFAIL, &r->edns, &r->query_reply, m->s.region, &r->start_time))
|
||||||
r->edns.opt_list_modules_out = NULL;
|
r->edns.opt_list_inplace_cb_out = NULL;
|
||||||
error_encode(r_buffer, LDNS_RCODE_SERVFAIL,
|
error_encode(r_buffer, LDNS_RCODE_SERVFAIL,
|
||||||
&m->s.qinfo, r->qid, r->qflags, &r->edns);
|
&m->s.qinfo, r->qid, r->qflags, &r->edns);
|
||||||
}
|
}
|
||||||
|
|
@ -1509,8 +1509,8 @@ int mesh_state_add_cb(struct mesh_state* s, struct edns_data* edns,
|
||||||
if(edns->opt_list_out && !(r->edns.opt_list_out =
|
if(edns->opt_list_out && !(r->edns.opt_list_out =
|
||||||
edns_opt_copy_region(edns->opt_list_out, s->s.region)))
|
edns_opt_copy_region(edns->opt_list_out, s->s.region)))
|
||||||
return 0;
|
return 0;
|
||||||
if(edns->opt_list_modules_out && !(r->edns.opt_list_modules_out =
|
if(edns->opt_list_inplace_cb_out && !(r->edns.opt_list_inplace_cb_out =
|
||||||
edns_opt_copy_region(edns->opt_list_modules_out, s->s.region)))
|
edns_opt_copy_region(edns->opt_list_inplace_cb_out, s->s.region)))
|
||||||
return 0;
|
return 0;
|
||||||
r->qid = qid;
|
r->qid = qid;
|
||||||
r->qflags = qflags;
|
r->qflags = qflags;
|
||||||
|
|
@ -1536,8 +1536,8 @@ int mesh_state_add_reply(struct mesh_state* s, struct edns_data* edns,
|
||||||
if(edns->opt_list_out && !(r->edns.opt_list_out =
|
if(edns->opt_list_out && !(r->edns.opt_list_out =
|
||||||
edns_opt_copy_region(edns->opt_list_out, s->s.region)))
|
edns_opt_copy_region(edns->opt_list_out, s->s.region)))
|
||||||
return 0;
|
return 0;
|
||||||
if(edns->opt_list_modules_out && !(r->edns.opt_list_modules_out =
|
if(edns->opt_list_inplace_cb_out && !(r->edns.opt_list_inplace_cb_out =
|
||||||
edns_opt_copy_region(edns->opt_list_modules_out, s->s.region)))
|
edns_opt_copy_region(edns->opt_list_inplace_cb_out, s->s.region)))
|
||||||
return 0;
|
return 0;
|
||||||
r->qid = qid;
|
r->qid = qid;
|
||||||
r->qflags = qflags;
|
r->qflags = qflags;
|
||||||
|
|
|
||||||
|
|
@ -2711,7 +2711,7 @@ serviced_encode(struct serviced_query* sq, sldns_buffer* buff, int with_edns)
|
||||||
edns.edns_version = EDNS_ADVERTISED_VERSION;
|
edns.edns_version = EDNS_ADVERTISED_VERSION;
|
||||||
edns.opt_list_in = NULL;
|
edns.opt_list_in = NULL;
|
||||||
edns.opt_list_out = sq->opt_list;
|
edns.opt_list_out = sq->opt_list;
|
||||||
edns.opt_list_modules_out = NULL;
|
edns.opt_list_inplace_cb_out = NULL;
|
||||||
if(sq->status == serviced_query_UDP_EDNS_FRAG) {
|
if(sq->status == serviced_query_UDP_EDNS_FRAG) {
|
||||||
if(addr_is_ip6(&sq->addr, sq->addrlen)) {
|
if(addr_is_ip6(&sq->addr, sq->addrlen)) {
|
||||||
if(EDNS_FRAG_SIZE_IP6 < EDNS_ADVERTISED_SIZE)
|
if(EDNS_FRAG_SIZE_IP6 < EDNS_ADVERTISED_SIZE)
|
||||||
|
|
|
||||||
|
|
@ -1246,7 +1246,7 @@ struct serviced_query* outnet_serviced_query(struct outside_network* outnet,
|
||||||
}
|
}
|
||||||
edns.opt_list_in = NULL;
|
edns.opt_list_in = NULL;
|
||||||
edns.opt_list_out = qstate->edns_opts_back_out;
|
edns.opt_list_out = qstate->edns_opts_back_out;
|
||||||
edns.opt_list_modules_out = NULL;
|
edns.opt_list_inplace_cb_out = NULL;
|
||||||
attach_edns_record(pend->buffer, &edns);
|
attach_edns_record(pend->buffer, &edns);
|
||||||
}
|
}
|
||||||
memcpy(&pend->addr, addr, addrlen);
|
memcpy(&pend->addr, addr, addrlen);
|
||||||
|
|
|
||||||
|
|
@ -796,7 +796,7 @@ calc_edns_field_size(struct edns_data* edns)
|
||||||
struct edns_option* opt;
|
struct edns_option* opt;
|
||||||
if(!edns || !edns->edns_present)
|
if(!edns || !edns->edns_present)
|
||||||
return 0;
|
return 0;
|
||||||
for(opt = edns->opt_list_modules_out; opt; opt = opt->next) {
|
for(opt = edns->opt_list_inplace_cb_out; opt; opt = opt->next) {
|
||||||
rdatalen += 4 + opt->opt_len;
|
rdatalen += 4 + opt->opt_len;
|
||||||
}
|
}
|
||||||
for(opt = edns->opt_list_out; opt; opt = opt->next) {
|
for(opt = edns->opt_list_out; opt; opt = opt->next) {
|
||||||
|
|
@ -830,7 +830,7 @@ attach_edns_record_max_msg_sz(sldns_buffer* pkt, struct edns_data* edns,
|
||||||
rdatapos = sldns_buffer_position(pkt);
|
rdatapos = sldns_buffer_position(pkt);
|
||||||
sldns_buffer_write_u16(pkt, 0); /* rdatalen */
|
sldns_buffer_write_u16(pkt, 0); /* rdatalen */
|
||||||
/* write rdata */
|
/* write rdata */
|
||||||
for(opt=edns->opt_list_modules_out; opt; opt=opt->next) {
|
for(opt=edns->opt_list_inplace_cb_out; opt; opt=opt->next) {
|
||||||
if (opt->opt_code == LDNS_EDNS_PADDING) {
|
if (opt->opt_code == LDNS_EDNS_PADDING) {
|
||||||
padding_option = opt;
|
padding_option = opt;
|
||||||
continue;
|
continue;
|
||||||
|
|
|
||||||
|
|
@ -1101,7 +1101,7 @@ parse_extract_edns(struct msg_parse* msg, struct edns_data* edns,
|
||||||
edns->udp_size = ntohs(found->rrset_class);
|
edns->udp_size = ntohs(found->rrset_class);
|
||||||
edns->opt_list_in = NULL;
|
edns->opt_list_in = NULL;
|
||||||
edns->opt_list_out = NULL;
|
edns->opt_list_out = NULL;
|
||||||
edns->opt_list_modules_out = NULL;
|
edns->opt_list_inplace_cb_out = NULL;
|
||||||
edns->padding_block_size = 0;
|
edns->padding_block_size = 0;
|
||||||
|
|
||||||
/* take the options */
|
/* take the options */
|
||||||
|
|
@ -1145,7 +1145,6 @@ int
|
||||||
parse_edns_from_pkt(sldns_buffer* pkt, struct edns_data* edns,
|
parse_edns_from_pkt(sldns_buffer* pkt, struct edns_data* edns,
|
||||||
struct config_file* cfg, struct comm_point* c, struct regional* region)
|
struct config_file* cfg, struct comm_point* c, struct regional* region)
|
||||||
{
|
{
|
||||||
int rcode;
|
|
||||||
size_t rdata_len;
|
size_t rdata_len;
|
||||||
uint8_t* rdata_ptr;
|
uint8_t* rdata_ptr;
|
||||||
log_assert(LDNS_QDCOUNT(sldns_buffer_begin(pkt)) == 1);
|
log_assert(LDNS_QDCOUNT(sldns_buffer_begin(pkt)) == 1);
|
||||||
|
|
@ -1178,7 +1177,7 @@ parse_edns_from_pkt(sldns_buffer* pkt, struct edns_data* edns,
|
||||||
edns->bits = sldns_buffer_read_u16(pkt);
|
edns->bits = sldns_buffer_read_u16(pkt);
|
||||||
edns->opt_list_in = NULL;
|
edns->opt_list_in = NULL;
|
||||||
edns->opt_list_out = NULL;
|
edns->opt_list_out = NULL;
|
||||||
edns->opt_list_modules_out = NULL;
|
edns->opt_list_inplace_cb_out = NULL;
|
||||||
edns->padding_block_size = 0;
|
edns->padding_block_size = 0;
|
||||||
|
|
||||||
/* take the options */
|
/* take the options */
|
||||||
|
|
|
||||||
|
|
@ -1069,7 +1069,7 @@ static int inplace_cb_reply_call_generic(
|
||||||
(void)(*(inplace_cb_reply_func_type*)cb->cb)(qinfo, qstate, rep,
|
(void)(*(inplace_cb_reply_func_type*)cb->cb)(qinfo, qstate, rep,
|
||||||
rcode, edns, &opt_list_out, repinfo, region, start_time, cb->id, cb->cb_arg);
|
rcode, edns, &opt_list_out, repinfo, region, start_time, cb->id, cb->cb_arg);
|
||||||
}
|
}
|
||||||
edns->opt_list_modules_out = opt_list_out;
|
edns->opt_list_inplace_cb_out = opt_list_out;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2379,7 +2379,7 @@ probe_anchor(struct module_env* env, struct trust_anchor* tp)
|
||||||
edns.bits = EDNS_DO;
|
edns.bits = EDNS_DO;
|
||||||
edns.opt_list_in = NULL;
|
edns.opt_list_in = NULL;
|
||||||
edns.opt_list_out = NULL;
|
edns.opt_list_out = NULL;
|
||||||
edns.opt_list_modules_out = NULL;
|
edns.opt_list_inplace_cb_out = NULL;
|
||||||
edns.padding_block_size = 0;
|
edns.padding_block_size = 0;
|
||||||
if(sldns_buffer_capacity(buf) < 65535)
|
if(sldns_buffer_capacity(buf) < 65535)
|
||||||
edns.udp_size = (uint16_t)sldns_buffer_capacity(buf);
|
edns.udp_size = (uint16_t)sldns_buffer_capacity(buf);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue