|
unbound 0.1
|
Per query state for the iterator module. More...
#include <iterator.h>
Data Structures | |
| union | [union].fail_addr |
| a failure printout address for last received answer More... | |
Data Fields | |
| enum iter_state | state |
| State of the iterator module. | |
| enum iter_state | final_state |
| Final state for the iterator module. | |
| int | depth |
| The depth of this query, this means the depth of recursion. | |
| struct dns_msg * | response |
| The response. | |
| struct iter_prep_list * | an_prepend_list |
| This is a list of RRsets that must be prepended to the ANSWER section of a response before being sent upstream. | |
| struct iter_prep_list * | an_prepend_last |
| Last element of the prepend list. | |
| struct iter_prep_list * | ns_prepend_list |
| This is the list of RRsets that must be prepended to the AUTHORITY section of the response before being sent upstream. | |
| struct iter_prep_list * | ns_prepend_last |
| Last element of the authority prepend list. | |
| struct query_info | qchase |
| query name used for chasing the results. | |
| uint16_t | chase_flags |
| query flags to use when chasing the answer (i.e. | |
| int | chase_to_rd |
| true if we set RD bit because of last resort recursion lame query | |
| struct delegpt * | dp |
| This is the current delegation point for an in-progress query. | |
| int | caps_fallback |
| state for 0x20 fallback when capsfail happens, 0 not a fallback | |
| size_t | caps_server |
| state for capsfail: current server number to try | |
| struct reply_info * | caps_reply |
| state for capsfail: stored query for comparisons. | |
| struct dns_msg * | caps_response |
| struct dns_msg * | deleg_msg |
| Current delegation message - returned for non-RD queries. | |
| int | num_target_queries |
| number of outstanding target sub queries | |
| int | num_current_queries |
| outstanding direct queries | |
| int | query_restart_count |
| the number of times this query has been restarted. | |
| int | referral_count |
| the number of times this query has followed a referral. | |
| int | sent_count |
| number of queries fired off | |
| int * | target_count |
| malloced-array shared with this query and its subqueries. | |
| int | dp_target_count |
| number of target lookups per delegation point. | |
| uint8_t ** | nxns_dp |
| Delegation point that triggered the NXNS fallback; shared with this query and its subqueries, count-referenced by the reference counter in target_count. | |
| int | ratelimit_ok |
| if true, already tested for ratelimiting and passed the test | |
| int | ratelimit_incremented |
| If the last query, that may be a referral, incremented the ratelimit counter. | |
| struct delegpt * | store_parent_NS |
| The query must store NS records from referrals as parentside RRs Enabled once it hits resolution problems, to throttle retries. | |
| int | query_for_pside_glue |
| The query is for parent-side glue(A or AAAA) for a nameserver. | |
| struct ub_packed_rrset_key * | pside_glue |
| the parent-side-glue element (NULL if none, its first match) | |
| uint8_t * | dsns_point |
| If nonNULL we are walking upwards from DS query to find NS. | |
| size_t | dsns_point_len |
| length of the dname in dsns_point | |
| int | dsns_count |
| number of label-strip iterations performed in DSNS_FIND_STATE | |
| int | dnssec_expected |
| expected dnssec information for this iteration step. | |
| int | dnssec_lame_query |
| We are expecting dnssec information, but we also know the server is DNSSEC lame. | |
| int | wait_priming_stub |
| This is flag that, if true, means that this event is waiting for a stub priming query. | |
| int | refetch_glue |
| This is a flag that, if true, means that this query is for (re)fetching glue from a zone. | |
| int | empty_nodata_found |
| This flag detects that a completely empty nodata was received, already so that it is accepted later. | |
| int | msg_lame_empty |
| Store if the answer was empty, but lame, before it became empty. | |
| int | msg_lame_referral |
| Store if the answer was a referral, to self, before scrub. | |
| struct outbound_list | outlist |
| list of pending queries to authoritative servers. | |
| enum minimisation_state | minimisation_state |
| QNAME minimisation state, RFC9156. | |
| enum minimisation_state | caps_minimisation_state |
| State for capsfail: QNAME minimisation state for comparisons. | |
| struct query_info | qinfo_out |
| The query info that is sent upstream. | |
| int | minimise_count |
| Count number of QNAME minimisation iterations. | |
| int | timeout_count |
| Count number of time-outs. | |
| int | auth_zone_response |
| True if the current response is from auth_zone. | |
| int | auth_zone_avoid |
| True if the auth_zones should not be consulted for the query. | |
| int | scrub_failures |
| true if there have been scrubbing failures of reply packets | |
| int | parse_failures |
| true if there have been parse failures of reply packets | |
| union | fail_addr |
| int | fail_addr_type |
| which fail_addr, 0 is nothing, 4 or 6 | |
Per query state for the iterator module.
| enum iter_state iter_qstate::state |
State of the iterator module.
This is the state that event is in or should sent to – all requests should start with the INIT_REQUEST_STATE. All responses should start with QUERY_RESP_STATE. Subsequent processing of the event will change this state.
Referenced by error_supers(), generate_sub_request(), iter_handle(), iter_new(), next_state(), prime_supers(), process_request(), process_response(), processClassResponse(), processDSNSFind(), processDSNSResponse(), processQueryTargets(), and processTargetResponse().
| enum iter_state iter_qstate::final_state |
Final state for the iterator module.
This is the state that responses should be routed to once the response is final. For externally initiated queries, this will be FINISHED_STATE, locally initiated queries will have different final states.
Referenced by final_state(), generate_sub_request(), iter_new(), and process_request().
| int iter_qstate::depth |
The depth of this query, this means the depth of recursion.
This address is needed for another query, which is an address needed for another query, etc. Original client query has depth 0.
Referenced by generate_a_aaaa_check(), generate_ns_check(), generate_sub_request(), iter_new(), processInitRequest(), processLastResort(), processQueryTargets(), and query_for_targets().
| struct dns_msg* iter_qstate::response |
| struct iter_prep_list* iter_qstate::an_prepend_list |
This is a list of RRsets that must be prepended to the ANSWER section of a response before being sent upstream.
Referenced by iter_add_prepend_answer(), iter_find_rrset_in_prepend_answer(), iter_new(), iter_prepend(), and processFinished().
| struct iter_prep_list* iter_qstate::an_prepend_last |
Last element of the prepend list.
Referenced by iter_add_prepend_answer(), and iter_new().
| struct iter_prep_list* iter_qstate::ns_prepend_list |
This is the list of RRsets that must be prepended to the AUTHORITY section of the response before being sent upstream.
Referenced by iter_add_prepend_auth(), iter_new(), iter_prepend(), and processFinished().
| struct iter_prep_list* iter_qstate::ns_prepend_last |
Last element of the authority prepend list.
Referenced by iter_add_prepend_auth(), and iter_new().
| struct query_info iter_qstate::qchase |
query name used for chasing the results.
Initially the same as the state qinfo, but after CNAMEs this will be different. The query info used to elicit the results needed.
Referenced by auth_zone_delegpt(), error_supers(), forward_request(), generate_dnskey_prefetch(), generate_ns_check(), generate_sub_request(), handle_cname_response(), is_caps_whitelisted(), iter_new(), iter_operate(), processCollectClass(), processDSNSFind(), processInitRequest(), processInitRequest2(), processInitRequest3(), processLastResort(), processPrimeResponse(), processQueryResponse(), processQueryTargets(), processTargetResponse(), query_for_targets(), rpz_callback_from_iterator_cname(), and rpz_callback_from_iterator_module().
| uint16_t iter_qstate::chase_flags |
query flags to use when chasing the answer (i.e.
RD flag)
Referenced by forward_request(), generate_sub_request(), iter_new(), process_response(), processInitRequest3(), processLastResort(), processPrimeResponse(), processQueryResponse(), and processQueryTargets().
| int iter_qstate::chase_to_rd |
true if we set RD bit because of last resort recursion lame query
Referenced by process_response(), processPrimeResponse(), processQueryResponse(), and processQueryTargets().
| struct delegpt* iter_qstate::dp |
This is the current delegation point for an in-progress query.
This object retains state as to which delegation targets need to be (sub)queried for vs which ones have already been visited.
Referenced by auth_zone_delegpt(), errinf_reply(), error_supers(), forward_request(), generate_a_aaaa_check(), generate_dnskey_prefetch(), generate_ns_check(), generate_parentside_target_query(), iter_new(), prime_root(), prime_stub(), prime_supers(), process_response(), processDSNSFind(), processDSNSResponse(), processFinished(), processInitRequest(), processInitRequest2(), processInitRequest3(), processLastResort(), processPrimeResponse(), processQueryResponse(), processQueryTargets(), processTargetResponse(), query_for_targets(), and rpz_callback_from_iterator_module().
| int iter_qstate::caps_fallback |
state for 0x20 fallback when capsfail happens, 0 not a fallback
Referenced by process_response(), and processQueryTargets().
| size_t iter_qstate::caps_server |
state for capsfail: current server number to try
Referenced by process_response(), and processQueryTargets().
| struct reply_info* iter_qstate::caps_reply |
state for capsfail: stored query for comparisons.
Can be NULL if no response had been seen prior to starting the fallback.
Referenced by process_response(), and processQueryTargets().
| struct dns_msg* iter_qstate::deleg_msg |
Current delegation message - returned for non-RD queries.
Referenced by generate_parentside_target_query(), prime_supers(), processFinished(), processInitRequest(), processInitRequest3(), processLastResort(), processQueryResponse(), and processQueryTargets().
| int iter_qstate::num_target_queries |
number of outstanding target sub queries
Referenced by check_waiting_queries(), error_supers(), generate_sub_request(), iter_new(), prime_root(), prime_stub(), processLastResort(), processQueryResponse(), processQueryTargets(), and processTargetResponse().
| int iter_qstate::num_current_queries |
outstanding direct queries
Referenced by check_waiting_queries(), generate_sub_request(), iter_clear(), iter_new(), process_response(), processClassResponse(), processCollectClass(), processQueryResponse(), and processQueryTargets().
| int iter_qstate::query_restart_count |
the number of times this query has been restarted.
Referenced by iter_new(), processInitRequest(), processLastResort(), processQueryResponse(), and processQueryTargets().
| int iter_qstate::referral_count |
the number of times this query has followed a referral.
Referenced by iter_new(), processQueryResponse(), and processQueryTargets().
| int iter_qstate::sent_count |
number of queries fired off
Referenced by iter_new(), processInitRequest(), processLastResort(), processQueryResponse(), and processQueryTargets().
| int* iter_qstate::target_count |
malloced-array shared with this query and its subqueries.
It keeps track of the defined enum target_count_variables counters.
Referenced by generate_sub_request(), iter_clear(), iter_new(), processLastResort(), processQueryTargets(), query_for_targets(), and target_count_create().
| int iter_qstate::dp_target_count |
number of target lookups per delegation point.
Reset to 0 after receiving referral answer. Not shared with subqueries.
Referenced by generate_sub_request(), iter_new(), processInitRequest(), processLastResort(), processQueryResponse(), processQueryTargets(), and query_for_targets().
| uint8_t** iter_qstate::nxns_dp |
Delegation point that triggered the NXNS fallback; shared with this query and its subqueries, count-referenced by the reference counter in target_count.
This also marks the fallback activation.
Referenced by generate_sub_request(), iter_clear(), processQueryTargets(), and target_count_create().
| int iter_qstate::ratelimit_ok |
if true, already tested for ratelimiting and passed the test
Referenced by iter_new(), processInitRequest(), and processQueryTargets().
| int iter_qstate::ratelimit_incremented |
If the last query, that may be a referral, incremented the ratelimit counter.
Referenced by processQueryResponse(), and processQueryTargets().
| struct delegpt* iter_qstate::store_parent_NS |
The query must store NS records from referrals as parentside RRs Enabled once it hits resolution problems, to throttle retries.
If enabled it is the pointer to the old delegation point with the old retry counts for bad-nameserver-addresses.
Referenced by processLastResort(), and processQueryResponse().
| int iter_qstate::query_for_pside_glue |
The query is for parent-side glue(A or AAAA) for a nameserver.
If the item is seen as glue in a referral, and pside_glue is NULL, then it is stored in pside_glue for later. If it was never seen, at the end, then a negative caching element must be created.
The (data or negative) RR cache element then throttles retries.
Referenced by generate_parentside_target_query(), processFinished(), processLastResort(), and processQueryResponse().
| struct ub_packed_rrset_key* iter_qstate::pside_glue |
the parent-side-glue element (NULL if none, its first match)
Referenced by processFinished(), processLastResort(), processQueryResponse(), and processTargetResponse().
| uint8_t* iter_qstate::dsns_point |
If nonNULL we are walking upwards from DS query to find NS.
Referenced by processDSNSFind(), processQueryResponse(), and processQueryTargets().
| size_t iter_qstate::dsns_point_len |
length of the dname in dsns_point
Referenced by processDSNSFind().
| int iter_qstate::dsns_count |
number of label-strip iterations performed in DSNS_FIND_STATE
Referenced by processDSNSFind().
| int iter_qstate::dnssec_expected |
expected dnssec information for this iteration step.
If dnssec rrsigs are expected and not given, the server is marked lame (dnssec-lame).
Referenced by generate_parentside_target_query(), iter_new(), prime_root(), prime_stub(), processInitRequest3(), processQueryResponse(), and processQueryTargets().
| int iter_qstate::dnssec_lame_query |
We are expecting dnssec information, but we also know the server is DNSSEC lame.
The response need not be marked dnssec-lame again.
Referenced by iter_new(), processQueryResponse(), and processQueryTargets().
| int iter_qstate::wait_priming_stub |
This is flag that, if true, means that this event is waiting for a stub priming query.
Referenced by iter_new(), prime_stub(), and prime_supers().
| int iter_qstate::refetch_glue |
This is a flag that, if true, means that this query is for (re)fetching glue from a zone.
Since the address should have been glue, query again to the servers that should have been returning it as glue. The delegation point must be set to the one that should not be used when creating the state. A higher one will be attempted.
Referenced by forward_request(), generate_ns_check(), generate_parentside_target_query(), generate_sub_request(), iter_new(), processInitRequest(), processInitRequest2(), processLastResort(), and processQueryTargets().
| int iter_qstate::empty_nodata_found |
This flag detects that a completely empty nodata was received, already so that it is accepted later.
Referenced by processQueryResponse().
| int iter_qstate::msg_lame_empty |
Store if the answer was empty, but lame, before it became empty.
Referenced by process_response(), processPrimeResponse(), and processQueryResponse().
| int iter_qstate::msg_lame_referral |
Store if the answer was a referral, to self, before scrub.
So the it is not some sort of answer.
Referenced by process_response(), processPrimeResponse(), and processQueryResponse().
| struct outbound_list iter_qstate::outlist |
list of pending queries to authoritative servers.
Referenced by generate_sub_request(), get_mesh_status(), iter_clear(), iter_new(), process_response(), processQueryResponse(), and processQueryTargets().
| enum minimisation_state iter_qstate::minimisation_state |
QNAME minimisation state, RFC9156.
Referenced by generate_sub_request(), iter_new(), process_response(), processInitRequest(), processLastResort(), processQueryResponse(), and processQueryTargets().
| enum minimisation_state iter_qstate::caps_minimisation_state |
State for capsfail: QNAME minimisation state for comparisons.
Referenced by process_response().
| struct query_info iter_qstate::qinfo_out |
The query info that is sent upstream.
Will be a subset of qchase when qname minimisation is enabled.
Referenced by generate_sub_request(), iter_new(), process_response(), processQueryResponse(), and processQueryTargets().
| int iter_qstate::minimise_count |
Count number of QNAME minimisation iterations.
Used to limit number of outgoing queries when QNAME minimisation is enabled.
Referenced by iter_new(), and processQueryTargets().
| int iter_qstate::timeout_count |
Count number of time-outs.
Used to prevent resolving failures when the QNAME minimisation QTYPE is blocked. Used to determine if capsforid fallback should be started.
Referenced by errinf_reply(), iter_new(), process_response(), processQueryResponse(), and processQueryTargets().
| int iter_qstate::auth_zone_response |
True if the current response is from auth_zone.
Referenced by processQueryResponse(), and processQueryTargets().
| int iter_qstate::auth_zone_avoid |
True if the auth_zones should not be consulted for the query.
Referenced by auth_zone_delegpt(), prime_stub(), processQueryResponse(), and processQueryTargets().
| int iter_qstate::scrub_failures |
true if there have been scrubbing failures of reply packets
Referenced by errinf_reply(), and process_response().
| int iter_qstate::parse_failures |
true if there have been parse failures of reply packets
Referenced by errinf_reply(), and process_response().
| int iter_qstate::fail_addr_type |
which fail_addr, 0 is nothing, 4 or 6
Referenced by errinf_reply(), fill_fail_addr(), print_fail_addr(), and processQueryResponse().