Lines Matching refs:qstate

332 mesh_serve_expired_lookup(struct module_qstate* qstate,
340 time_t timenow = *qstate->env->now;
341 int must_validate = (!(qstate->query_flags&BIT_CD)
342 || qstate->env->cfg->ignore_cd) && qstate->env->need_to_validate;
345 h = query_info_hash(lookup_qinfo, qstate->query_flags);
346 e = slabhash_lookup(qstate->env->msg_cache, h, lookup_qinfo, 0);
352 msg = tomsg(qstate->env, &key->key, data, qstate->region, timenow,
353 qstate->env->cfg->serve_expired, qstate->env->scratch);
881 e->qstate->reply = reply;
887 mesh_run(mesh, e->qstate->mesh_info, event, e);
990 /* init module qstate */
1098 mesh_state_delete(struct module_qstate* qstate)
1103 if(!qstate)
1105 mstate = qstate->mesh_info;
1151 mesh_detect_cycle_found(struct module_qstate* qstate, struct mesh_state* dep_m)
1153 struct mesh_state* cyc_m = qstate->mesh_info;
1165 void mesh_detach_subs(struct module_qstate* qstate)
1167 struct mesh_area* mesh = qstate->env->mesh;
1173 lookup.s = qstate->mesh_info;
1174 RBTREE_FOR(ref, struct mesh_state_ref*, &qstate->mesh_info->sub_set) {
1189 rbtree_init(&qstate->mesh_info->sub_set, &mesh_state_ref_compare);
1192 int mesh_add_sub(struct module_qstate* qstate, struct query_info* qinfo,
1197 struct mesh_area* mesh = qstate->env->mesh;
1200 if(mesh_detect_cycle_found(qstate, *sub)) {
1209 *sub = mesh_state_create(qstate->env, qinfo, NULL, qflags, prime,
1238 int mesh_attach_sub(struct module_qstate* qstate, struct query_info* qinfo,
1241 struct mesh_area* mesh = qstate->env->mesh;
1244 if(!mesh_add_sub(qstate, qinfo, qflags, prime, valrec, newq, &sub))
1247 if(!mesh_state_attachment(qstate->mesh_info, sub))
1590 * @param qstate: module qstate.
1593 static void dns_error_reporting(struct module_qstate* qstate,
1605 sldns_rr_type qtype = qstate->qinfo.qtype;
1606 uint8_t* qname = qstate->qinfo.qname;
1607 size_t qname_len = qstate->qinfo.qname_len-1; /* skip the trailing \0 */
1612 * this is based on qstate->edns_opts_back_in that will probably have
1614 opt = edns_opt_list_find(qstate->edns_opts_back_in,
1628 reason_bogus = errinf_to_reason_bogus(qstate);
1682 qinfo.qclass = qstate->qinfo.qclass;
1687 if(mesh_add_sub(qstate, &qinfo, BIT_RD, 0, 0, &newq, &sub)) {
1688 qstate->env->mesh->num_dns_error_reports++;
2066 log_query_info(NO_VERBOSE, "pass error for qstate",
2075 log_query_info(VERB_QUERY, "pass error for qstate",
2097 log_query_info(VERB_QUERY, "pass error for qstate",
2286 /* all, including m itself allocated in qstate region */
2293 mesh_detect_cycle(struct module_qstate* qstate, struct query_info* qinfo,
2296 struct mesh_area* mesh = qstate->env->mesh;
2299 return mesh_detect_cycle_found(qstate, dep_m);
2365 apply_respip_action(struct module_qstate* qstate,
2377 alias_rrset, 0, qstate->region, az, NULL, qstate->env->views,
2378 qstate->env->respip_set))
2395 struct module_qstate* qstate = &mstate->s;
2397 struct mesh_area* mesh = qstate->env->mesh;
2407 struct query_info* lookup_qinfo = &qstate->qinfo;
2410 int must_validate = (!(qstate->query_flags&BIT_CD)
2411 || qstate->env->cfg->ignore_cd) && qstate->env->need_to_validate;
2414 if(!qstate->serve_expired_data) return;
2416 comm_timer_delete(qstate->serve_expired_data->timer);
2417 qstate->serve_expired_data->timer = NULL;
2420 if(qstate->no_cache_lookup || qstate->is_drop) {
2430 qstate->serve_expired_data->get_cached_answer));
2431 msg = (*qstate->serve_expired_data->get_cached_answer)(qstate,
2446 !partial_rep && !apply_respip_action(qstate, &qstate->qinfo,
2447 qstate->client_info, &actinfo, msg->rep, &alias_rrset, &encode_rep,
2448 qstate->env->auth_zones)) {
2451 !respip_merge_cname(partial_rep, &qstate->qinfo, msg->rep,
2452 qstate->client_info, must_validate, &encode_rep, qstate->region,
2453 qstate->env->auth_zones, qstate->env->views,
2454 qstate->env->respip_set)) {
2480 qinfo_tmp.qtype = qstate->qinfo.qtype;
2481 qinfo_tmp.qclass = qstate->qinfo.qclass;
2489 log_dns_msg("Serve expired lookup", &qstate->qinfo, msg->rep);
2523 qstate->qinfo.qtype, qstate->qinfo.qclass,
2531 qstate->env->cfg->ede_serve_expired &&
2532 qstate->env->cfg->ede &&
2554 if(actinfo.addrinfo && qstate->env->cfg->stat_extended &&
2557 qstate->env->mesh->rpz_action[RPZ_DISABLED_ACTION] += i;
2559 qstate->env->mesh->rpz_action[RPZ_CNAME_OVERRIDE_ACTION] += i;
2561 qstate->env->mesh->rpz_action[
2583 log_assert(qstate->env->mesh->num_reply_states > 0);
2584 qstate->env->mesh->num_reply_states--;
2589 qstate->env->mesh->num_detached_states++;