Module state, per query. More...
#include <module.h>
Data Fields | |
struct query_info | qinfo |
which query is being answered: name, type, class | |
uint16_t | query_flags |
flags uint16 from query | |
int | is_priming |
if this is a (stub or root) priming query (with hints) | |
int | is_valrec |
if this is a validation recursion query that does not get validation itself | |
struct comm_reply * | reply |
comm_reply contains server replies | |
struct dns_msg * | return_msg |
the reply message, with message for client and calling module | |
int | return_rcode |
the rcode, in case of error, instead of a reply message | |
struct sock_list * | reply_origin |
origin of the reply (can be NULL from cache, list for cnames) | |
struct sock_list * | blacklist |
IP blacklist for queries. | |
struct regional * | region |
region for this query. More... | |
struct errinf_strlist * | errinf |
failure reason information if val-log-level is high | |
int | curmod |
which module is executing | |
enum module_ext_state | ext_state [MAX_MODULE] |
module states | |
void * | minfo [MAX_MODULE] |
module specific data for query. More... | |
struct module_env * | env |
environment for this query | |
struct mesh_state * | mesh_info |
mesh related information for this query | |
time_t | prefetch_leeway |
how many seconds before expiry is this prefetched (0 if not) | |
struct serve_expired_data * | serve_expired_data |
serve expired data | |
struct edns_option * | edns_opts_front_in |
incoming edns options from the front end | |
struct edns_option * | edns_opts_back_out |
outgoing edns options to the back end | |
struct edns_option * | edns_opts_back_in |
incoming edns options from the back end | |
struct edns_option * | edns_opts_front_out |
outgoing edns options to the front end | |
int | no_cache_lookup |
whether modules should answer from the cache | |
int | no_cache_store |
whether modules should store answer in the cache | |
int | need_refetch |
whether to refetch a fresh answer on finishing this state | |
int | was_ratelimited |
whether the query (or a subquery) was ratelimited | |
time_t | qstarttime |
time when query was started. More... | |
int | is_cachedb_answer |
whether a message from cachedb will be used for the reply | |
struct respip_client_info * | client_info |
Attributes of clients that share the qstate that may affect IP-based actions. | |
struct respip_action_info * | respip_action_info |
Extended result of response-ip action processing, mainly for logging purposes. | |
int | rpz_applied |
if the query has been modified by rpz processing. | |
int | rpz_passthru |
if the query is rpz passthru, no further rpz processing for it | |
int | tcp_required |
int | is_drop |
whether the reply should be dropped | |
Module state, per query.
struct regional* module_qstate::region |
region for this query.
Cleared when query process finishes.
Referenced by auth_zone_delegpt(), dns64_adjust_a(), dns64_adjust_ptr(), dns64_inform_super(), dns64_operate(), errinf_to_str_misc(), errinf_to_str_servfail(), error_supers(), forward_request(), generate_parentside_target_query(), generate_sub_request(), iter_add_prepend_answer(), iter_add_prepend_auth(), iter_new(), libworker_send_query(), mesh_new_callback(), mesh_serve_expired_callback(), mesh_serve_expired_init(), mesh_serve_expired_lookup(), mesh_state_add_cb(), mesh_state_add_reply(), mesh_state_attachment(), mesh_state_create(), prime_root(), prime_stub(), process_ds_response(), processInitRequest3(), respip_operate(), rpz_add_soa(), val_inform_super(), val_new(), and worker_send_query().
void* module_qstate::minfo[MAX_MODULE] |
module specific data for query.
indexed by module id.
Referenced by dns64_clear(), dns64_inform_super(), dns64_operate(), error_supers(), generate_parentside_target_query(), generate_request(), generate_sub_request(), get_mesh_status(), ipset_clear(), ipset_operate(), iter_clear(), iter_inform_super(), iter_new(), iter_operate(), mesh_continue(), prime_root(), prime_supers(), processClassResponse(), processCollectClass(), processDSNSResponse(), processPrimeResponse(), processTargetResponse(), pythonmod_clear(), pythonmod_inform_super(), respip_clear(), respip_inform_super(), respip_operate(), val_clear(), val_inform_super(), val_new(), and val_operate().
time_t module_qstate::qstarttime |
time when query was started.
This is when the qstate is created. This is used so that type NS data cannot be overwritten by them expiring while the lookup is in progress, using data fetched from those servers. By comparing expiry time with qstarttime for type NS.
Referenced by storeQueryInCache().