Lines Matching defs:edns

60 #include "util/edns.h"
70 #include "edns-subnet/subnetmod.h"
71 #include "edns-subnet/edns-subnet.h"
407 struct edns_data* edns, struct comm_reply* rep, uint16_t qid,
411 int unique = unique_mesh_state(edns->opt_list_in, mesh->env);
423 edns->cookie_valid, mesh->env->cfg)) {
463 LDNS_RCODE_SERVFAIL, edns, rep, mesh->env->scratch, mesh->env->now_tv))
464 edns->opt_list_inplace_cb_out = NULL;
466 qinfo, qid, qflags, edns);
475 /* copy the edns options we got from the front */
476 if(edns->opt_list_in) {
477 s->s.edns_opts_front_in = edns_opt_copy_region(edns->opt_list_in,
482 NULL, LDNS_RCODE_SERVFAIL, edns, rep, mesh->env->scratch, mesh->env->now_tv))
483 edns->opt_list_inplace_cb_out = NULL;
485 qinfo, qid, qflags, edns);
508 if(!mesh_state_add_reply(s, edns, rep, qid, qflags, qinfo)) {
567 NULL, LDNS_RCODE_SERVFAIL, edns, rep, mesh->env->scratch, mesh->env->now_tv))
568 edns->opt_list_inplace_cb_out = NULL;
570 qinfo, qid, qflags, edns);
581 uint16_t qflags, struct edns_data* edns, sldns_buffer* buf,
585 int unique = unique_mesh_state(edns->opt_list_in, mesh->env);
612 if(edns->opt_list_in) {
613 s->s.edns_opts_front_in = edns_opt_copy_region(edns->opt_list_in,
636 if(!mesh_state_add_cb(s, edns, buf, cb, cb_arg, qid, qflags)) {
942 /* init edns option lists */
1239 rep, rcode, &r->edns, NULL, m->s.region, start_time))
1240 r->edns.opt_list_inplace_cb_out = NULL;
1243 &r->edns, NULL, m->s.region, start_time))
1244 r->edns.opt_list_inplace_cb_out = NULL;
1250 size_t udp_size = r->edns.udp_size;
1252 r->edns.edns_version = EDNS_ADVERTISED_VERSION;
1253 r->edns.udp_size = EDNS_ADVERTISED_SIZE;
1254 r->edns.ext_rcode = 0;
1255 r->edns.bits &= EDNS_DO;
1256 if(m->s.env->cfg->disable_edns_do && (r->edns.bits&EDNS_DO))
1257 r->edns.edns_present = 0;
1260 LDNS_RCODE_NOERROR, &r->edns, NULL, m->s.region, start_time) ||
1263 m->s.env->scratch, udp_size, &r->edns,
1264 (int)(r->edns.bits & EDNS_DO), secure))
1319 edns_opt_list_append_ede(&r->edns.opt_list_out,
1388 prev->edns.edns_present == r->edns.edns_present &&
1389 prev->edns.bits == r->edns.bits &&
1390 prev->edns.udp_size == r->edns.udp_size &&
1391 edns_opt_list_compare(prev->edns.opt_list_out, r->edns.opt_list_out) == 0 &&
1392 edns_opt_list_compare(prev->edns.opt_list_inplace_cb_out, r->edns.opt_list_inplace_cb_out) == 0
1408 rep, rcode, &r->edns, &r->query_reply, m->s.region, &r->start_time))
1409 r->edns.opt_list_inplace_cb_out = NULL;
1412 &r->edns, &r->query_reply, m->s.region, &r->start_time))
1413 r->edns.opt_list_inplace_cb_out = NULL;
1423 r->qflags, &r->edns);
1428 size_t udp_size = r->edns.udp_size;
1429 r->edns.edns_version = EDNS_ADVERTISED_VERSION;
1430 r->edns.udp_size = EDNS_ADVERTISED_SIZE;
1431 r->edns.ext_rcode = 0;
1432 r->edns.bits &= EDNS_DO;
1433 if(m->s.env->cfg->disable_edns_do && (r->edns.bits&EDNS_DO))
1434 r->edns.edns_present = 0;
1448 LDNS_RCODE_NOERROR, &r->edns, &r->query_reply, m->s.region, &r->start_time) ||
1451 udp_size, &r->edns, (int)(r->edns.bits & EDNS_DO),
1455 rep, LDNS_RCODE_SERVFAIL, &r->edns, &r->query_reply, m->s.region, &r->start_time))
1456 r->edns.opt_list_inplace_cb_out = NULL;
1460 &m->s.qinfo, r->qid, r->qflags, &r->edns);
1685 int mesh_state_add_cb(struct mesh_state* s, struct edns_data* edns,
1697 r->edns = *edns;
1698 if(edns->opt_list_in && !(r->edns.opt_list_in =
1699 edns_opt_copy_region(edns->opt_list_in, s->s.region)))
1701 if(edns->opt_list_out && !(r->edns.opt_list_out =
1702 edns_opt_copy_region(edns->opt_list_out, s->s.region)))
1704 if(edns->opt_list_inplace_cb_out && !(r->edns.opt_list_inplace_cb_out =
1705 edns_opt_copy_region(edns->opt_list_inplace_cb_out, s->s.region)))
1715 int mesh_state_add_reply(struct mesh_state* s, struct edns_data* edns,
1724 r->edns = *edns;
1725 if(edns->opt_list_in && !(r->edns.opt_list_in =
1726 edns_opt_copy_region(edns->opt_list_in, s->s.region)))
1728 if(edns->opt_list_out && !(r->edns.opt_list_out =
1729 edns_opt_copy_region(edns->opt_list_out, s->s.region)))
1731 if(edns->opt_list_inplace_cb_out && !(r->edns.opt_list_inplace_cb_out =
1732 edns_opt_copy_region(edns->opt_list_inplace_cb_out, s->s.region)))
2291 if(r->edns.edns_present &&
2295 edns_opt_list_append_ede(&r->edns.opt_list_out,