unbound  0.1
cachedb.c File Reference
#include "config.h"

Detailed Description

This file contains a module that uses an external database to cache dns responses.

order_lock::dfs_next
struct lock_ref * dfs_next
during depthfirstsearch, this is a linked list of the stack of locks.
Definition: lock_verify.c:82
daemon::respip_set
struct respip_set * respip_set
response-ip set with associated actions and tags.
Definition: daemon.h:132
config_file::udp_upstream_without_downstream
int udp_upstream_without_downstream
udp upstream enabled when no UDP downstream is enabled (do_udp no)
Definition: config_file.h:99
EDNS_RCODE_BADVERS
#define EDNS_RCODE_BADVERS
error codes, extended with EDNS, so > 15.
Definition: msgparse.h:206
tcl_addr::lock
lock_quick_type lock
lock on structure data
Definition: tcp_conn_limit.h:71
auth_zones_lookup
int auth_zones_lookup(struct auth_zones *az, struct query_info *qinfo, struct regional *region, struct dns_msg **msg, int *fallback, uint8_t *dp_nm, size_t dp_nmlen)
Use auth zones to lookup the answer to a query.
Definition: authzone.c:3240
module_env::cfg
struct config_file * cfg
config file with config options
Definition: module.h:327
netevent.h
ta_key::data
uint8_t * data
rdata, in wireformat of the key RR.
Definition: val_anchor.h:83
comm_point::callback
comm_point_callback_type * callback
callback when done.
Definition: netevent.h:313
tube_remove_bg_listen
void tube_remove_bg_listen(struct tube *tube)
Remove bg listen setup from event base.
Definition: tube.c:116
fptr_whitelist_mod_init
int fptr_whitelist_mod_init(int(*fptr)(struct module_env *env, int id))
Check function pointer whitelist for module init call values.
Definition: fptr_wlist.c:389
sldns_str2wire_apl_buf
int sldns_str2wire_apl_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_APL from string to wireformat.
Definition: str2wire.c:1118
iter_mark_cycle_targets
void iter_mark_cycle_targets(struct module_qstate *qstate, struct delegpt *dp)
Mark targets that result in a dependency cycle as done, so they will not get selected as targets.
Definition: iter_utils.c:694
strextstate
const char * strextstate(enum module_ext_state s)
Debug utility: module external qstate to string.
Definition: module.c:45
lruhash::delkeyfunc
lruhash_delkeyfunc_type delkeyfunc
how to delete keys.
Definition: lruhash.h:155
comm_base_timept
void comm_base_timept(struct comm_base *b, time_t **tt, struct timeval **tv)
Obtain two pointers.
Definition: fake_event.c:945
chunkline_newline_removal
static void chunkline_newline_removal(sldns_buffer *buf)
remove newlines from collated line
Definition: authzone.c:4363
INET6_SIZE
#define INET6_SIZE
byte size of ip6 address
Definition: net_help.h:90
neg_cache_delete
void neg_cache_delete(struct val_neg_cache *neg)
Destroy negative cache.
Definition: val_neg.c:133
fake_pending::transport
enum transport_type transport
by what transport was the query sent out
Definition: replay.h:354
sock_list_insert
void sock_list_insert(struct sock_list **list, struct sockaddr_storage *addr, socklen_t len, struct regional *region)
Insert new socket list item.
Definition: net_help.c:782
lruhash_status
void lruhash_status(struct lruhash *table, const char *id, int extended)
Output debug info to the log as to state of the hash table.
Definition: lruhash.c:459
anchors_lookup
struct trust_anchor * anchors_lookup(struct val_anchors *anchors, uint8_t *qname, size_t qname_len, uint16_t qclass)
Given a qname/qclass combination, find the trust anchor closest above it.
Definition: val_anchor.c:1162
replay_range::start_step
int start_step
time range when this is valid.
Definition: replay.h:248
infra_data::timeout_other
uint8_t timeout_other
timeouts counter for others
Definition: infra.h:106
auth_probe::scan_specific
struct auth_master * scan_specific
once notified, or the timeout has been reached.
Definition: authzone.h:331
ipset.h
ipset.h
ub_event_free
void ub_event_free(struct ub_event *)
free the event
Definition: ub_event.c:380
comm_point::http_in_chunk_headers
int http_in_chunk_headers
Currently reading in chunk headers, 0=not, 1=firstline, 2=unused (more lines), 3=trailer headers afte...
Definition: netevent.h:212
outside_network::tls_use_sni
int tls_use_sni
if SNI will be used for TLS connections
Definition: outside_network.h:136
mesh_state_add_cb
int mesh_state_add_cb(struct mesh_state *s, struct edns_data *edns, sldns_buffer *buf, mesh_cb_func_type cb, void *cb_arg, uint16_t qid, uint16_t qflags)
Create new callback structure and attach it to a mesh state.
Definition: mesh.c:1447
make_sock_port
static int make_sock_port(int stype, const char *ifname, const char *port, struct addrinfo *hints, int v6only, int *noip6, size_t rcv, size_t snd, int *reuseport, int transparent, int tcp_mss, int freebind, int use_systemd, int dscp)
make socket and first see if ifname contains port override info
Definition: listen_dnsport.c:1059
FAKE_COMMPOINT_TYPECODE
#define FAKE_COMMPOINT_TYPECODE
unique code to check that fake_commpoint is that structure
Definition: fake_event.c:71
local_data_cmp
int local_data_cmp(const void *d1, const void *d2)
Compare two local_data entries in rbtree.
Definition: localzone.c:121
addr_is_any
int addr_is_any(struct sockaddr_storage *addr, socklen_t addrlen)
See if sockaddr is 0.0.0.0 or ::0.
Definition: net_help.c:767
addrtree_insert
void addrtree_insert(struct addrtree *tree, const addrkey_t *addr, addrlen_t sourcemask, addrlen_t scope, void *elem, time_t ttl, time_t now)
Insert an element in the tree.
Definition: addrtree.c:359
set_auth_name_on_ssl
int set_auth_name_on_ssl(void *ssl, char *auth_name, int use_sni)
set auth name on SSL for verification
Definition: net_help.c:1263
val_neg_zone::parent
struct val_neg_zone * parent
pointer to parent zone in the negative cache
Definition: val_neg.h:105
codeline_cmp
int codeline_cmp(const void *a, const void *b)
compare two codeline structs for rbtree from memstats test app
Definition: unbound-dnstap-socket.c:1580
anchor_store_str
struct trust_anchor * anchor_store_str(struct val_anchors *anchors, sldns_buffer *buffer, const char *str)
Store one string as trust anchor RR.
Definition: val_anchor.c:397
inplace_cb_edns_back_parsed_call
int inplace_cb_edns_back_parsed_call(struct module_env *env, struct module_qstate *qstate)
Call the registered functions in the inplace_cb_edns_back_parsed linked list.
Definition: msgreply.c:1116
ub_event
An "object" comprising a user defined pluggable event.
Definition: unbound-event.h:166
worker::stat_timer
struct comm_timer * stat_timer
timer for statistics
Definition: worker.h:106
tap_socket_list
list of sockets
Definition: unbound-dnstap-socket.c:133
sldns_str2wire_eui64_buf
int sldns_str2wire_eui64_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_EUI64 from string to wireformat.
Definition: str2wire.c:1992
serviced_node_del
static void serviced_node_del(rbnode_type *node, void *ATTR_UNUSED(arg))
helper serviced delete
Definition: outside_network.c:886
auth_master::list
struct auth_addr * list
if the host is a hostname, the list of resolved addrs, if any
Definition: authzone.h:451
auth_xfer_find
struct auth_xfer * auth_xfer_find(struct auth_zones *az, uint8_t *nm, size_t nmlen, uint16_t dclass)
find an xfer zone by name (exact match by name or NULL returned)
Definition: authzone.c:457
local_zone_override
Local zone override information.
Definition: localzone.h:190
rbtree_last
rbnode_type * rbtree_last(rbtree_type *rbtree)
Returns last (largest) node in the tree.
Definition: rbtree.c:558
fptr_whitelist_hash_sizefunc
int fptr_whitelist_hash_sizefunc(lruhash_sizefunc_type fptr)
Check function pointer whitelist for lruhash sizefunc callback values.
Definition: fptr_wlist.c:249
dns64_clear
void dns64_clear(struct module_qstate *qstate, int id)
dns64 cleanup query state
Definition: dns64.c:996
config_collate_func
void config_collate_func(char *line, void *arg)
function to collate the text strings into a strlist_head.
Definition: config_file.c:762
validate_any_response
static void validate_any_response(struct module_env *env, struct val_env *ve, struct query_info *qchase, struct reply_info *chase_reply, struct key_entry_key *kkey)
Given an "ANY" response – a response that contains an answer to a qtype==ANY question,...
Definition: validator.c:1125
pkt_sub
static int pkt_sub(sldns_buffer *pkt, uint8_t *comprname, uint8_t *zone)
check subdomain with decompression
Definition: iter_scrub.c:321
wsvc_remove
void wsvc_remove(FILE *out)
Remove installed service from servicecontrolmanager, registry entries.
Definition: w_inst.c:249
pythonmod_utils.h
sldns_buffer_read
INLINE void sldns_buffer_read(sldns_buffer *buffer, void *data, size_t count)
copies count bytes of data at the current position to the given data-array
Definition: sbuffer.h:613
packed_rrset_copy_alloc
struct ub_packed_rrset_key * packed_rrset_copy_alloc(struct ub_packed_rrset_key *key, struct alloc_cache *alloc, time_t now)
Allocate rrset with malloc (from region or you are holding the lock).
Definition: packed_rrset.c:365
sockaddr_cmp
int sockaddr_cmp(struct sockaddr_storage *addr1, socklen_t len1, struct sockaddr_storage *addr2, socklen_t len2)
Compare two sockaddrs.
Definition: net_help.c:596
auth_nextprobe::timer
struct comm_timer * timer
timeout callback for next_probe or expiry(if that is sooner).
Definition: authzone.h:295
algo_needs_init_list
void algo_needs_init_list(struct algo_needs *n, uint8_t *sigalg)
Initialize algo needs structure from a signalled algo list.
Definition: val_sigcrypt.c:410
addr_in_list
static int addr_in_list(struct auth_addr *list, struct sockaddr_storage *addr, socklen_t addrlen)
see if addr appears in the list
Definition: authzone.c:3438
val_neg_addreferral
void val_neg_addreferral(struct val_neg_cache *neg, struct reply_info *rep, uint8_t *zone)
Insert NSECs from this referral into the negative cache for reference.
Definition: val_neg.c:1070
UB_LIBCMD_NEWQUERY
@ UB_LIBCMD_NEWQUERY
New query, sent to bg worker.
Definition: context.h:220
comm_point_create_tcp
struct comm_point * comm_point_create_tcp(struct comm_base *base, int fd, int num, int idle_timeout, struct tcl_list *tcp_conn_limit, size_t bufsize, struct sldns_buffer *spoolbuf, comm_point_callback_type *callback, void *callback_arg)
Create a TCP listener comm point.
Definition: netevent.c:2728
outside_network_quit_prepare
void outside_network_quit_prepare(struct outside_network *outnet)
Prepare for quit.
Definition: outside_network.c:903
unbound_mem_alloc
size_t unbound_mem_alloc
global debug value to keep track of total memory mallocs
Definition: alloc.c:365
worker_sighandler
void worker_sighandler(int sig, void *arg)
Worker signal handler function.
Definition: worker.c:1625
validate_msg_signatures
static int validate_msg_signatures(struct module_qstate *qstate, struct module_env *env, struct val_env *ve, struct query_info *qchase, struct reply_info *chase_reply, struct key_entry_key *key_entry)
Validate if the ANSWER and AUTHORITY sections contain valid rrsets.
Definition: validator.c:586
mesh_area::rpz_action
size_t rpz_action[UB_STATS_RPZ_ACTION_NUM]
(extended stats) type of applied RPZ action
Definition: mesh.h:132
config_file::so_reuseport
int so_reuseport
SO_REUSEPORT requested on port 53 sockets.
Definition: config_file.h:188
modstack.h
VERB_ALGO
@ VERB_ALGO
4 - algorithm level information
Definition: log.h:59
outside_network::sslctx
void * sslctx
ssl context to create ssl wrapped TCP with DNS connections
Definition: outside_network.h:134
context_finalize
int context_finalize(struct ub_ctx *ctx)
finalize a context.
Definition: context.c:56
val_neg_cache::tree
rbtree_type tree
The zone rbtree.
Definition: val_neg.h:72
anchor_cmp
int anchor_cmp(const void *k1, const void *k2)
compare two trust anchors
Definition: val_anchor.c:60
ub_packed_rrset_ttl
time_t ub_packed_rrset_ttl(struct ub_packed_rrset_key *key)
Get TTL of rrset.
Definition: packed_rrset.c:318
ub_ctx_add_ta_file
int ub_ctx_add_ta_file(struct ub_ctx *ctx, const char *fname)
Add trust anchors to the given context.
Definition: libunbound.c:409
fatal_win
static void fatal_win(FILE *out, const char *str)
exit with windows error
Definition: w_inst.c:62
nsec3_prove_nxornodata
enum sec_status nsec3_prove_nxornodata(struct module_env *env, struct val_env *ve, struct ub_packed_rrset_key **list, size_t num, struct query_info *qinfo, struct key_entry_key *kkey, int *nodata)
Prove NXDOMAIN or NODATA.
Definition: val_nsec3.c:1406
local_zone_cmp
int local_zone_cmp(const void *z1, const void *z2)
Compare two local_zone entries in rbtree.
Definition: localzone.c:105
az_find_wildcard
static struct auth_data * az_find_wildcard(struct auth_zone *z, struct query_info *qinfo, struct auth_data *ce)
find wildcard between qname and cename
Definition: authzone.c:2166
cfg_ptr_reverse
char * cfg_ptr_reverse(char *str)
Convert a ptr shorthand into a full reverse-notation PTR record.
Definition: config_file.c:2239
perfinfo::qlist_size
size_t qlist_size
size of querylist
Definition: perf.c:119
iter_dp_cangodown
int iter_dp_cangodown(struct query_info *qinfo, struct delegpt *dp)
See if delegpt can go down a step to the qname or not.
Definition: iter_utils.c:1377
perftestpkt
static void perftestpkt(sldns_buffer *pkt, struct alloc_cache *alloc, sldns_buffer *out, const char *hex)
perf test a packet
Definition: unitmsgparse.c:200
tcp_req_info_get_stream_buffer_size
size_t tcp_req_info_get_stream_buffer_size(void)
get the size of currently used tcp stream wait buffers (in bytes)
Definition: fake_event.c:1823
change_parent_ptr
static void change_parent_ptr(rbtree_type *rbtree, rbnode_type *parent, rbnode_type *old, rbnode_type *new)
Update parent pointers of child trees of 'parent'.
Definition: rbtree.c:305
order_id::instance
int instance
the instance number of creation
Definition: unbound-dnstap-socket.c:1565
comm_point::comm_raw
@ comm_raw
raw - not DNS format - for pipe readers and writers
Definition: netevent.h:237
entry::lineno
int lineno
some number that names this entry, line number in file or so
Definition: testpkts.h:217
func_init_t
int(* func_init_t)(struct module_env *, int)
Global state for the module.
Definition: dynlibmod.h:104
comm_timer_callback
void comm_timer_callback(int fd, short event, void *arg)
This routine is published for checks and tests, and is only used internally.
slabhash_traverse
void slabhash_traverse(struct slabhash *table, int wr, void(*func)(struct lruhash_entry *, void *), void *arg)
Traverse a slabhash.
Definition: slabhash.c:226
py_mod_count
int py_mod_count
counter for python module instances incremented by pythonmod_init(...)
Definition: pythonmod.c:71
ipset_get_mem
size_t ipset_get_mem(struct module_env *env, int id)
return memory estimate for ipset module
Definition: ipset.c:363
generate_a_aaaa_check
static void generate_a_aaaa_check(struct module_qstate *qstate, struct iter_qstate *iq, int id)
Generate A and AAAA checks for glue that is in-zone for the referral we just got to obtain authoritat...
Definition: iterator.c:1022
fptr_whitelist_tube_listen
int fptr_whitelist_tube_listen(tube_callback_type *fptr)
Check function pointer whitelist for tube listen handler values.
Definition: fptr_wlist.c:566
ub_server_stats::num_queries
long long num_queries
number of queries from clients received.
Definition: unbound.h:665
sldns_wire2str_edns_n3u_print
int sldns_wire2str_edns_n3u_print(char **s, size_t *sl, uint8_t *data, size_t len)
Print EDNS N3U option data to string.
Definition: wire2str.c:1847
comm_point::tcp_check_nb_connect
int tcp_check_nb_connect
if set, checks for pending error from nonblocking connect() call.
Definition: netevent.h:264
key_entry_isbad
int key_entry_isbad(struct key_entry_key *kkey)
See if this entry is bad.
Definition: val_kentry.c:234
sldns_get_rr_type_by_name
sldns_rr_type sldns_get_rr_type_by_name(const char *name)
retrieves a rrtype by looking up its name.
Definition: rrdef.c:688
insert_can_owner
static void insert_can_owner(sldns_buffer *buf, struct ub_packed_rrset_key *k, uint8_t *sig, uint8_t **can_owner, size_t *can_owner_len)
Insert canonical owner name into buffer.
Definition: val_sigcrypt.c:922
cfg_strlist_append_ex
int cfg_strlist_append_ex(struct config_strlist **head, char *item)
Searches the end of a string list and appends the given text.
Definition: config_file.c:1725
taglist_intersect
int taglist_intersect(uint8_t *list1, size_t list1len, const uint8_t *list2, size_t list2len)
see if two taglists intersect (have tags in common).
Definition: config_file.c:2015
LDNS_RDF_TYPE_TIME
@ LDNS_RDF_TYPE_TIME
time (32 bits)
Definition: rrdef.h:302
domain_has_only_nsec3
static int domain_has_only_nsec3(struct auth_data *n)
true if domain has only nsec3
Definition: authzone.c:2136
worker_send_query
struct outbound_entry * worker_send_query(struct query_info *qinfo, uint16_t flags, int dnssec, int want_dnssec, int nocaps, struct sockaddr_storage *addr, socklen_t addrlen, uint8_t *zone, size_t zonelen, int ssl_upstream, char *tls_auth_name, struct module_qstate *q)
Worker service routine to send serviced queries to authoritative servers.
Definition: worker.c:1998
wsvc_setup_worker
void wsvc_setup_worker(struct worker *worker)
Setup lead worker events.
Definition: win_svc.c:607
view_create
static struct view * view_create(char *name)
create a new view
Definition: view.c:104
tap_socket::fd
int fd
fd of socket
Definition: unbound-dnstap-socket.c:143
http_read_more
static int http_read_more(int fd, struct comm_point *c)
read more data for http
Definition: netevent.c:1905
serviced_query::serviced_query_UDP_EDNS_fallback
@ serviced_query_UDP_EDNS_fallback
probe to test noEDNS0 (EDNS gives FORMERRorNOTIMP)
Definition: outside_network.h:369
get_mesh_age
static void get_mesh_age(struct mesh_state *m, char *buf, size_t len, struct module_env *env)
get age for the mesh state
Definition: remote.c:2323
ipset_operate
void ipset_operate(struct module_qstate *qstate, enum module_ev event, int id, struct outbound_entry *outbound)
Operate on an event on a query (in qstate).
Definition: ipset.c:288
ecs_whitelist_check
int ecs_whitelist_check(struct query_info *qinfo, uint16_t flags, struct module_qstate *qstate, struct sockaddr_storage *addr, socklen_t addrlen, uint8_t *zone, size_t zonelen, struct regional *region, int id, void *cbargs)
Whitelist check, called just before query is sent upstream.
cfg_parse_memsize
int cfg_parse_memsize(const char *str, size_t *res)
Convert a 'nice' memory or file size into a bytecount From '100k' to 102400.
Definition: config_file.c:1868
dns64_get_funcblock
struct module_func_block * dns64_get_funcblock(void)
Function for returning the above function block.
Definition: dns64.c:1030
setup_ctx
static SSL_CTX * setup_ctx(char *key, char *cert)
setup SSL context
Definition: petal.c:233
sentinel_get_keytag
static int sentinel_get_keytag(char *start, uint16_t *keytag)
Get keytag as uint16_t from string.
Definition: validator.c:503
config_file::tcp_keepalive_timeout
int tcp_keepalive_timeout
tcp keepalive timeout, in msec
Definition: config_file.h:109
processDLVLookup
static int processDLVLookup(struct module_qstate *qstate, struct val_qstate *vq, struct val_env *ve, int id)
The DLVLookup state.
Definition: validator.c:2335
alloc_special_release
void alloc_special_release(struct alloc_cache *alloc, alloc_special_type *mem)
Return special_type back to pool.
Definition: alloc.c:279
respip_views_apply_cfg
int respip_views_apply_cfg(struct views *vs, struct config_file *cfg, int *have_view_respip_cfg)
Iterate through raw view data and apply the view-specific respip configuration; at this point we shou...
Definition: respip.c:417
val_nsec_proves_name_error
int val_nsec_proves_name_error(struct ub_packed_rrset_key *nsec, uint8_t *qname)
Determine if the given NSEC proves a NameError (NXDOMAIN) for a given qname.
Definition: val_nsec.c:404
ds_digest_algo_is_supported
int ds_digest_algo_is_supported(struct ub_packed_rrset_key *ds_rrset, size_t ds_idx)
See if DS digest algorithm is supported.
Definition: val_sigcrypt.c:359
context_serial_getcmd
enum ub_ctx_cmd context_serial_getcmd(uint8_t *p, uint32_t len)
Obtain command code from serialized buffer.
Definition: context.c:411
macro_expand
static char * macro_expand(rbtree_type *store, struct replay_runtime *runtime, char **text)
Expand a macro.
Definition: replay.c:792
extstrtoaddr
int extstrtoaddr(const char *str, struct sockaddr_storage *addr, socklen_t *addrlen)
Convert address string, with "@port" appendix, to sockaddr.
Definition: net_help.c:224
dname_test_valid
static void dname_test_valid(void)
Test dname_valid.
Definition: unitdname.c:753
prealloc_blocks
static void prealloc_blocks(struct alloc_cache *alloc, size_t num)
prealloc region blocks
Definition: alloc.c:86
key_cache_get_mem
size_t key_cache_get_mem(struct key_cache *kcache)
Get memory in use by the key cache.
Definition: val_kcache.c:157
macro_store_delete
void macro_store_delete(rbtree_type *store)
Delete variable storage.
Definition: replay.c:580
forwards_apply_cfg
int forwards_apply_cfg(struct iter_forwards *fwd, struct config_file *cfg)
Process forwards config.
Definition: iter_fwd.c:325
remove_spurious_authority
static void remove_spurious_authority(struct reply_info *chase_reply, struct reply_info *orig_reply)
For messages that are not referrals, if the chase reply contains an unsigned NS record in the authori...
Definition: validator.c:730
worker_cmd_stats_noreset
@ worker_cmd_stats_noreset
obtain statistics without statsclear
Definition: worker.h:73
tcp_req_info_remove_mesh_state
void tcp_req_info_remove_mesh_state(struct tcp_req_info *req, struct mesh_state *m)
Remove mesh state entry from list in tcp_req_info.
Definition: listen_dnsport.c:1656
rbnode_type::key
const void * key
pointer to sorting key
Definition: rbtree.h:63
remove_rrset
static void remove_rrset(const char *str, sldns_buffer *pkt, struct msg_parse *msg, struct rrset_parse *prev, struct rrset_parse **rrset)
remove rrset, update loop variables
Definition: iter_scrub.c:63
read_lock
static void read_lock(rbtree_type *all, FILE *in, int val)
read lock entry
Definition: lock_verify.c:226
modstack_config
int modstack_config(struct module_stack *stack, const char *module_conf)
Read config file module settings and set up the modfunc block.
Definition: modstack.c:99
msg_cache_remove
void msg_cache_remove(struct module_env *env, uint8_t *qname, size_t qnamelen, uint16_t qtype, uint16_t qclass, uint16_t flags)
delete message from message cache
Definition: dns.c:115
lruhash_setmarkdel
void lruhash_setmarkdel(struct lruhash *table, lruhash_markdelfunc_type md)
Set the markdelfunction (or NULL)
Definition: lruhash.c:516
fptr_whitelist_hash_compfunc
int fptr_whitelist_hash_compfunc(lruhash_compfunc_type fptr)
Check function pointer whitelist for lruhash compfunc callback values.
Definition: fptr_wlist.c:269
replay_runtime::cb_arg
void * cb_arg
user argument for incoming query callback
Definition: replay.h:296
auth_zone::for_upstream
int for_upstream
for upstream: this zone answers queries that unbound intends to send upstream.
Definition: authzone.h:134
auth_xfer::serial
uint32_t serial
current serial (from SOA), if we have no zone, 0
Definition: authzone.h:256
remote_get_opt_ssl
void remote_get_opt_ssl(char *line, void *arg)
routine to printout option values over SSL
Definition: remote.c:2585
cachedb_env::enabled
int enabled
true is cachedb is enabled, the backend is turned on
Definition: cachedb.h:52
iter_operate
void iter_operate(struct module_qstate *qstate, enum module_ev event, int id, struct outbound_entry *outbound)
iterator operate on a query
Definition: iterator.c:3867
testremove_unlim
static void testremove_unlim(struct lruhash *table, testdata_type **ref)
test adding a random element (unlimited range)
Definition: unitlruhash.c:326
lru_touch
void lru_touch(struct lruhash *table, struct lruhash_entry *entry)
Touch entry, so it becomes the most recently used in the LRU list.
Definition: lruhash.c:288
dt_msg_queue_create
struct dt_msg_queue * dt_msg_queue_create(void)
Create new (empty) worker message queue.
Definition: dtstream.c:102
comm_signal::base
struct comm_base * base
the communication base
Definition: netevent.h:337
sldns_buffer_current
INLINE uint8_t * sldns_buffer_current(sldns_buffer *buffer)
returns a pointer to the data at the buffer's current position.
Definition: sbuffer.h:367
az_find_nsec_cover
static struct auth_rrset * az_find_nsec_cover(struct auth_zone *z, struct auth_data **node)
find NSEC record covering the query
Definition: authzone.c:2528
val_favorite_ds_algo
int val_favorite_ds_algo(struct ub_packed_rrset_key *ds_rrset)
Return algo number for favorite (best) algorithm that we support in DS.
Definition: val_utils.c:465
read_ssl_line
static int read_ssl_line(SSL *ssl, char *buf, size_t len)
Read one line from SSL zero terminates.
Definition: unbound-anchor.c:888
find_closest_of_type
static struct ub_packed_rrset_key * find_closest_of_type(struct module_env *env, uint8_t *qname, size_t qnamelen, uint16_t qclass, time_t now, uint16_t searchtype, int stripfront)
find closest NS or DNAME and returns the rrset (locked)
Definition: dns.c:199
dtio_output_cb
void dtio_output_cb(int ATTR_UNUSED(fd), short bits, void *arg)
callback for the dnstap events, to write to the output
Definition: dtstream.c:1395
slabhash_create
struct slabhash * slabhash_create(size_t numtables, size_t start_size, size_t maxmem, lruhash_sizefunc_type sizefunc, lruhash_compfunc_type compfunc, lruhash_delkeyfunc_type delkeyfunc, lruhash_deldatafunc_type deldatafunc, void *arg)
Create new slabbed hash table.
Definition: slabhash.c:48
sldns_wire2str_ilnp64_scan
int sldns_wire2str_ilnp64_scan(uint8_t **d, size_t *dl, char **s, size_t *sl)
Scan wireformat ILNP64 field to string, with user buffers.
Definition: wire2str.c:1653
val_neg_zone::nsec3_hash
int nsec3_hash
if 0: NSEC zone, else NSEC3 hash algorithm in use
Definition: val_neg.h:113
sldns_wire2str_dname_scan
int sldns_wire2str_dname_scan(uint8_t **d, size_t *dlen, char **s, size_t *slen, uint8_t *pkt, size_t pktlen, int *comprloop)
Scan wireformat domain name to string, with user buffers.
Definition: wire2str.c:781
VERB_DETAIL
@ VERB_DETAIL
2 - detailed information
Definition: log.h:55
check_lru
static void check_lru(struct val_neg_cache *neg)
check if lru is still valid
Definition: unitneg.c:336
read_acl_view
static int read_acl_view(struct acl_list *acl, struct config_file *cfg, struct views *v)
read acl view config
Definition: acl_list.c:368
key_entry_data::rrset_type
uint16_t rrset_type
DNS RR type of the rrset data (host order)
Definition: val_kentry.h:86
tcl_list_get_mem
size_t tcl_list_get_mem(struct tcl_list *tcl)
Get memory used by TCP connection limit structure.
Definition: tcp_conn_limit.c:190
URLNAME
#define URLNAME
name of server in URL to fetch HTTPS from
Definition: unbound-anchor.c:143
ub_strerror
const char * ub_strerror(int err)
Convert error value to a human readable string.
Definition: libunbound.c:888
load_trustanchor
static struct trust_anchor * load_trustanchor(struct val_anchors *anchors, char *str, const char *fname, uint8_t *origin, size_t origin_len, uint8_t **prev, size_t *prev_len, int *skip)
Load single anchor.
Definition: autotrust.c:525
MAX_ADDR_STRLEN
#define MAX_ADDR_STRLEN
max length of an IP address (the address portion) that we allow
Definition: net_help.c:66
LOG_TAG_QUERYREPLY
int LOG_TAG_QUERYREPLY
log tag queries with name instead of 'info' for filtering
Definition: net_help.c:77
sldns_wire2str_int32_scan
int sldns_wire2str_int32_scan(uint8_t **data, size_t *data_len, char **str, size_t *str_len)
Scan wireformat int32 field to string, with user buffers.
Definition: wire2str.c:1047
sldns_tsig_errors
sldns_lookup_table * sldns_tsig_errors
tsig errors are the rcodes with extra (higher) values
Definition: wire2str.c:197
config_strlist_head
List head for strlist processing, used for append operation.
Definition: config_file.h:57
config_parser_state
Used during options parsing.
Definition: config_file.h:1201
val_neg_zone::name
uint8_t * name
name; the key
Definition: val_neg.h:98
iter_mark_pside_cycle_targets
void iter_mark_pside_cycle_targets(struct module_qstate *qstate, struct delegpt *dp)
Mark targets that result in a dependency cycle as done, so they will not get selected as targets.
Definition: iter_utils.c:716
fake_timer::next
struct fake_timer * next
next in list
Definition: replay.h:381
local_zone_enter_rr
int local_zone_enter_rr(struct local_zone *z, uint8_t *nm, size_t nmlen, int nmlabs, uint16_t rrtype, uint16_t rrclass, time_t ttl, uint8_t *rdata, size_t rdata_len, const char *rrstr)
Add RR to local zone.
Definition: localzone.c:467
msg_parse::flags
uint16_t flags
flags from message, host format.
Definition: msgparse.h:99
mesh_detect_cycle
int mesh_detect_cycle(struct module_qstate *qstate, struct query_info *qinfo, uint16_t flags, int prime, int valrec)
Find cycle; see if the given mesh is in the targets sub, or sub-sub, ...
Definition: mesh.c:1784
ssl_http_read_more
static int ssl_http_read_more(struct comm_point *c)
read more data for http (with ssl)
Definition: netevent.c:1864
val_deinit
void val_deinit(struct module_env *env, int id)
validator deinit
Definition: validator.c:193
generate_target_query
static int generate_target_query(struct module_qstate *qstate, struct iter_qstate *iq, int id, uint8_t *name, size_t namelen, uint16_t qtype, uint16_t qclass)
Given a basic query, generate a "target" query.
Definition: iterator.c:1775
tcp_req_info_handle_writedone
void tcp_req_info_handle_writedone(struct tcp_req_info *req)
Handle write done of the last result packet.
Definition: listen_dnsport.c:1783
sldns_wire2str_apl_scan
int sldns_wire2str_apl_scan(uint8_t **data, size_t *data_len, char **str, size_t *str_len)
Scan wireformat apl field to string, with user buffers.
Definition: wire2str.c:1155
dns64_operate
void dns64_operate(struct module_qstate *qstate, enum module_ev event, int id, struct outbound_entry *outbound)
This is the module's main() function.
Definition: dns64.c:670
iter_qname_indicates_dnssec
int iter_qname_indicates_dnssec(struct module_env *env, struct query_info *qinfo)
See if qname has DNSSEC needs.
Definition: iter_utils.c:778
sub_of_pkt
static int sub_of_pkt(sldns_buffer *pkt, uint8_t *zone, uint8_t *comprname)
check subdomain with decompression, compressed is parent
Definition: iter_scrub.c:330
ub_ctx_set_tls
int ub_ctx_set_tls(struct ub_ctx *ctx, int tls)
Use DNS over TLS to send queries to machines set with ub_ctx_set_fwd().
Definition: libunbound.c:977
module_func_block::name
const char * name
text string name of module
Definition: module.h:673
daemon::rand
struct ub_randstate * rand
master random table ; used for port div between threads on reload
Definition: daemon.h:107
tap_socket_list::s
struct tap_socket * s
the socket
Definition: unbound-dnstap-socket.c:137
dns64_qstate::state
enum dns64_state state
State of the DNS64 module.
Definition: dns64.c:89
entry::match_qtype
uint8_t match_qtype
match qtype with answer qtype
Definition: testpkts.h:172
reply_check_cname_chain
int reply_check_cname_chain(struct query_info *qinfo, struct reply_info *rep)
Check if cname chain in cached reply is still valid.
Definition: msgreply.c:890
daemon_remote_open_ports
struct listen_port * daemon_remote_open_ports(struct config_file *cfg)
Open and create listening ports for remote control.
Definition: remote.c:365
load_ref
static int load_ref(RES *ssl, sldns_buffer *buf, struct worker *worker, struct regional *region, struct ub_packed_rrset_key **rrset, int *go_on)
load a msg rrset reference
Definition: cachedump.c:578
rtt_info
RTT information.
Definition: rtt.h:49
delegpt_set_name
int delegpt_set_name(struct delegpt *dp, struct regional *region, uint8_t *name)
Set name of delegation point.
Definition: iter_delegpt.c:94
LOG_CRIT
#define LOG_CRIT
define LOG_ constants
Definition: log.c:52
anchors_test
void anchors_test(void)
unit test trust anchor storage functions
Definition: unitanchor.c:125
QUERY_RESP_STATE
@ QUERY_RESP_STATE
Responses to queries start at this state.
Definition: iterator.h:201
ecs_data
ECS option.
Definition: edns-subnet.h:52
autr_ta::next
struct autr_ta * next
next key
Definition: autotrust.h:69
dt_io_thread::event_added
int event_added
the event is added
Definition: dtstream.h:141
comm_point_send_udp_msg
int comm_point_send_udp_msg(struct comm_point *c, struct sldns_buffer *packet, struct sockaddr *addr, socklen_t addrlen)
Send an udp message over a commpoint.
Definition: fake_event.c:1734
comm_point_create_tcp_out
struct comm_point * comm_point_create_tcp_out(struct comm_base *base, size_t bufsize, comm_point_callback_type *callback, void *callback_arg)
Create an outgoing TCP commpoint.
Definition: netevent.c:2809
canonical_compare
static int canonical_compare(struct ub_packed_rrset_key *rrset, size_t i, size_t j)
Compare two RRs in the same RRset and determine their relative canonical order.
Definition: val_sigcrypt.c:797
nsec3_ce_wildcard
static uint8_t * nsec3_ce_wildcard(struct regional *region, uint8_t *ce, size_t celen, size_t *len)
allocate a wildcard for the closest encloser
Definition: val_nsec3.c:1002
nsec3_filter::zone
uint8_t * zone
Zone name, only NSEC3 records for this zone are considered.
Definition: val_nsec3.c:99
MAX_CNAME_CHAIN
#define MAX_CNAME_CHAIN
max number of CNAMEs we are willing to follow (in one answer)
Definition: authzone.c:76
sldns_str2wire_long_str_buf
int sldns_str2wire_long_str_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_LONG_STR from string to wireformat.
Definition: str2wire.c:2034
mesh_state_compare
int mesh_state_compare(const void *ap, const void *bp)
compare two mesh_states
Definition: mesh.c:196
sldns_lookup_by_id
sldns_lookup_table * sldns_lookup_by_id(sldns_lookup_table table[], int id)
Looks up the table entry by id, returns NULL if not found.
LDNS_RR_TYPE_DS
@ LDNS_RR_TYPE_DS
RFC4034, RFC3658.
Definition: rrdef.h:169
iter_qstate::caps_minimisation_state
enum minimisation_state caps_minimisation_state
State for capsfail: QNAME minimisation state for comparisons.
Definition: iterator.h:385
ringbuf::low
size_t low
low mark, items start here
Definition: delayer.c:68
send_em
static void send_em(const char *svr, int udp, int usessl, int noanswer, int onarrival, int delay, int num, char **qs)
send the TCP queries and print answers
Definition: streamtcp.c:329
xml_append_str
static void xml_append_str(BIO *b, const char *s)
Append str to bio.
Definition: unbound-anchor.c:1462
infra_find_ratelimit
int infra_find_ratelimit(struct infra_cache *infra, uint8_t *name, size_t namelen)
find the ratelimit in qps for a domain.
Definition: infra.c:752
mesh_add_sub
int mesh_add_sub(struct module_qstate *qstate, struct query_info *qinfo, uint16_t qflags, int prime, int valrec, struct module_qstate **newq, struct mesh_state **sub)
Add detached query.
Definition: mesh.c:1001
q_ans::answer
const char * answer
expected answer to check against, multi-line string
Definition: unitauth.c:64
dynlibmod_clear
void dynlibmod_clear(struct module_qstate *qstate, int id)
dynlib module cleanup query state
Definition: dynlibmod.c:194
listen_delete
void listen_delete(struct listen_dnsport *listen)
delete the listening structure
Definition: listen_dnsport.c:1423
delegpt::target_list
struct delegpt_addr * target_list
the target addresses for delegation
Definition: iter_delegpt.h:68
remote_stream::fd
int fd
file descriptor for plain transfer
Definition: remote.h:117
alloc_cache::num_reg_blocks
size_t num_reg_blocks
how many regional blocks are kept now
Definition: alloc.h:95
fwd_cmp
int fwd_cmp(const void *k1, const void *k2)
compare two fwd entries
Definition: iter_fwd.c:53
print_deleg_lookup
int print_deleg_lookup(RES *ssl, struct worker *worker, uint8_t *nm, size_t nmlen, int nmlabs)
Print the delegation used to lookup for this name.
infra_arg::ssl
RES * ssl
the SSL connection
Definition: remote.c:2435
perfinfo::qlist_idx
size_t qlist_idx
index into querylist, for walking the list
Definition: perf.c:127
addr_data
Definition: unitmain.c:706
internal_timer::super
struct comm_timer super
the super struct from which derived
Definition: netevent.c:132
ptr_to_ipv6
static int ptr_to_ipv6(const char *ptr, uint8_t ipv6[], size_t ipv6_len)
Converts an IPv6-related domain name string from a PTR query into an IPv6 address represented as a 12...
Definition: dns64.c:256
sldns_wire2str_pkt_buf
int sldns_wire2str_pkt_buf(uint8_t *d, size_t dlen, char *s, size_t slen)
Convert wireformat packet to a string representation with user buffer It appends every RR with defaul...
Definition: wire2str.c:247
views
Views storage, shared.
Definition: view.h:56
proxy::numreuse
size_t numreuse
how many times repurposed
Definition: delayer.c:92
pythonmod_init
int pythonmod_init(struct module_env *env, int id)
python module init
Definition: pythonmod.c:250
INIT_MINIMISE_STATE
@ INIT_MINIMISE_STATE
(Re)start minimisation.
Definition: iterator.h:152
algo_needs
Storage for algorithm needs.
Definition: val_sigcrypt.h:62
rrinternal_parse_rdata
static int rrinternal_parse_rdata(sldns_buffer *strbuf, char *token, size_t token_len, uint8_t *rr, size_t *rr_len, size_t dname_len, uint16_t rr_type, uint8_t *origin, size_t origin_len)
parse rdata from string into rr buffer(-remainder after dname).
Definition: str2wire.c:620
auth_xfer_transfer_tcp_callback
int auth_xfer_transfer_tcp_callback(struct comm_point *c, void *arg, int err, struct comm_reply *ATTR_UNUSED(repinfo))
callback for task_transfer tcp connections
Definition: authzone.c:5824
delegpt_add_rrset_AAAA
int delegpt_add_rrset_AAAA(struct delegpt *dp, struct regional *regional, struct ub_packed_rrset_key *rrset, uint8_t lame, int *additions)
Add AAAA RRset to delegpt.
Definition: iter_delegpt.c:445
sldns_wire2str_edns_dhu_print
int sldns_wire2str_edns_dhu_print(char **s, size_t *sl, uint8_t *data, size_t len)
Print EDNS DHU option data to string.
Definition: wire2str.c:1832
pending_udp_query
struct pending * pending_udp_query(struct serviced_query *sq, struct sldns_buffer *packet, int timeout, comm_point_callback_type *callback, void *callback_arg)
Send UDP query, create pending answer.
Definition: outside_network.c:1239
sldns_hashes
sldns_lookup_table * sldns_hashes
DS record hash algorithms.
Definition: wire2str.c:68
config_file::ratelimit_size
size_t ratelimit_size
memory size in bytes for ratelimit cache
Definition: config_file.h:539
burden_test
static void burden_test(size_t max)
put random stuff in a region and free it
Definition: unitregional.c:217
log_edns_known_options
void log_edns_known_options(enum verbosity_value level, struct module_env *env)
Log the known edns options.
Definition: module.c:220
ext_thr_info::argc
int argc
size of array to query
Definition: asynclook.c:180
iter_init
int iter_init(struct module_env *env, int id)
iterator init
Definition: iterator.c:78
autr_global_create
struct autr_global_data * autr_global_create(void)
Create new global 5011 data structure.
Definition: autotrust.c:74
modstack_find
int modstack_find(struct module_stack *stack, const char *name)
Find index of module by name.
Definition: modstack.c:261
config_file::log_tag_queryreply
int log_tag_queryreply
tag log_queries and log_replies for filtering
Definition: config_file.h:304
query_for_targets
static int query_for_targets(struct module_qstate *qstate, struct iter_qstate *iq, struct iter_env *ie, int id, int maxtargets, int *num)
Given an event at a certain state, generate zero or more target queries for it's current delegation p...
Definition: iterator.c:1801
iter_store_parentside_neg
void iter_store_parentside_neg(struct module_env *env, struct query_info *qinfo, struct reply_info *rep)
Store parent-side negative element, the parentside rrset does not exist, creates an rrset with empty ...
Definition: iter_utils.c:1107
daemon::time_boot
struct timeval time_boot
time when daemon started
Definition: daemon.h:123
msg_add_rrset_ns
static int msg_add_rrset_ns(struct auth_zone *z, struct regional *region, struct dns_msg *msg, struct auth_data *node, struct auth_rrset *rrset)
add rrset to authority section (no additonal section rrsets yet)
Definition: authzone.c:244
inplace_cb::id
int id
module id
Definition: module.h:234
clean_node
static void clean_node(struct addrtree *tree, struct addrnode *node)
Scrub a node clean of elem.
Definition: addrtree.c:153
check_data
static int check_data(const char *data, const struct config_strlist *head)
check wire data parse
Definition: acl_list.c:232
auth_zone_set_zonefile
int auth_zone_set_zonefile(struct auth_zone *z, char *zonefile)
set auth zone zonefile string.
Definition: authzone.c:555
val_verify_new_DNSKEYs
struct key_entry_key * val_verify_new_DNSKEYs(struct regional *region, struct module_env *env, struct val_env *ve, struct ub_packed_rrset_key *dnskey_rrset, struct ub_packed_rrset_key *ds_rrset, int downprot, char **reason, struct module_qstate *qstate)
Verify new DNSKEYs with DS rrset.
Definition: val_utils.c:559
insert_lock
static struct order_lock * insert_lock(rbtree_type *all, struct order_id *id)
insert lock entry (empty) into list
Definition: lock_verify.c:213
module_ev
module_ev
Events that happen to modules, that start or wakeup modules.
Definition: module.h:553
error_response
static int error_response(struct module_qstate *qstate, int id, int rcode)
Return an error to the client.
Definition: iterator.c:277
do_proxy
static void do_proxy(struct proxy *p, int retsock, sldns_buffer *pkt)
do proxy for one readable client
Definition: delayer.c:390
sldns_wire2str_dname_scan
int sldns_wire2str_dname_scan(uint8_t **data, size_t *data_len, char **str, size_t *str_len, uint8_t *pkt, size_t pktlen, int *comprloop)
Scan wireformat domain name to string, with user buffers.
Definition: wire2str.c:781
iter_prep_list::rrset
struct ub_packed_rrset_key * rrset
rrset
Definition: iterator.h:418
worker::base
struct comm_base * base
the event base this worker works with
Definition: worker.h:92
config_delstub
void config_delstub(struct config_stub *p)
Delete a stub item.
Definition: config_file.c:1350
rc_state::c
struct comm_point * c
the commpoint
Definition: remote.h:69
msg_parse::rrset_last
struct rrset_parse * rrset_last
last element of rrset list.
Definition: msgparse.h:135
sldns_str2wire_alg_buf
int sldns_str2wire_alg_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_ALG from string to wireformat.
Definition: str2wire.c:1386
alloc_get_mem
size_t alloc_get_mem(struct alloc_cache *alloc)
Get memory size of alloc cache, alloc structure including special types.
Definition: alloc.c:310
lruhash::deldatafunc
lruhash_deldatafunc_type deldatafunc
how to delete data.
Definition: lruhash.h:157
msg_parse::rrset_count
size_t rrset_count
total number of rrsets found.
Definition: msgparse.h:115
comm_point::ev
struct internal_event * ev
behind the scenes structure, with say libevent info.
Definition: netevent.h:157
key_entry_keysize
size_t key_entry_keysize(struct key_entry_key *kkey)
Get keysize of the keyentry.
Definition: val_kentry.c:397
dname_get_shared_topdomain
uint8_t * dname_get_shared_topdomain(uint8_t *d1, uint8_t *d2)
Get the shared topdomain between two names.
Definition: dname.c:872
check_args_for_listcmd
static void check_args_for_listcmd(int argc, char *argv[])
check args, to see if too many args.
Definition: unbound-control.c:717
dname_test_pdtl
static void dname_test_pdtl(sldns_buffer *loopbuf, sldns_buffer *boundbuf)
test pkt_dname_tolower
Definition: unitdname.c:827
ub_event_base
A user defined pluggable event base is registered by providing a ub_event_base "object" with the ub_c...
Definition: unbound-event.h:115
sldns_wire2str_class_buf
int sldns_wire2str_class_buf(uint16_t rrclass, char *str, size_t len)
Convert wire RR class to a string, 'IN', 'CLASS12'.
Definition: wire2str.c:293
ub_event_del
int ub_event_del(struct ub_event *ev)
Deactivate the event.
Definition: ub_event_pluggable.c:596
rbtree_create
rbtree_type * rbtree_create(int(*cmpf)(const void *, const void *))
Create new tree (malloced) with given key compare function.
Definition: rbtree.c:78
UB_NOID
@ UB_NOID
error async_id does not exist or result already been delivered
Definition: context.h:205
iter_qstate::chase_flags
uint16_t chase_flags
query flags to use when chasing the answer (i.e.
Definition: iterator.h:274
libworker_enter_result
void libworker_enter_result(struct ub_result *res, sldns_buffer *buf, struct regional *temp, enum sec_status msg_security)
fill result from parsed message, on error fills servfail
Definition: libworker.c:495
delegpt_add_rrset_A
int delegpt_add_rrset_A(struct delegpt *dp, struct regional *region, struct ub_packed_rrset_key *ak, uint8_t lame, int *additions)
Add A RRset to delegpt.
Definition: iter_delegpt.c:421
xfr_note_notify_serial
static void xfr_note_notify_serial(struct auth_xfer *xfr, int has_serial, uint32_t serial)
note notify serial, updates the notify information in the xfr struct
Definition: authzone.c:3519
log_thread_set
void log_thread_set(int *num)
Init a thread (will print this number for the thread log entries).
Definition: log.c:167
LDNS_RR_TYPE_TA
@ LDNS_RR_TYPE_TA
DNSSEC Trust Authorities.
Definition: rrdef.h:230
sldns_wire2str_rr_comment_print
int sldns_wire2str_rr_comment_print(char **s, size_t *slen, uint8_t *rr, size_t rrlen, size_t dname_off, uint16_t rrtype)
Print to string the RR-information comment in default format, with user buffers.
Definition: wire2str.c:650
dynlibmod_get_mem
size_t dynlibmod_get_mem(struct module_env *env, int id)
dynlib module alloc size routine
Definition: dynlibmod.c:201
validate_cname_response
static void validate_cname_response(struct module_env *env, struct val_env *ve, struct query_info *qchase, struct reply_info *chase_reply, struct key_entry_key *kkey)
Validate CNAME response, or DNAME+CNAME.
Definition: validator.c:1236
processInitRequest2
static int processInitRequest2(struct module_qstate *qstate, struct iter_qstate *iq, int id)
Process the second part of the initial request handling.
Definition: iterator.c:1609
outside_network::unwanted_replies
size_t unwanted_replies
number of unwanted replies received (for statistics)
Definition: outside_network.h:90
sec_status_to_string
const char * sec_status_to_string(enum sec_status s)
Get a printable string for a security status value.
Definition: packed_rrset.c:250
testremove
static void testremove(struct lruhash *table, testdata_type *ref[])
test adding a random element
Definition: unitlruhash.c:247
val_neg_data::next
struct val_neg_data * next
next in LRU (next element was less recently used)
Definition: val_neg.h:166
config_apply
void config_apply(struct config_file *config)
Apply config to global constants; this routine is called in single thread.
Definition: config_file.c:2029
dynlibmod_operate
void dynlibmod_operate(struct module_qstate *qstate, enum module_ev event, int id, struct outbound_entry *outbound)
dynlib module operate on a query
Definition: dynlibmod.c:178
comm_signal_bind
int comm_signal_bind(struct comm_signal *comsig, int sig)
Bind signal struct to catch a signal.
Definition: netevent.c:3398
mesh_delete_helper
static void mesh_delete_helper(rbnode_type *n)
help mesh delete delete mesh states
Definition: mesh.c:279
rtt_notimeout
int rtt_notimeout(const struct rtt_info *rtt)
RTT for valid responses.
Definition: rtt.c:119
serviced_udp_callback
int serviced_udp_callback(struct comm_point *c, void *arg, int error, struct comm_reply *rep)
callback for serviced query UDP answers
Definition: outside_network.c:1969
autr_point_delete
void autr_point_delete(struct trust_anchor *tp)
Delete autr anchor, deletes the autr data but does not do unlinking from trees, caller does that.
Definition: autotrust.c:390
slab_test_thr::id
ub_thread_type id
id
Definition: unitslabhash.c:304
fstrm_describe_control
char * fstrm_describe_control(void *pkt, size_t len)
Return string that describes a control packet.
Definition: dnstap_fstrm.c:173
tube_close_write
void tube_close_write(struct tube *tube)
Close write part of the pipe.
Definition: tube.c:108
dname_buffer_write
int dname_buffer_write(sldns_buffer *pkt, uint8_t *dname)
Copy over a valid dname to a packet.
Definition: dname.c:620
sldns_wire2str_period_scan
int sldns_wire2str_period_scan(uint8_t **d, size_t *dl, char **s, size_t *sl)
Scan wireformat period field to string, with user buffers.
Definition: wire2str.c:1057
key_cache_create
struct key_cache * key_cache_create(struct config_file *cfg)
Create the key cache.
Definition: val_kcache.c:50
outside_network::ip_dscp
int ip_dscp
IP_TOS socket option requested on the sockets.
Definition: outside_network.h:144
sldns_buffer_at
INLINE uint8_t * sldns_buffer_at(const sldns_buffer *buffer, size_t at)
returns a pointer to the data at the indicated position.
Definition: sbuffer.h:331
serviced_query::status
enum serviced_query::serviced_query_status status
variable with current status
sldns_str2wire_loc_buf
int sldns_str2wire_loc_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_LOC from string to wireformat.
Definition: str2wire.c:1524
pending::addr
struct sockaddr_storage addr
remote address.
Definition: outside_network.h:225
subnet_qstate::max_scope
uint8_t max_scope
longest received scope mask since track_max_scope is set.
Definition: subnetmod.h:92
rrset_update_id
static void rrset_update_id(struct rrset_ref *ref, struct alloc_cache *alloc)
Update RRSet special key ID.
Definition: rrset.c:170
daemon_setup_modules
static void daemon_setup_modules(struct daemon *daemon)
Setup modules.
Definition: daemon.c:372
sldns_str2wire_b64_buf
int sldns_str2wire_b64_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_B64 from string to wireformat.
Definition: str2wire.c:1205
do_lookup
static void do_lookup(RES *ssl, struct worker *worker, char *arg)
cache lookup of nameservers
Definition: remote.c:1530
mesh_area::forever_first
struct mesh_state * forever_first
double linked list of the run-to-completion query states.
Definition: mesh.h:140
ds_digest_size_algo
static size_t ds_digest_size_algo(struct ub_packed_rrset_key *k, size_t idx)
Return size of DS digest according to its hash algorithm.
Definition: val_sigcrypt.c:272
subnet_qstate::started_no_cache_store
int started_no_cache_store
has the subnet module been started with no_cache_store?
Definition: subnetmod.h:94
tcp_send_list::item
uint8_t * item
the data item
Definition: delayer.c:102
LDNS_RR_TYPE_EID
@ LDNS_RR_TYPE_EID
draft-ietf-nimrod-dns-01.txt
Definition: rrdef.h:145
sldns_wire2str_edns_llq_print
int sldns_wire2str_edns_llq_print(char **s, size_t *sl, uint8_t *data, size_t len)
Print EDNS LLQ option data to string.
Definition: wire2str.c:1738
config_file::dnstap_socket_path
char * dnstap_socket_path
dnstap socket path
Definition: config_file.h:487
auth_rrset::data
struct packed_rrset_data * data
RRset data item.
Definition: authzone.h:177
infra_arg::now
time_t now
the time now
Definition: remote.c:2437
libworker_bg_done_cb
void libworker_bg_done_cb(void *arg, int rcode, sldns_buffer *buf, enum sec_status s, char *why_bogus, int was_ratelimited)
mesh callback with bg results
Definition: libworker.c:762
LDNS_RDF_TYPE_PERIOD
@ LDNS_RDF_TYPE_PERIOD
period
Definition: rrdef.h:304
xfr_probe_end_of_list
static int xfr_probe_end_of_list(struct auth_xfer *xfr)
true if at end of list, task_probe
Definition: authzone.c:3892
ub_server_stats::qclass_big
long long qclass_big
bigger qclass values not in array
Definition: unbound.h:691
proxy::numreturn
size_t numreturn
numberof answers returned to client (in total)
Definition: delayer.c:90
hints_next_root
int hints_next_root(struct iter_hints *hints, uint16_t *qclass)
Find next root hints (to cycle through all root hints).
Definition: iter_hints.c:508
ecs_whitelist_get_mem
size_t ecs_whitelist_get_mem(struct ecs_whitelist *whitelist)
Get memory used by ecs_whitelist structure.
anchors_delete_insecure
void anchors_delete_insecure(struct val_anchors *anchors, uint16_t c, uint8_t *nm)
Delete insecure point trust anchor.
Definition: val_anchor.c:1241
usage
static void usage(void)
print usage and exit
Definition: signit.c:66
compress_tree_node
Data structure to help domain name compression in outgoing messages.
Definition: msgencode.c:77
neg_find_zone
struct val_neg_zone * neg_find_zone(struct val_neg_cache *neg, uint8_t *nm, size_t len, uint16_t dclass)
Find the given zone, from the SOA owner name and class Does not do locking.
Definition: val_neg.c:280
val_chase_cname
int val_chase_cname(struct query_info *qchase, struct reply_info *rep, size_t *cname_skip)
Chase the cname to the next query name.
Definition: val_utils.c:811
LDNS_RDF_TYPE_INT16
@ LDNS_RDF_TYPE_INT16
16 bits
Definition: rrdef.h:272
ub_ctx_add_ta_autr
int ub_ctx_add_ta_autr(struct ub_ctx *ctx, const char *fname)
Add trust anchor to the given context that is tracked with RFC5011 automated trust anchor maintenance...
Definition: libunbound.c:427
cache_fill_missing
int cache_fill_missing(struct module_env *env, uint16_t qclass, struct regional *region, struct delegpt *dp)
find and add A and AAAA records for missing nameservers in delegpt
Definition: dns.c:319
config_auth::allow_notify
struct config_strlist * allow_notify
list of allow-notify
Definition: config_file.h:664
sldns_file_parse_state::prev_rr
uint8_t prev_rr[LDNS_MAX_DOMAINLEN+1]
the previous domain name, if len!=0.
Definition: str2wire.h:224
parse_chunk_header
static int parse_chunk_header(char *buf, size_t *result)
parse chunk header
Definition: unbound-anchor.c:977
edns_register_option
int edns_register_option(uint16_t opt_code, int bypass_cache_stage, int no_aggregation, struct module_env *env)
Register a known edns option.
Definition: module.c:93
fptr_whitelist_hash_markdelfunc
int fptr_whitelist_hash_markdelfunc(lruhash_markdelfunc_type fptr)
Check function pointer whitelist for lruhash markdel callback values.
Definition: fptr_wlist.c:322
main
int main(int argc, char *argv[])
main program.
Definition: unbound.c:718
replay_scenario_read
struct replay_scenario * replay_scenario_read(FILE *in, const char *name, int *lineno)
Read a replay scenario from the file.
Definition: replay.c:439
comm_timer::cb_arg
void * cb_arg
callback user argument
Definition: netevent.h:329
local_data::name
uint8_t * name
domain name
Definition: localzone.h:167
is_caps_whitelisted
static int is_caps_whitelisted(struct iter_env *ie, struct iter_qstate *iq)
see if target name is caps-for-id whitelisted
Definition: iterator.c:619
LDNS_RR_CLASS_NONE
@ LDNS_RR_CLASS_NONE
None class, dynamic update.
Definition: rrdef.h:58
listening_ports_free
void listening_ports_free(struct listen_port *list)
Close and delete the (list of) listening ports.
Definition: listen_dnsport.c:1535
dt_io_thread_create
struct dt_io_thread * dt_io_thread_create(void)
Create IO thread.
Definition: dtstream.c:228
rate_data::qps
int qps[RATE_WINDOW]
queries counted, for that second.
Definition: infra.h:179
anchors_delete
void anchors_delete(struct val_anchors *anchors)
Delete trust anchor storage.
Definition: val_anchor.c:140
autr_rrset_delete
static void autr_rrset_delete(struct ub_packed_rrset_key *r)
delete assembled rrsets
Definition: autotrust.c:381
pending_udp_query
struct pending * pending_udp_query(struct serviced_query *sq, sldns_buffer *packet, int timeout, comm_point_callback_type *callback, void *callback_arg)
Send UDP query, create pending answer.
Definition: fake_event.c:1076
copy_rrset
static struct ub_packed_rrset_key * copy_rrset(const struct ub_packed_rrset_key *key, struct regional *region)
make a deep copy of 'key' in 'region'.
Definition: respip.c:487
track_id
keeping track of the async ids
Definition: asynclook.c:70
sldns_wire2str_ttl_scan
int sldns_wire2str_ttl_scan(uint8_t **d, size_t *dlen, char **s, size_t *slen)
Scan wireformat rr ttl to string, with user buffers.
Definition: wire2str.c:932
iter_filter_order
static int iter_filter_order(struct iter_env *iter_env, struct module_env *env, uint8_t *name, size_t namelen, uint16_t qtype, time_t now, struct delegpt *dp, int *selected_rtt, int open_target, struct sock_list *blacklist, time_t prefetch)
filter the address list, putting best targets at front, returns number of best targets (or 0,...
Definition: iter_utils.c:362
entry_to_buf
static void entry_to_buf(struct entry *e, sldns_buffer *pkt)
entry to packet buffer with wireformat
Definition: unitverify.c:69
HASHTESTMAX
#define HASHTESTMAX
number of hash test max
Definition: unitlruhash.c:231
config_file::do_tcp
int do_tcp
do tcp query support.
Definition: config_file.h:95
reply_info::rrset_count
size_t rrset_count
number of RRsets: an_numrrsets + ns_numrrsets + ar_numrrsets
Definition: msgreply.h:184
ub_event_base_vmt::free
void(* free)(struct ub_event_base *)
Destructor for the ub_event_base object, (not called by libunbound)
Definition: unbound-event.h:90
sldns_str2wire_rr_question_buf
int sldns_str2wire_rr_question_buf(const char *str, uint8_t *rr, size_t *len, size_t *dname_len, uint8_t *origin, size_t origin_len, uint8_t *prev, size_t prev_len)
Same as sldns_str2wire_rr_buf, but there is no rdata, it returns an RR with zero rdata and no ttl.
Definition: str2wire.c:790
config_stub::next
struct config_stub * next
next in list
Definition: config_file.h:634
negative_del_kcache
static void negative_del_kcache(struct lruhash_entry *e, void *arg)
callback to delete negative key entries
Definition: remote.c:1874
config_strlist_head::first
struct config_strlist * first
first in list of text items
Definition: config_file.h:59
verb
static int verb
verbosity for this application
Definition: petal.c:69
ub_ctx_zone_add
int ub_ctx_zone_add(struct ub_ctx *ctx, const char *zone_name, const char *zone_type)
Add a new zone with the zonetype to the local authority info of the library.
Definition: libunbound.c:1285
comm_point::tcp_byte_count
size_t tcp_byte_count
The current read/write count for TCP.
Definition: netevent.h:172
dtio_open_output_tcp
static int dtio_open_output_tcp(struct dt_io_thread *dtio)
open the output file descriptor for af_inet and af_inet6
Definition: dtstream.c:1894
shm_main.h
sldns_serial_arithmetics_gmtime_r
struct tm * sldns_serial_arithmetics_gmtime_r(int32_t time, time_t now, struct tm *result)
The function interprets time as the number of seconds since epoch with respect to now using serial ar...
Definition: parseutil.c:175
fptr_whitelist_stop_accept
int fptr_whitelist_stop_accept(void(*fptr)(void *))
Check function pointer whitelist for stop_accept callback values.
Definition: fptr_wlist.c:157
packed_rrset_copy_alloc
struct ub_packed_rrset_key * packed_rrset_copy_alloc(struct ub_packed_rrset_key *key, struct alloc_cache *alloc, time_t now)
Allocate rrset with malloc (from region or you are holding the lock).
Definition: packed_rrset.c:365
pythonmod_qstate
Per query state for the iterator module.
Definition: pythonmod.c:109
xfr_transfer_current_master
static struct auth_master * xfr_transfer_current_master(struct auth_xfer *xfr)
pick up the master that is being scanned right now, task_transfer
Definition: authzone.c:3866
algo_needs_init_list
void algo_needs_init_list(struct algo_needs *n, uint8_t *sigalg)
Initialize algo needs structure from a signalled algo list.
Definition: val_sigcrypt.c:410
create_local_accept_sock
int create_local_accept_sock(const char *path, int *noproto, int use_systemd)
Create and bind local listening socket.
Definition: listen_dnsport.c:927
infra_compfunc
int infra_compfunc(void *key1, void *key2)
compare two addresses, returns -1, 0, or +1
Definition: infra.c:79
portcomm_loweruse
static void portcomm_loweruse(struct outside_network *outnet, struct port_comm *pc)
lower use count on pc, see if it can be closed
Definition: outside_network.c:487
local_zone_refuse
@ local_zone_refuse
answer with error
Definition: localzone.h:71
cachedb_operate
void cachedb_operate(struct module_qstate *qstate, enum module_ev event, int id, struct outbound_entry *outbound)
Operate on an event on a query (in qstate).
respip_sockaddr_delete
void respip_sockaddr_delete(struct respip_set *set, struct resp_addr *node)
Delete resp_addr node from tree.
Definition: respip.c:127
rate_compfunc
int rate_compfunc(void *key1, void *key2)
compare two names, returns -1, 0, or +1
Definition: infra.c:121
pending_udp_timer_delay_cb
void pending_udp_timer_delay_cb(void *arg)
callback for udp delay for timeout
Definition: outside_network.c:649
pkt_rrset_flags
static uint32_t pkt_rrset_flags(sldns_buffer *pkt, uint16_t type, sldns_pkt_section sec)
Calculate rrset flags.
Definition: msgparse.c:155
rpz_finish_config
void rpz_finish_config(struct rpz *r)
Prepare RPZ after procesing feed content.
Definition: rpz.c:328
xfr_nextprobe_disown
static void xfr_nextprobe_disown(struct auth_xfer *xfr)
disown task_nextprobe.
Definition: authzone.c:6466
error_supers
static void error_supers(struct module_qstate *qstate, int id, struct module_qstate *super)
Callback routine to handle errors in parent query states.
Definition: iterator.c:225
hints_delete
void hints_delete(struct iter_hints *hints)
Delete hints.
Definition: iter_hints.c:82
val_qstate::dlv_checked
int dlv_checked
have we already checked the DLV?
Definition: validator.h:222
libworker_delete
static void libworker_delete(struct libworker *w)
delete libworker struct
Definition: libworker.c:112
dns64_init
int dns64_init(struct module_env *env, int id)
Initializes this instance of the dns64 module.
Definition: dns64.c:397
mesh_query_done
void mesh_query_done(struct mesh_state *mstate)
Query state is done, send messages to reply entries.
Definition: mesh.c:1297
tube_setup_bg_write
int tube_setup_bg_write(struct tube *tube, struct comm_base *base)
Start background write handler for the pipe.
Definition: tube.c:443
fake_timer::enabled
int enabled
if timer is enabled
Definition: replay.h:389
neg_clear_zones
static void neg_clear_zones(rbnode_type *n, void *ATTR_UNUSED(arg))
clear zones on cache deletion
Definition: val_neg.c:123
comm_base::eb
struct internal_base * eb
behind the scenes structure.
Definition: netevent.h:99
val_rrset_wildcard
int val_rrset_wildcard(struct ub_packed_rrset_key *rrset, uint8_t **wc, size_t *wc_len)
Determine by looking at a signed RRset whether or not the RRset name was the result of a wildcard exp...
Definition: val_utils.c:770
infra_create
struct infra_cache * infra_create(struct config_file *cfg)
Create infra cache.
Definition: infra.c:233
tube_setup_bg_listen
int tube_setup_bg_listen(struct tube *tube, struct comm_base *base, tube_callback_type *cb, void *arg)
Start listening for information over the pipe.
Definition: tube.c:428
test_slabhash_deldata
void test_slabhash_deldata(void *, void *)
test deldata for lruhash
TLS_initiate
static SSL * TLS_initiate(SSL_CTX *sslctx, int fd, const char *urlname, int use_sni)
initiate TLS on a connection
Definition: unbound-anchor.c:774
val_neg_cache::first
struct val_neg_data * first
the first in linked list of LRU of val_neg_data
Definition: val_neg.h:74
sldns_get_rr_type_by_name
sldns_rr_type sldns_get_rr_type_by_name(const char *name)
retrieves a rrtype by looking up its name.
Definition: rrdef.c:688
config_file::outgoing_avail_ports
int * outgoing_avail_ports
allowed udp port numbers, array with 0 if not allowed
Definition: config_file.h:141
cfg_strlist_insert
int cfg_strlist_insert(struct config_strlist **head, char *item)
Insert string into strlist.
Definition: config_file.c:1706
memcanoncmp
static int memcanoncmp(uint8_t *p1, uint8_t len1, uint8_t *p2, uint8_t len2)
Compare labels in memory, lowercase while comparing.
Definition: dname.c:786
dynlibmod_get_funcblock
struct module_func_block * dynlibmod_get_funcblock(void)
Get the module function block.
Definition: dynlibmod.c:298
parse_copy_decompress_rrset
int parse_copy_decompress_rrset(sldns_buffer *pkt, struct msg_parse *msg, struct rrset_parse *pset, struct regional *region, struct ub_packed_rrset_key *pk)
Copy a parsed rrset into given key, decompressing and allocating rdata.
Definition: msgreply.c:375
proxy
List of proxy fds that return replies from the server to our clients.
Definition: delayer.c:76
neg_delete_zone
static void neg_delete_zone(struct val_neg_cache *neg, struct val_neg_zone *z)
Delete a zone element from the negative cache.
Definition: val_neg.c:197
ctx_query::msg_len
size_t msg_len
resulting message length.
Definition: context.h:168
priv_rrset_bad
int priv_rrset_bad(struct iter_priv *priv, struct sldns_buffer *pkt, struct rrset_parse *rrset)
See if rrset is bad.
Definition: iter_priv.c:232
sldns_wire2str_unknown_scan
int sldns_wire2str_unknown_scan(uint8_t **data, size_t *data_len, char **str, size_t *str_len)
Scan wireformat type unknown field to string, with user buffers.
Definition: wire2str.c:1342
waiting_tcp::pkt
uint8_t * pkt
The query itself, the query packet to send.
Definition: outside_network.h:290
daemon_remote_delete
void daemon_remote_delete(struct daemon_remote *rc)
remote control state to delete.
Definition: remote.c:253
serviced_udp_send
static int serviced_udp_send(struct serviced_query *sq, sldns_buffer *buff)
Perform serviced query UDP sending operation.
Definition: outside_network.c:1631
addredge::node
struct addrnode * node
child node this edge is connected to
Definition: addrtree.h:114
local_zones_lookup
struct local_zone * local_zones_lookup(struct local_zones *zones, uint8_t *name, size_t len, int labs, uint16_t dclass, uint16_t dtype)
Lookup zone that contains the given name, class.
Definition: localzone.c:1087
comm_point_close
void comm_point_close(struct comm_point *c)
Close a comm point fd.
Definition: netevent.c:3070
config_strlist_head::last
struct config_strlist * last
last in list of text items
Definition: config_file.h:61
pending_tcp_query
struct waiting_tcp * pending_tcp_query(struct serviced_query *sq, sldns_buffer *packet, int timeout, comm_point_callback_type *callback, void *callback_arg)
Send TCP query.
Definition: fake_event.c:1126
module_qstate::curmod
int curmod
which module is executing
Definition: module.h:623
rate_list
static void rate_list(struct lruhash_entry *e, void *arg)
list items in the ratelimit table
Definition: remote.c:2798
mesh_state::s
struct module_qstate s
the query state.
Definition: mesh.h:174
ub_result::qtype
int qtype
the type asked for
Definition: unbound.h:127
infra_ratelimit_exceeded
int infra_ratelimit_exceeded(struct infra_cache *infra, uint8_t *name, size_t namelen, time_t timenow)
See if the query rate counter for a delegation point is exceeded.
Definition: infra.c:973
val_qstate::ds_rrset
struct ub_packed_rrset_key * ds_rrset
the DS rrset
Definition: validator.h:200
keytag_compare
static int keytag_compare(const void *x, const void *y)
compare two keytags, return -1, 0 or 1
Definition: val_anchor.c:1278
sldns_str2wire_a_buf
int sldns_str2wire_a_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_A from string to wireformat.
Definition: str2wire.c:1065
val_nsec_proves_name_error
int val_nsec_proves_name_error(struct ub_packed_rrset_key *nsec, uint8_t *qname)
Determine if the given NSEC proves a NameError (NXDOMAIN) for a given qname.
Definition: val_nsec.c:404
serviced_query::nocaps
int nocaps
ignore capsforid
Definition: outside_network.h:340
pretty_output
static void pretty_output(char *q, int t, int c, struct ub_result *result, int docname)
pretty line of output for results
Definition: unbound-host.c:288
fake_sha1
int fake_sha1
fake SHA1 support for unit tests
Definition: val_secalgo.c:60
iter_stub_fwd_no_cache
int iter_stub_fwd_no_cache(struct module_qstate *qstate, struct query_info *qinf)
Lookup if no_cache is set in stub or fwd.
Definition: iter_utils.c:1393
subnet_env::alloc
struct alloc_cache alloc
allocation service
Definition: subnetmod.h:63
dtio_sleep
static void dtio_sleep(struct dt_io_thread *dtio)
put the dtio thread to sleep
Definition: dtstream.c:1188
respip_enter_rr
int respip_enter_rr(struct regional *region, struct resp_addr *raddr, uint16_t rrtype, uint16_t rrclass, time_t ttl, uint8_t *rdata, size_t rdata_len, const char *rrstr, const char *netblockstr)
Add RR to resp_addr's RRset.
Definition: respip.c:255
ub_server_stats::ans_rcode
long long ans_rcode[UB_STATS_RCODE_NUM]
answer rcodes
Definition: unbound.h:723
replay_moment::repevt_assign
@ repevt_assign
assignment to a variable
Definition: replay.h:212
LDNS_MAX_LABELLEN
#define LDNS_MAX_LABELLEN
Maximum length of a dname label.
Definition: rrdef.h:27
lru_remove
void lru_remove(struct lruhash *table, struct lruhash_entry *entry)
Remove entry from lru list.
Definition: lruhash.c:277
generate_parentside_target_query
static int generate_parentside_target_query(struct module_qstate *qstate, struct iter_qstate *iq, int id, uint8_t *name, size_t namelen, uint16_t qtype, uint16_t qclass)
Given a basic query, generate a parent-side "target" query.
Definition: iterator.c:1723
NORMAL_UDP_SIZE
#define NORMAL_UDP_SIZE
Size of an UDP datagram.
Definition: worker.c:96
respip_always_deny
@ respip_always_deny
answer with nodata response
Definition: localzone.h:558
dns_cache_store
int dns_cache_store(struct module_env *env, struct query_info *qinf, struct reply_info *rep, int is_referral, time_t leeway, int pside, struct regional *region, uint32_t flags)
Allocate a dns_msg with malloc/alloc structure and store in dns cache.
Definition: dns.c:967
port_comm::cp
struct comm_point * cp
UDP commpoint, fd=-1 if not in use.
Definition: outside_network.h:211
timehist_print
void timehist_print(struct timehist *hist)
Printout histogram.
Definition: timehist.c:147
AUTH_PROBE_TIMEOUT_STOP
#define AUTH_PROBE_TIMEOUT_STOP
when to stop with SOA probes (when exponential timeouts exceed this)
Definition: authzone.c:80
dname_lab_cmp
int dname_lab_cmp(uint8_t *d1, int labs1, uint8_t *d2, int labs2, int *mlabs)
Compare dnames, sorted not canonical, but by label.
Definition: dname.c:486
fptr_whitelist_inplace_cb_query
int fptr_whitelist_inplace_cb_query(inplace_cb_query_func_type *fptr)
Check function pointer whitelist for inplace_cb_query func values.
Definition: fptr_wlist.c:630
fake_commpoint::type_http_out
int type_http_out
if this is a http outgoing type of commpoint.
Definition: fake_event.c:81
iter_env::supports_ipv6
int supports_ipv6
A flag to indicate whether or not we have an IPv6 route.
Definition: iterator.h:111
config_file::hide_identity
int hide_identity
do not report identity (id.server, hostname.bind)
Definition: config_file.h:313
optind
int optind
getopt global, in case header files fail to declare it.
LDNS_RR_TYPE_OPT
@ LDNS_RR_TYPE_OPT
Pseudo OPT record...
Definition: rrdef.h:165
lowercase_pkt
static void lowercase_pkt(uint8_t *pkt, size_t pktlen)
lowercase all names in the message
Definition: testpkts.c:1135
assemble_it
static struct ub_packed_rrset_key * assemble_it(struct trust_anchor *ta, size_t num, uint16_t type)
Assemble an rrset structure for the type.
Definition: val_anchor.c:856
read_fwds_name
static struct delegpt * read_fwds_name(struct config_stub *s)
set zone name
Definition: iter_fwd.c:179
dt_msg_queue_submit
void dt_msg_queue_submit(struct dt_msg_queue *mq, void *buf, size_t len)
Submit a message to the queue.
Definition: dtstream.c:168
views_create
struct views * views_create(void)
Create views storage.
Definition: view.c:57
comm_point::ssl
void * ssl
the SSL object with rw bio (owned) or for commaccept ctx ref
Definition: netevent.h:192
xfr_write_after_update
static void xfr_write_after_update(struct auth_xfer *xfr, struct module_env *env)
write to zonefile after zone has been updated
Definition: authzone.c:4900
comm_point_create_raw
struct comm_point * comm_point_create_raw(struct comm_base *base, int fd, int writing, comm_point_callback_type *callback, void *callback_arg)
Create commpoint to listen to a local domain pipe descriptor.
Definition: netevent.c:3008
O_LTG
#define O_LTG(opt, name, lst)
compare and print taglist option
Definition: config_file.c:880
ub_packed_rrset_parsedelete
void ub_packed_rrset_parsedelete(struct ub_packed_rrset_key *pkey, struct alloc_cache *alloc)
Delete packed rrset key and data, not entered in hashtables yet.
Definition: packed_rrset.c:56
ub_server_stats::rrset_bogus
long long rrset_bogus
rrsets marked bogus by validator
Definition: unbound.h:731
config_file::dnstap_log_resolver_response_messages
int dnstap_log_resolver_response_messages
true to log dnstap RESOLVER_RESPONSE message events
Definition: config_file.h:512
log_err
void log_err(const char *format,...)
implementation of log_err
Definition: log.c:315
pkt_dname_tolower
void pkt_dname_tolower(sldns_buffer *pkt, uint8_t *dname)
lowercase pkt dname (follows compression pointers)
Definition: dname.c:151
ub_ctx_config
int ub_ctx_config(struct ub_ctx *ctx, const char *fname)
setup configuration for the given context.
Definition: libunbound.c:374
order_lock::id
struct order_id id
lock id
Definition: lock_verify.c:73
LDNS_RDF_TYPE_LOC
@ LDNS_RDF_TYPE_LOC
location data
Definition: rrdef.h:317
mesh_area::jostle_first
struct mesh_state * jostle_first
double linked list of the query states that can be jostled out by new queries if too old.
Definition: mesh.h:146
ub_event_vmt::winsock_unregister_wsaevent
void(* winsock_unregister_wsaevent)(struct ub_event *ev)
Destructor for a ub_event associated with a wsaevent, (not called by libunbound)
Definition: unbound-event.h:153
sldns_buffer_read_u32_at
INLINE uint32_t sldns_buffer_read_u32_at(sldns_buffer *buffer, size_t at)
returns the 4-byte integer value at the given position in the buffer
Definition: sbuffer.h:678
lruhash_entry::hash
hashvalue_type hash
hash value of the key.
Definition: lruhash.h:218
query_info_entrysetup
struct msgreply_entry * query_info_entrysetup(struct query_info *q, struct reply_info *r, hashvalue_type h)
Setup query info entry.
Definition: msgreply.c:639
iter_prep_list::next
struct iter_prep_list * next
next in list
Definition: iterator.h:416
forwards_add_stub_hole
int forwards_add_stub_hole(struct iter_forwards *fwd, uint16_t c, uint8_t *nm)
Add stub hole (empty entry in forward table, that makes resolution skip a forward-zone because the st...
Definition: iter_fwd.c:497
val_next_unchecked
size_t val_next_unchecked(struct reply_info *rep, size_t skip)
Find next unchecked rrset position, return it for skip.
Definition: val_utils.c:1048
VERB_CLIENT
@ VERB_CLIENT
5 - querier client information
Definition: log.h:61
ub_result::rcode
int rcode
DNS RCODE for the result.
Definition: unbound.h:153
ext_thread
static void * ext_thread(void *arg)
extended thread worker
Definition: asynclook.c:298
name_tree_node::labs
int labs
labels in name
Definition: dnstree.h:65
replay_runtime::vars
rbtree_type * vars
Tree of macro values.
Definition: replay.h:322
az_domain_remove_rr
static int az_domain_remove_rr(struct auth_data *node, uint16_t rr_type, uint8_t *rdata, size_t rdatalen, int *nonexist)
Remove rr from node, ignores nonexisting RRs, rdata points to buffer with rdatalen octets,...
Definition: authzone.c:1194
errinf_rrset
void errinf_rrset(struct module_qstate *qstate, struct ub_packed_rrset_key *rr)
Append text to error info: for RRset name type class.
Definition: config_file.c:2474
context_query_cmp
int context_query_cmp(const void *a, const void *b)
compare two ctx_query elements
Definition: context.c:103
listen_stop_accept
void listen_stop_accept(struct listen_dnsport *listen)
stop accept handlers for TCP (until enabled again)
Definition: listen_dnsport.c:1571
sldns_buffer_clear
INLINE void sldns_buffer_clear(sldns_buffer *buffer)
clears the buffer and make it ready for writing.
Definition: sbuffer.h:189
do_addtime
static void do_addtime(struct module_env *env, struct autr_ta *anchor, int *c)
Event: AddTime.
Definition: autotrust.c:1728
fake_pending_callback
static void fake_pending_callback(struct replay_runtime *runtime, struct replay_moment *todo, int error)
Perform callback for fake pending message.
Definition: fake_event.c:484
packed_rrset_list::next
struct packed_rrset_list * next
next in list
Definition: packed_rrset.h:278
serviced_query::qbuflen
size_t qbuflen
length of qbuf.
Definition: outside_network.h:334
anchors_add_insecure
int anchors_add_insecure(struct val_anchors *anchors, uint16_t c, uint8_t *nm)
Add insecure point trust anchor.
Definition: val_anchor.c:1216
subnet_qstate::ecs_client_in
struct ecs_data ecs_client_in
ecs_data for client communication
Definition: subnetmod.h:80
lruhash_bin
A single bin with a linked list of entries in it.
Definition: lruhash.h:186
LDNS_RR_TYPE_CERT
@ LDNS_RR_TYPE_CERT
RFC2538.
Definition: rrdef.h:157
replay_runtime::tcp_seen_keepalive
int tcp_seen_keepalive
has TCP connection seen a keepalive?
Definition: replay.h:307
del_info::name
uint8_t * name
name to delete
Definition: remote.c:1601
autr_global_data
Autotrust global metadata.
Definition: autotrust.h:127
resp_addr::taglen
size_t taglen
length of the taglist (in bytes)
Definition: respip.h:41
val_qstate::wait_prime_ta
int wait_prime_ta
true if this state is waiting to prime a trust anchor
Definition: validator.h:219
comm_point::tcp_timeout_msec
int tcp_timeout_msec
timeout in msec for TCP wait times for this connection
Definition: netevent.h:258
sldns_str2wire_long_str_buf
int sldns_str2wire_long_str_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_LONG_STR from string to wireformat.
Definition: str2wire.c:2034
daemon::chroot
char * chroot
the chroot dir in use, NULL if none
Definition: daemon.h:80
val_find_signer
void val_find_signer(enum val_classification subtype, struct query_info *qinf, struct reply_info *rep, size_t skip, uint8_t **signer_name, size_t *signer_len)
Given a response, determine the name of the "signer".
Definition: val_utils.c:217
outnet_get_tcp_fd
int outnet_get_tcp_fd(struct sockaddr_storage *addr, socklen_t addrlen, int tcp_mss, int dscp)
get TCP file descriptor for address, returns -1 on failure, tcp_mss is 0 or maxseg size to set for TC...
Definition: outside_network.c:208
response_type_from_cache
enum response_type response_type_from_cache(struct dns_msg *msg, struct query_info *request)
Classifies a response message from cache based on the current request.
Definition: iter_resptype.c:52
log_get_lock
void * log_get_lock(void)
get log lock
Definition: log.c:208
macro_getvar
static struct replay_var * macro_getvar(rbtree_type *store, char *name)
get var from store
Definition: replay.c:647
respip_qstate
Per query state for the response-ip module.
Definition: respip.c:52
ub_stats_info::mesh_jostled
long long mesh_jostled
mesh stats: number of reply states overwritten with a new one
Definition: unbound.h:810
get_builtin_ds
static const char * get_builtin_ds(void)
return the built in root DS trust anchor
Definition: unbound-anchor.c:244
pythonmod_qstate::data
PyObject * data
Module per query data.
Definition: pythonmod.c:112
dnsc_shared_secret_cache_insert
static void dnsc_shared_secret_cache_insert(struct slabhash *cache, uint8_t key[DNSCRYPT_SHARED_SECRET_KEY_LENGTH], uint32_t hash, uint8_t nmkey[crypto_box_BEFORENMBYTES])
Inserts a shared secret into the shared_secrets_cache slabhash.
Definition: dnscrypt.c:109
sldns_wire2str_str_scan
int sldns_wire2str_str_scan(uint8_t **data, size_t *data_len, char **str, size_t *str_len)
Scan wireformat str field to string, with user buffers.
Definition: wire2str.c:1137
mesh_state_cleanup
void mesh_state_cleanup(struct mesh_state *mstate)
Cleanup a mesh state and its query state.
Definition: mesh.c:861
main
int main(int argc, char *argv[])
Main routine for unbound-control.
Definition: unbound-control.c:843
sldns_wire2str_rrquestion_buf
int sldns_wire2str_rrquestion_buf(uint8_t *rr, size_t rr_len, char *str, size_t str_len)
Convert question RR to string presentation format, on one line.
Definition: wire2str.c:259
ub_ctx_set_fwd
int ub_ctx_set_fwd(struct ub_ctx *ctx, const char *addr)
Set machine to forward DNS queries to, the caching resolver to use.
Definition: libunbound.c:907
remove_missing_trustanchors
static void remove_missing_trustanchors(struct module_env *env, struct trust_anchor *tp, int *changed)
Remove missing trustanchors so the list does not grow forever.
Definition: autotrust.c:1881
outnet_tcp_cb
int outnet_tcp_cb(struct comm_point *c, void *arg, int error, struct comm_reply *reply_info)
callback for pending tcp connections
Definition: outside_network.c:460
match
static int match(char *line)
match logfile line to see if it needs accounting processing
Definition: memstats.c:78
serviced_delete
static void serviced_delete(struct serviced_query *sq)
cleanup serviced query entry
Definition: outside_network.c:1511
fwd_cmp
int fwd_cmp(const void *k1, const void *k2)
compare two fwd entries
Definition: iter_fwd.c:53
dns_alloc_msg
struct dns_msg * dns_alloc_msg(sldns_buffer *pkt, struct msg_parse *msg, struct regional *region)
Allocate dns_msg from parsed msg, in regional.
Definition: iter_utils.c:622
do_cache_remove
static void do_cache_remove(struct worker *worker, uint8_t *nm, size_t nmlen, uint16_t t, uint16_t c)
flush something from rrset and msg caches
Definition: remote.c:1543
test_lru
static void test_lru(struct lruhash *table)
test lru_front lru_remove
Definition: unitlruhash.c:162
ub_shm_stat_info
Some global statistics that are not in struct stats_info, this struct is shared on a shm segment (shm...
Definition: unbound.h:626
server_stats_init
void server_stats_init(struct ub_server_stats *stats, struct config_file *cfg)
Initialize server stats to 0.
Definition: stats.c:87
log_file
void log_file(FILE *f)
Set logging to go to the specified file *.
Definition: log.c:160
auth_zones::rpz_first
struct auth_zone * rpz_first
first auth zone containing rpz item in linked list
Definition: authzone.h:86
ERROR_RATELIMIT
#define ERROR_RATELIMIT
ratelimit for error responses
Definition: worker.c:98
forwards_next_root
int forwards_next_root(struct iter_forwards *fwd, uint16_t *dclass)
Find next root item in forwards lookup tree.
Definition: iter_fwd.c:397
local_zone_always_refuse
@ local_zone_always_refuse
answer with error, even when there is local data
Definition: localzone.h:92
dt_io_thread::upstream_is_tcp
int upstream_is_tcp
if the log server is connected to over TCP.
Definition: dtstream.h:193
lz_enter_overrides
static int lz_enter_overrides(struct local_zones *zones, struct config_file *cfg)
parse local-zone-override: statements
Definition: localzone.c:880
tcl_list::tree
rbtree_type tree
Tree of the addresses that are TCP connection limited.
Definition: tcp_conn_limit.h:60
hints_delete_stub
void hints_delete_stub(struct iter_hints *hints, uint16_t c, uint8_t *nm)
Remove stub from hints structure.
Definition: iter_hints.c:543
vbmp
static int vbmp
verbose this unit test
Definition: unitldns.c:49
test_long_table
static void test_long_table(struct slabhash *table)
test with long sequence of adds, removes and updates, and lookups
Definition: unitslabhash.c:243
ub_poll
int ub_poll(struct ub_ctx *ctx)
Poll a context to see if it has any new results Do not poll in a loop, instead extract the fd below t...
Definition: libunbound.c:504
name_tree_find
struct name_tree_node * name_tree_find(rbtree_type *tree, uint8_t *name, size_t len, int labs, uint16_t dclass)
Lookup exact match in name tree.
Definition: dnstree.c:166
do_insecure_remove
static void do_insecure_remove(RES *ssl, struct worker *worker, char *arg)
do the insecure_remove command
Definition: remote.c:2257
delegpt_get_mem
size_t delegpt_get_mem(struct delegpt *dp)
get memory in use by dp
Definition: iter_delegpt.c:669
local_error_encode
static void local_error_encode(struct query_info *qinfo, struct module_env *env, struct edns_data *edns, struct comm_reply *repinfo, sldns_buffer *buf, struct regional *temp, int rcode, int r)
encode local error answer
Definition: localzone.c:1230
config_auth::name
char * name
domain name (in text) of the auth apex domain
Definition: config_file.h:658
waitforit
static void waitforit(PROCESS_INFORMATION *pinfo)
wait for cron process to finish
Definition: win_svc.c:525
iter_dec_attempts
void iter_dec_attempts(struct delegpt *dp, int d)
Remove query attempts from all available ips.
Definition: iter_utils.c:1284
config_auth::next
struct config_auth * next
next in list
Definition: config_file.h:656
already_validated
static int already_validated(struct dns_msg *ret_msg)
Check to see if the response has already been validated.
Definition: validator.c:351
inplace_cb_query_call
int inplace_cb_query_call(struct module_env *env, struct query_info *qinfo, uint16_t flags, struct sockaddr_storage *addr, socklen_t addrlen, uint8_t *zone, size_t zonelen, struct module_qstate *qstate, struct regional *region)
Call the registered functions in the inplace_cb_query linked list.
Definition: msgreply.c:1100
rbtree_null_node
rbnode_type rbtree_null_node
the global empty node
Definition: rbtree.c:53
chaos_replyonestr
static void chaos_replyonestr(sldns_buffer *pkt, const char *str, struct edns_data *edns, struct worker *worker, struct comm_reply *repinfo)
Reply with one string.
Definition: worker.c:854
alloc_cache::next_id
uint64_t next_id
next id number to pass out
Definition: alloc.h:84
mesh_stats_clear
void mesh_stats_clear(struct mesh_area *mesh)
Clear the stats that the mesh keeps (number of queries serviced)
Definition: mesh.c:1751
outnet_get_mem
size_t outnet_get_mem(struct outside_network *outnet)
Get memory size in use by outside network.
Definition: outside_network.c:2490
edns_option
EDNS option.
Definition: msgparse.h:233
TRIES_PER_SELECT
#define TRIES_PER_SELECT
number of reads per select for delayer
Definition: delayer.c:57
LDNS_RR_TYPE_A6
@ LDNS_RR_TYPE_A6
RFC2874.
Definition: rrdef.h:159
config_file::log_local_actions
int log_local_actions
log every local-zone hit
Definition: config_file.h:306
config_taglist2str
char * config_taglist2str(struct config_file *cfg, uint8_t *taglist, size_t len)
convert tag bitlist to a malloced string with tag names.
Definition: config_file.c:1994
ext_thr_info::id_list
struct track_id * id_list
list of ids to free once threads are done
Definition: asynclook.c:186
sldns_b32_ntop_extended_hex
int sldns_b32_ntop_extended_hex(const uint8_t *src, size_t src_sz, char *dst, size_t dst_sz)
This function we get from ldns-compat or from base system it returns the number of data bytes stored ...
Definition: parseutil.c:448
remote.h
delegpt_addr
Address of target nameserver in delegation point.
Definition: iter_delegpt.h:132
sldns_b32_pton_extended_hex
int sldns_b32_pton_extended_hex(char const *src, size_t hashed_owner_str_len, uint8_t *target, size_t targsize)
This function we get from ldns-compat or from base system it returns the number of data bytes stored ...
Definition: parseutil.c:601
del_info::addrlen
socklen_t addrlen
length of addr
Definition: remote.c:1615
outbound_list_init
void outbound_list_init(struct outbound_list *list)
Init the user allocated outbound list structure.
Definition: outbound_list.c:48
minimisation_state
minimisation_state
QNAME minimisation state.
Definition: iterator.h:147
dynlibmod_block
static struct module_func_block dynlibmod_block
The module function block.
Definition: dynlibmod.c:292
outside_network::udp_wait_first
struct pending * udp_wait_first
pending udp queries waiting to be sent out, waiting for fd
Definition: outside_network.h:121
ub_fd
int ub_fd(struct ub_ctx *ctx)
Get file descriptor.
Definition: libunbound.c:511
ub_server_stats::queries_ratelimited
long long queries_ratelimited
number of queries that have been ratelimited by domain recursion.
Definition: unbound.h:733
cache_fill_missing
int cache_fill_missing(struct module_env *env, uint16_t qclass, struct regional *region, struct delegpt *dp)
find and add A and AAAA records for missing nameservers in delegpt
Definition: dns.c:319
priv_delete
void priv_delete(struct iter_priv *priv)
Delete priv structure.
Definition: iter_priv.c:70
dt_io_thread_delete
void dt_io_thread_delete(struct dt_io_thread *dtio)
Delete the IO thread structure.
Definition: dtstream.c:234
iter_clear
void iter_clear(struct module_qstate *qstate, int id)
iterator cleanup query state
Definition: iterator.c:3913
iter_prep_list
List of prepend items.
Definition: iterator.h:414
table_grow
void table_grow(struct lruhash *table)
Grow the table lookup array.
Definition: lruhash.c:231
config_deltrplstrlist
void config_deltrplstrlist(struct config_str3list *p)
Delete items in config triple string list.
Definition: config_file.c:1309
infra_cache::domain_limits
rbtree_type domain_limits
ratelimit settings for domains, struct domain_limit_data
Definition: infra.h:120
DNS64_SUBQUERY_FINISHED
@ DNS64_SUBQUERY_FINISHED
Query for which we generated a sub-query, and for which this sub-query is finished.
Definition: dns64.c:80
ub_server_stats::nonce_cache_count
long long nonce_cache_count
number of dnscrypt nonces cache entries
Definition: unbound.h:772
iter_env::caps_white
struct rbtree_type * caps_white
whitelist for capsforid names
Definition: iterator.h:123
pending_cmp
int pending_cmp(const void *key1, const void *key2)
compare function of pending rbtree
Definition: outside_network.c:93
ub_ctx_create_event
struct ub_ctx * ub_ctx_create_event(struct event_base *base)
Create a resolving and validation context.
Definition: libunbound.c:211
LDNS_RR_TYPE_SIG
@ LDNS_RR_TYPE_SIG
2535typecode
Definition: rrdef.h:131
dynlibmod_env::func_clear
func_clear_t func_clear
Module clear function.
Definition: dynlibmod.h:128
mesh_cb::edns
struct edns_data edns
edns data from query
Definition: mesh.h:250
comm_signal_bind
int comm_signal_bind(struct comm_signal *comsig, int sig)
Bind signal struct to catch a signal.
Definition: netevent.c:3398
az_nsec_wildcard_denial
static int az_nsec_wildcard_denial(struct auth_zone *z, struct regional *region, struct dns_msg *msg, uint8_t *cenm, size_t cenmlen)
Find NSEC and add for wildcard denial.
Definition: authzone.c:2554
serviced_udp_callback
int serviced_udp_callback(struct comm_point *c, void *arg, int error, struct comm_reply *rep)
callback for serviced query UDP answers
Definition: outside_network.c:1969
ub_comm_base_now
void ub_comm_base_now(struct comm_base *cb)
Equip the comm_base with the current time.
Definition: ub_event.c:448
ce_response::ce
uint8_t * ce
the closest encloser name
Definition: val_nsec3.c:80
comm_point_perform_accept
int comm_point_perform_accept(struct comm_point *c, struct sockaddr_storage *addr, socklen_t *addrlen)
perform accept(2) with error checking.
Definition: netevent.c:789
acl_access
acl_access
Enumeration of access control options for an address range.
Definition: acl_list.h:54
delegpt_addr::bogus
uint8_t bogus
if true, the A or AAAA RR was bogus, so this address is bad.
Definition: iter_delegpt.h:150
rrset_trust_glue
@ rrset_trust_glue
Glue from a primary zone, or glue from a zone transfer.
Definition: packed_rrset.h:155
authzone_read_test
static void authzone_read_test(void)
Test authzone read from file.
Definition: unitauth.c:877
server_stats_log
void server_stats_log(struct ub_server_stats *stats, struct worker *worker, int threadnum)
display the stats to the log
Definition: stats.c:110
sldns_wire2str_pkt
char * sldns_wire2str_pkt(uint8_t *data, size_t len)
Convert wireformat packet to a string representation.
Definition: wire2str.c:199
q_is_localhost
static int q_is_localhost
if true, we are testing against 'localhost' and extra checking is done
Definition: asynclook.c:190
worker_alloc_cleanup
void worker_alloc_cleanup(void *arg)
cleanup the cache to remove all rrset IDs from it, arg is worker
Definition: worker.c:2020
worker_commands
worker_commands
worker commands
Definition: worker.h:67
key_entry_isnull
int key_entry_isnull(struct key_entry_key *kkey)
See if this is a null entry.
Definition: val_kentry.c:220
dtio_find_msg
static int dtio_find_msg(struct dt_io_thread *dtio)
find a new message to write, search message queues, false if none
Definition: dtstream.c:447
perf_tv_add
static void perf_tv_add(struct timeval *t1, struct timeval *t2)
timeval add, t1 += t2
Definition: perf.c:175
lz_enter_rr_str
static int lz_enter_rr_str(struct local_zones *zones, const char *rr)
enter a data RR into auth data; a zone for it must exist
Definition: localzone.c:555
regional_alloc_init
void * regional_alloc_init(struct regional *r, const void *init, size_t size)
Allocate size bytes of memory inside regional and copy INIT into it.
Definition: regional.c:162
pkt_rrsig_covered_equals
static int pkt_rrsig_covered_equals(sldns_buffer *pkt, uint8_t *here, uint16_t type)
true if covered type equals prevtype
Definition: msgparse.c:256
reply_info_alloc_rrset_keys
int reply_info_alloc_rrset_keys(struct reply_info *rep, struct alloc_cache *alloc, struct regional *region)
Allocate (special) rrset keys.
Definition: msgreply.c:144
extract_keys
static struct ub_packed_rrset_key * extract_keys(struct entry *e, struct alloc_cache *alloc, struct regional *region, sldns_buffer *pkt)
extract DNSKEY rrset from answer and convert it
Definition: unitverify.c:108
slabhash_testdata
test structure contains test data
Definition: slabhash.h:212
log_hex
void log_hex(const char *msg, void *data, size_t length)
Log a hex-string to the log.
Definition: log.c:401
dt_io_thread::tid
ub_thread_type tid
thread id, of the io thread
Definition: dtstream.h:128
dns64_adjust_ptr
static void dns64_adjust_ptr(struct module_qstate *qstate, struct module_qstate *super)
Generate a response for the original IPv6 PTR query based on an IPv4 PTR sub-query's response.
Definition: dns64.c:900
serviced_query::outnet
struct outside_network * outnet
outside network this is part of
Definition: outside_network.h:390
respip_set_delete
void respip_set_delete(struct respip_set *set)
Delete response IP set.
Definition: respip.c:84
reclaim_space
void reclaim_space(struct lruhash *table, struct lruhash_entry **list)
Try to make space available by deleting old entries.
Definition: lruhash.c:182
main
int main(int argc, char **argv)
main program for asynclook
Definition: asynclook.c:402
trust_anchor::name
uint8_t * name
name of this trust anchor
Definition: val_anchor.h:100
timehist_delete
void timehist_delete(struct timehist *hist)
Delete histogram.
Definition: timehist.c:102
optarg
char * optarg
getopt global, in case header files fail to declare it.
macro_process
char * macro_process(rbtree_type *store, struct replay_runtime *runtime, char *text)
Apply macro substitution to string.
Definition: replay.c:865
wsvc_rc_start
void wsvc_rc_start(FILE *out)
Start the service from servicecontrolmanager, tells OS to start daemon.
Definition: w_inst.c:275
sldns_enum_rr_type
sldns_enum_rr_type
The different RR types.
Definition: rrdef.h:83
outside_network_create
struct outside_network * outside_network_create(struct comm_base *base, size_t bufsize, size_t num_ports, char **ifs, int num_ifs, int do_ip4, int do_ip6, size_t num_tcp, int dscp, struct infra_cache *infra, struct ub_randstate *rnd, int use_caps_for_id, int *availports, int numavailports, size_t unwanted_threshold, int tcp_mss, void(*unwanted_action)(void *), void *unwanted_param, int do_udp, void *sslctx, int delayclose, int tls_use_sni, struct dt_env *dtenv)
Create outside_network structure with N udp ports.
Definition: outside_network.c:734
neg_delete_data
void neg_delete_data(struct val_neg_cache *neg, struct val_neg_data *el)
Delete a data element from the negative cache.
Definition: val_neg.c:226
infra.h
load_rr
static int load_rr(RES *ssl, sldns_buffer *buf, struct regional *region, struct ub_packed_rrset_key *rk, struct packed_rrset_data *d, unsigned int i, int is_rrsig, int *go_on, time_t now)
load an RR into rrset
Definition: cachedump.c:321
reply_info_copy
struct reply_info * reply_info_copy(struct reply_info *rep, struct alloc_cache *alloc, struct regional *region)
Copy reply_info and all rrsets in it and allocate.
Definition: msgreply.c:700
sldns_enum_cert_algorithm
sldns_enum_cert_algorithm
algorithms used in CERT rrs
Definition: rrdef.h:401
free_ignore_aaaa_node
static void free_ignore_aaaa_node(rbnode_type *node, void *ATTR_UNUSED(arg))
free ignore AAAA elements
Definition: dns64.c:416
auth_zone_delete
static void auth_zone_delete(struct auth_zone *z, struct auth_zones *az)
delete an auth zone structure (tree remove must be done elsewhere)
Definition: authzone.c:386
subnet_env
Global state for the subnet module.
Definition: subnetmod.h:55
config_collate_arg::list
struct config_strlist_head list
list of result items
Definition: config_file.c:757
codeline
The allocation statistics block.
Definition: memstats.c:52
anchors_assemble
static int anchors_assemble(struct trust_anchor *ta)
Assemble structures for the trust DS and DNSKEY rrsets.
Definition: val_anchor.c:931
LDNS_RDF_TYPE_NSEC3_NEXT_OWNER
@ LDNS_RDF_TYPE_NSEC3_NEXT_OWNER
nsec3 base32 string (with length byte on wire
Definition: rrdef.h:329
dynlibmod_env::func_operate
func_operate_t func_operate
Module operate function.
Definition: dynlibmod.h:124
module_env::outnet
struct outside_network * outnet
the outside network
Definition: module.h:473
EDNS_FRAG_SIZE_IP6
#define EDNS_FRAG_SIZE_IP6
fallback size for EDNS in IPv6, fits one fragment with ip6-tunnel-ids
Definition: outside_network.h:318
subnet_env::num_msg_cache
size_t num_msg_cache
number of messages from cache
Definition: subnetmod.h:66
pkt_find_edns_opt
static int pkt_find_edns_opt(uint8_t **p, size_t *plen)
get ptr to EDNS OPT record (and remaining length); behind the type u16
Definition: testpkts.c:822
outside_network::serviced
rbtree_type * serviced
serviced queries, sorted by qbuf, addr, dnssec
Definition: outside_network.h:128
read_stubs_name
static struct delegpt * read_stubs_name(struct config_stub *s)
set stub name
Definition: iter_hints.c:192
ub_event_base_vmt::new_event
struct ub_event *(* new_event)(struct ub_event_base *, int fd, short bits, void(*cb)(int, short, void *), void *arg)
Instantiate a new ub_event associated with this event base.
Definition: unbound-event.h:97
tcl_list
TCP connection limit storage structure.
Definition: tcp_conn_limit.h:53
fake_dsa
void int fake_dsa
debug option for unit tests.
Definition: val_secalgo.c:58
mesh_list_remove
void mesh_list_remove(struct mesh_state *m, struct mesh_state **fp, struct mesh_state **lp)
Remove mesh state from a double linked list.
Definition: mesh.c:1806
config_file::harden_large_queries
int harden_large_queries
harden against very large query sizes
Definition: config_file.h:250
worker::daemon
struct daemon * daemon
global shared daemon structure
Definition: worker.h:86
key_entry_key::name
uint8_t * name
name of the key
Definition: val_kentry.h:59
use_free_buffer
static void use_free_buffer(struct outside_network *outnet)
see if buffers can be used to service TCP queries
Definition: outside_network.c:420
lruhash_create
struct lruhash * lruhash_create(size_t start_size, size_t maxmem, lruhash_sizefunc_type sizefunc, lruhash_compfunc_type compfunc, lruhash_delkeyfunc_type delkeyfunc, lruhash_deldatafunc_type deldatafunc, void *arg)
Create new hash table.
Definition: lruhash.c:62
del_tmp_file
static void del_tmp_file(char *fname)
delete temp file and free name string
Definition: unitauth.c:507
str2wire.h
str2wire.h - read txt presentation of RRs
iter_get_funcblock
struct module_func_block * iter_get_funcblock(void)
Get the iterator function block.
Definition: iterator.c:3948
sldns_str_vprint
int sldns_str_vprint(char **str, size_t *slen, const char *format, va_list args)
Print to string, move string along for next content.
Definition: wire2str.c:317
iter_state_is_responsestate
int iter_state_is_responsestate(enum iter_state s)
See if iterator state is a response state.
Definition: iterator.c:3982
dname_pkt_copy
void dname_pkt_copy(sldns_buffer *pkt, uint8_t *to, uint8_t *dname)
Copy over a valid dname and decompress it.
Definition: dname.c:346
config_file::add_holddown
unsigned int add_holddown
autotrust add holddown time, in seconds
Definition: config_file.h:379
module_env::anchors
struct val_anchors * anchors
trusted key storage; these are the configured keys, if not NULL, otherwise configured by validator.
Definition: module.h:491
check_mod
static void check_mod(struct config_file *cfg, struct module_func_block *fb)
check if module works with config
Definition: unbound-checkconf.c:130
sec_status_insecure
@ sec_status_insecure
INSECURE means that the object is authoritatively known to be insecure.
Definition: packed_rrset.h:189
dtio_cmd_cb
void dtio_cmd_cb(int fd, short bits, void *arg)
callback for the dnstap commandpipe, to stop the dnstap IO
dns64_state
dns64_state
State of DNS64 processing for a query.
Definition: dns64.c:75
outside_network::ip4_ifs
struct port_if * ip4_ifs
array of outgoing IP4 interfaces
Definition: outside_network.h:111
lruhash_entry::overflow_next
struct lruhash_entry * overflow_next
next entry in overflow chain.
Definition: lruhash.h:212
msg_parse::ar_rrsets
size_t ar_rrsets
count of RRsets per section.
Definition: msgparse.h:113
infra_delkeyfunc
void infra_delkeyfunc(void *k, void *arg)
delete key, and destroy the lock
log_err_addr
void log_err_addr(const char *str, const char *err, struct sockaddr_storage *addr, socklen_t addrlen)
Log errno and addr.
Definition: net_help.c:575
az_nsec3_find_ce
static struct auth_data * az_nsec3_find_ce(struct auth_zone *z, uint8_t **cenm, size_t *cenmlen, int *no_exact_ce, int algo, size_t iter, uint8_t *salt, size_t saltlen)
Find the closest encloser that has exact NSEC3.
Definition: authzone.c:2767
ub_callback_type
void(* ub_callback_type)(void *, int, struct ub_result *)
Callback for results of async queries.
Definition: unbound.h:233
canonical_tree_compare
int canonical_tree_compare(const void *k1, const void *k2)
canonical compare for two tree entries
Definition: val_sigcrypt.c:879
sldns_wire2str_b64_scan
int sldns_wire2str_b64_scan(uint8_t **d, size_t *dl, char **s, size_t *sl)
Scan wireformat b64 field to string, with user buffers.
Definition: wire2str.c:1240
ssl_handle_write
static int ssl_handle_write(struct comm_point *c)
ssl write callback on TCP
Definition: netevent.c:1289
dump_cache
int dump_cache(RES *ssl, struct worker *worker)
Dump cache(s) to text.
Definition: cachedump.c:294
reply_find_rrset_section_ns
struct ub_packed_rrset_key * reply_find_rrset_section_ns(struct reply_info *rep, uint8_t *name, size_t namelen, uint16_t type, uint16_t dclass)
Find rrset in reply, inside the authority section.
Definition: msgreply.c:787
auth_zone::name
uint8_t * name
zone name, in uncompressed wireformat
Definition: authzone.h:101
LDNS_RR_TYPE_APL
@ LDNS_RR_TYPE_APL
RFC3123.
Definition: rrdef.h:167
replay_moment
A replay moment.
Definition: replay.h:180
listen_dnsport::base
struct comm_base * base
Base for select calls.
Definition: listen_dnsport.h:58
worker_handle_reply
int worker_handle_reply(struct comm_point *c, void *arg, int error, struct comm_reply *reply_info)
process incoming replies from the network
Definition: worker.c:239
config_file::if_automatic
int if_automatic
automatic interface for incoming messages.
Definition: config_file.h:182
sldns_wire2str_nsec_scan
int sldns_wire2str_nsec_scan(uint8_t **data, size_t *data_len, char **str, size_t *str_len)
Scan wireformat nsec bitmap field to string, with user buffers.
Definition: wire2str.c:1256
nsec3_filter::list
struct ub_packed_rrset_key ** list
the list of NSEC3s to filter; array
Definition: val_nsec3.c:103
rrinternal_write_typeclassttl
static int rrinternal_write_typeclassttl(sldns_buffer *strbuf, uint8_t *rr, size_t len, size_t dname_len, uint16_t tp, uint16_t cl, uint32_t ttl, int question)
put type, class, ttl into rr buffer
Definition: str2wire.c:314
config_file::log_time_ascii
int log_time_ascii
log timestamp in ascii UTC
Definition: config_file.h:298
tcp_req_info::is_drop
int is_drop
is the comm point dropped (by worker handle).
Definition: listen_dnsport.h:257
cmpbit
static int cmpbit(const addrkey_t *key1, const addrkey_t *key2, addrlen_t n)
Test for equality on N'th bit.
Definition: addrtree.c:314
winsock_unused_symbol
int winsock_unused_symbol
symbol so this codefile defines symbols.
Definition: winsock_event.c:693
outside_network::delayclose
int delayclose
if udp is delay-closed (delayed answers do not meet closed port)
Definition: outside_network.h:106
inplace_cb_query_response_call
int inplace_cb_query_response_call(struct module_env *env, struct module_qstate *qstate, struct dns_msg *response)
Call the registered functions in the inplace_cb_query_response linked list.
Definition: msgreply.c:1130
key_entry_key::namelen
size_t namelen
length of name
Definition: val_kentry.h:61
if_is_ssl
static int if_is_ssl(const char *ifname, const char *port, int ssl_port, struct config_strlist *tls_additional_port)
see if interface is ssl, its port number == the ssl port number
Definition: listen_dnsport.c:1167
sldns_wire2str_rr
char * sldns_wire2str_rr(uint8_t *rr, size_t len)
Convert wireformat RR to a string representation.
Definition: wire2str.c:208
comm_base_dispatch
void comm_base_dispatch(struct comm_base *b)
Dispatch the comm base events.
Definition: fake_event.c:953
rrset_parse::rr_count
size_t rr_count
number of RRs in the rr list
Definition: msgparse.h:163
rbnode_type::color
uint8_t color
colour of this node
Definition: rbtree.h:65
nonce_cache_key::entry
struct lruhash_entry entry
the hash table entry, data is uint8_t
Definition: dnscrypt.c:72
add_key
static struct autr_ta * add_key(struct trust_anchor *tp, uint32_t ttl, uint8_t *rdata, size_t rdata_len)
add key and clone RR and tp already locked.
Definition: autotrust.c:1429
auth_zone_write_domain
static int auth_zone_write_domain(struct auth_zone *z, struct auth_data *n, FILE *out)
write domain to file
Definition: authzone.c:1702
cfg_strlist_insert
int cfg_strlist_insert(struct config_strlist **head, char *item)
Insert string into strlist.
Definition: config_file.c:1706
pending::cb
comm_point_callback_type * cb
callback for the timeout, error or reply to the message
Definition: outside_network.h:233
edns_option::opt_data
uint8_t * opt_data
data of this edns option; allocated in region, or NULL if len=0
Definition: msgparse.h:241
val_qstate::dlv_lookup_name
uint8_t * dlv_lookup_name
The name for which the DLV is looked up.
Definition: validator.h:226
addr_tree_init_parents_node
void addr_tree_init_parents_node(struct addr_tree_node *node)
Initialize parent pointers in partial addr tree.
Definition: dnstree.c:107
addr_tree_init_parents
void addr_tree_init_parents(rbtree_type *tree)
Initialize parent pointers in addr tree.
Definition: dnstree.c:134
keysets::flags
uint16_t flags
DNSKEY flags.
Definition: signit.c:61
ub_winsock_register_wsaevent
struct ub_event * ub_winsock_register_wsaevent(struct ub_event_base *, void *wsaevent, void(*cb)(int, short, void *), void *arg)
Create a new ub_event associated with the wsaevent for the event base.
Definition: ub_event.c:338
alloc_set_id_cleanup
void alloc_set_id_cleanup(struct alloc_cache *alloc, void(*cleanup)(void *), void *arg)
Set cleanup on ID overflow callback function.
Definition: alloc.c:357
delegpt_add_rrset_A
int delegpt_add_rrset_A(struct delegpt *dp, struct regional *regional, struct ub_packed_rrset_key *rrset, uint8_t lame, int *additions)
Add A RRset to delegpt.
Definition: iter_delegpt.c:421
delegpt_add_rrset
int delegpt_add_rrset(struct delegpt *dp, struct regional *region, struct ub_packed_rrset_key *rrset, uint8_t lame, int *additions)
Add any RRset to delegpt.
Definition: iter_delegpt.c:469
port_if::addr
struct sockaddr_storage addr
address ready to allocate new socket (except port no).
Definition: outside_network.h:171
lruhash_get_mem
size_t lruhash_get_mem(struct lruhash *table)
Get memory in use now by the lruhash table.
Definition: lruhash.c:493
service_tcp_listen
static void service_tcp_listen(int s, fd_set *rorig, int *max, struct tcp_proxy **proxies, struct sockaddr_storage *srv_addr, socklen_t srv_len, struct timeval *now, struct timeval *tcp_timeout)
accept new TCP connections, and set them up
Definition: delayer.c:567
waiting_tcp::addrlen
socklen_t addrlen
length of addr field in use.
Definition: outside_network.h:283
comm_point_create_udp
struct comm_point * comm_point_create_udp(struct comm_base *base, int fd, sldns_buffer *buffer, comm_point_callback_type *callback, void *callback_arg)
Create an UDP comm point.
Definition: netevent.c:2516
local_zones_lookup
struct local_zone * local_zones_lookup(struct local_zones *zones, uint8_t *name, size_t len, int labs, uint16_t dclass, uint16_t dtype)
Lookup zone that contains the given name, class.
Definition: localzone.c:1087
provide_builtin
static int provide_builtin(const char *root_anchor_file, int *used_builtin)
Check the root anchor file.
Definition: unbound-anchor.c:2065
ds_get_digest_algo
int ds_get_digest_algo(struct ub_packed_rrset_key *k, size_t idx)
Get DS RR digest algorithm.
Definition: val_sigcrypt.c:217
comm_signal_delete
void comm_signal_delete(struct comm_signal *comsig)
Delete the signal communication point.
Definition: netevent.c:3428
sockaddr_cmp_addr
int sockaddr_cmp_addr(struct sockaddr_storage *addr1, socklen_t len1, struct sockaddr_storage *addr2, socklen_t len2)
Compare two sockaddrs.
Definition: net_help.c:638
edns_bypass_cache_stage
int edns_bypass_cache_stage(struct edns_option *list, struct module_env *env)
Check if an edns option needs to bypass the reply from cache stage.
Definition: module.c:194
neg_make_space
static void neg_make_space(struct val_neg_cache *neg, size_t need)
Create more space in negative cache The oldest elements are deleted until enough space is present.
Definition: val_neg.c:272
iter_hints.h
tap_socket_new_tcpaccept
static struct tap_socket * tap_socket_new_tcpaccept(char *ip, void(*ev_cb)(int, short, void *), void *data)
create new socket (unconnected, not base-added), or NULL malloc fail
Definition: unbound-dnstap-socket.c:214
UB_STATS_RCODE_NUM
#define UB_STATS_RCODE_NUM
number of rcodes in stats
Definition: unbound.h:654
edns_known_options_init
int edns_known_options_init(struct module_env *env)
Initialize the edns known options by allocating the required space.
Definition: module.c:75
TCP_AUTH_QUERY_TIMEOUT
#define TCP_AUTH_QUERY_TIMEOUT
timeout in milliseconds for TCP queries to auth servers.
Definition: net_help.h:80
comm_signal_create
struct comm_signal * comm_signal_create(struct comm_base *base, void(*callback)(int, void *), void *cb_arg)
Create a signal handler.
Definition: fake_event.c:973
fake_event_cleanup
void fake_event_cleanup(void)
Deinit fake event services.
Definition: fake_event.c:129
ub_result::nxdomain
int nxdomain
If there was no data, and the domain did not exist, this is true.
Definition: unbound.h:173
sldns_parse_char
int sldns_parse_char(uint8_t *ch_p, const char **str_p)
parse one character, with escape codes
Definition: parseutil.c:318
service_recv
static void service_recv(int s, struct ringbuf *ring, sldns_buffer *pkt, fd_set *rorig, int *max, struct proxy **proxies, struct sockaddr_storage *srv_addr, socklen_t srv_len, struct timeval *now, struct timeval *delay, struct timeval *reuse)
recv new waiting packets
Definition: delayer.c:491
delegpt_ns::namelen
size_t namelen
length of name
Definition: iter_delegpt.h:101
reply_info_sortref_cmp
static int reply_info_sortref_cmp(const void *a, const void *b)
helper compare function to sort in lock order
Definition: msgreply.c:497
hints_insert
static int hints_insert(struct iter_hints *hints, uint16_t c, struct delegpt *dp, int noprime)
insert new hint info into hint structure
Definition: iter_hints.c:168
addr_tree_node::addr
struct sockaddr_storage addr
address
Definition: dnstree.h:83
nsec3_cached_hash::hash_len
size_t hash_len
length of hash in bytes
Definition: val_nsec3.h:242
pending_udp_timer_cb
void pending_udp_timer_cb(void *arg)
callback for udp timeout
Definition: outside_network.c:660
module_env::send_query
struct outbound_entry *(* send_query)(struct query_info *qinfo, uint16_t flags, int dnssec, int want_dnssec, int nocaps, struct sockaddr_storage *addr, socklen_t addrlen, uint8_t *zone, size_t zonelen, int ssl_upstream, char *tls_auth_name, struct module_qstate *q)
Send serviced DNS query to server.
Definition: module.h:366
ds_create_dnskey_digest
static int ds_create_dnskey_digest(struct module_env *env, struct ub_packed_rrset_key *dnskey_rrset, size_t dnskey_idx, struct ub_packed_rrset_key *ds_rrset, size_t ds_idx, uint8_t *digest)
Create a DS digest for a DNSKEY entry.
Definition: val_sigcrypt.c:289
respip_enter_rr
int respip_enter_rr(struct regional *region, struct resp_addr *raddr, uint16_t rrtype, uint16_t rrclass, time_t ttl, uint8_t *rdata, size_t rdata_len, const char *rrstr, const char *netblockstr)
enter local data as resource records into a response-ip node
Definition: respip.c:255
ub_ctx_delete
void ub_ctx_delete(struct ub_ctx *ctx)
Destroy a validation context and free all its resources.
Definition: libunbound.c:284
dnskeyset_verify_rrset
enum sec_status dnskeyset_verify_rrset(struct module_env *env, struct val_env *ve, struct ub_packed_rrset_key *rrset, struct ub_packed_rrset_key *dnskey, uint8_t *sigalg, char **reason, sldns_pkt_section section, struct module_qstate *qstate)
Verify rrset against dnskey rrset.
Definition: val_sigcrypt.c:486
read_file_content
static void read_file_content(FILE *in, int *lineno, struct replay_moment *mom)
Read FILE match content.
Definition: replay.c:215
dt_io_thread::event_base
void * event_base
event base, for event handling
Definition: dtstream.h:120
replay_runtime::pending_list
struct fake_pending * pending_list
List of pending queries in order they were sent out.
Definition: replay.h:280
mesh_delete
void mesh_delete(struct mesh_area *mesh)
Delete mesh, and all query states and replies in it.
Definition: mesh.c:291
context_serialize_quit
uint8_t * context_serialize_quit(uint32_t *len)
Serialize a 'quit' command.
Definition: context.c:401
ub_comm_base_now
void ub_comm_base_now(struct comm_base *cb)
Equip the comm_base with the current time.
Definition: ub_event_pluggable.c:673
iter_get_mem
size_t iter_get_mem(struct module_env *env, int id)
iterator alloc size routine
Definition: iterator.c:3929
LDNS_RR_TYPE_MG
@ LDNS_RR_TYPE_MG
a mail group member (EXPERIMENTAL)
Definition: rrdef.h:99
MAX_COMPRESS_PTRS
#define MAX_COMPRESS_PTRS
max number of compression ptrs to follow
Definition: dname.h:51
algo_needs_missing
int algo_needs_missing(struct algo_needs *n)
See which algo is missing.
Definition: val_sigcrypt.c:471
service_loop
static void service_loop(int udp_s, int listen_s, struct ringbuf *ring, struct timeval *delay, struct timeval *reuse, struct sockaddr_storage *srv_addr, socklen_t srv_len, sldns_buffer *pkt)
delayer service loop
Definition: delayer.c:928
fptr_whitelist_mesh_cb
int fptr_whitelist_mesh_cb(mesh_cb_func_type fptr)
Check function pointer whitelist for mesh state callback values.
Definition: fptr_wlist.c:573
rbtree_next
rbnode_type * rbtree_next(rbnode_type *rbtree)
Returns next larger node in the tree.
Definition: rbtree.c:571
outside_network::unwanted_action
void(* unwanted_action)(void *)
what action to take, called when defensive action is needed
Definition: outside_network.h:96
keysets::keytag
uint16_t keytag
keytag
Definition: signit.c:59
tcp_req_info_handle_readdone
void tcp_req_info_handle_readdone(struct tcp_req_info *req)
Handle read done of a new request from the client.
Definition: listen_dnsport.c:1803
check_table
static void check_table(struct slabhash *table)
check integrity of hash table
Definition: unitslabhash.c:187
slabhash_clear
void slabhash_clear(struct slabhash *table)
Clear hash table.
Definition: slabhash.c:100
val_verify_new_DNSKEYs_with_ta
struct key_entry_key * val_verify_new_DNSKEYs_with_ta(struct regional *region, struct module_env *env, struct val_env *ve, struct ub_packed_rrset_key *dnskey_rrset, struct ub_packed_rrset_key *ta_ds_rrset, struct ub_packed_rrset_key *ta_dnskey_rrset, int downprot, char **reason, struct module_qstate *qstate)
Verify rrset with trust anchor: DS and DNSKEY rrset.
Definition: val_utils.c:696
dt_io_thread_start
int dt_io_thread_start(struct dt_io_thread *dtio, void *event_base_nothr, int numworkers)
Start the io thread.
Definition: dtstream.c:2054
inplace_cb_reply_local_call
int inplace_cb_reply_local_call(struct module_env *env, struct query_info *qinfo, struct module_qstate *qstate, struct reply_info *rep, int rcode, struct edns_data *edns, struct comm_reply *repinfo, struct regional *region)
Call the registered functions in the inplace_cb_reply_local linked list.
Definition: msgreply.c:1076
main
int main(int argc, char *argv[])
main program for pktview
Definition: pktview.c:189
delq
static void delq(rbnode_type *n, void *ATTR_UNUSED(arg))
delete q
Definition: libunbound.c:231
mesh_area::run
rbtree_type run
set of runnable queries (mesh_state.run_node)
Definition: mesh.h:89
sldns_wirerr_get_type
uint16_t sldns_wirerr_get_type(uint8_t *rr, size_t len, size_t dname_len)
Get the type of the RR.
Definition: str2wire.c:798
serviced_query::opt_list
struct edns_option * opt_list
edns options to use for sending upstream packet
Definition: outside_network.h:388
local_zones_add_RR
int local_zones_add_RR(struct local_zones *zones, const char *rr)
Add RR data into the localzone data.
Definition: localzone.c:1881
service_ssl
static void service_ssl(SSL *ssl, struct sockaddr_storage *from, socklen_t falen)
provide service to the ssl descriptor
Definition: petal.c:537
sldns_wire2str_nsap_scan
int sldns_wire2str_nsap_scan(uint8_t **data, size_t *data_len, char **str, size_t *str_len)
Scan wireformat NSAP field to string, with user buffers.
Definition: wire2str.c:1533
dname_test_qdtl
static void dname_test_qdtl(sldns_buffer *buff)
test query_dname_tolower
Definition: unitdname.c:78
print_ext
static int print_ext(RES *ssl, struct ub_stats_info *s)
print extended stats
Definition: remote.c:917
daemon_delete
void daemon_delete(struct daemon *daemon)
Delete workers, close listening ports.
Definition: daemon.c:737
do_revoked
static void do_revoked(struct module_env *env, struct autr_ta *anchor, int *c)
Event: Revoked.
Definition: autotrust.c:1781
reply_info_parsedelete
void reply_info_parsedelete(struct reply_info *rep, struct alloc_cache *alloc)
Delete reply_info and packed_rrsets (while they are not yet added to the hashtables....
Definition: msgreply.c:533
dns64_env::prefix_addr
struct sockaddr_storage prefix_addr
DNS64 prefix address.
Definition: dns64.c:120
equal_dname
static int equal_dname(uint8_t *q, size_t qlen, uint8_t *p, size_t plen)
see if domain names are equal
Definition: testpkts.c:1348
canonical_sort
static void canonical_sort(struct ub_packed_rrset_key *rrset, struct packed_rrset_data *d, rbtree_type *sortree, struct canon_rr *rrs)
Sort RRs for rrset in canonical order.
Definition: val_sigcrypt.c:897
mesh_reply::qflags
uint16_t qflags
flags of query, for reply flags
Definition: mesh.h:228
port_comm::number
int number
which port number (when in use)
Definition: outside_network.h:203
edns_known_options_delete
void edns_known_options_delete(struct module_env *env)
Free the allocated space for the known edns options.
Definition: module.c:85
authzone_test
void authzone_test(void)
unit test for auth zone functions
Definition: unitauth.c:893
check_queries
static void check_queries(const char *name, const char *zone, struct q_ans *queries)
check queries for a zone are returned as specified
Definition: unitauth.c:838
secalgo_ds_digest
int secalgo_ds_digest(int algo, unsigned char *buf, size_t len, unsigned char *res)
auth_master_copy
static struct auth_master * auth_master_copy(struct auth_master *o)
copy a master to a new structure, NULL on alloc failure
Definition: authzone.c:3686
read_stubs
static int read_stubs(struct iter_hints *hints, struct config_file *cfg)
read stubs config
Definition: iter_hints.c:271
read_acl_tag_actions
static int read_acl_tag_actions(struct acl_list *acl, struct config_file *cfg)
read acl tag actions config
Definition: acl_list.c:389
cachedb_env
The global variable environment contents for the cachedb Shared between threads, this represents long...
Definition: cachedb.h:50
dt_msg_queue::lock
lock_basic_type lock
lock of the buffer structure.
Definition: dtstream.h:65
dump_msg_cache
static int dump_msg_cache(RES *ssl, struct worker *worker)
dump msg cache
Definition: cachedump.c:277
val_find_rrset_signer
void val_find_rrset_signer(struct ub_packed_rrset_key *rrset, uint8_t **sname, size_t *slen)
Find the signer name for an RRset.
Definition: val_utils.c:160
key_entry_compfunc
int key_entry_compfunc(void *k1, void *k2)
function for lruhash operation
Definition: val_kentry.c:68
del_info::addr
struct sockaddr_storage addr
socket address for host deletion
Definition: remote.c:1617
context_query_cmp
int context_query_cmp(const void *a, const void *b)
compare two ctx_query elements
Definition: context.c:103
cfg_str3list_insert
int cfg_str3list_insert(struct config_str3list **head, char *item, char *i2, char *i3)
Insert string into str3list.
Definition: config_file.c:1772
listen_type_tcp_dnscrypt
@ listen_type_tcp_dnscrypt
tcp type + dnscrypt
Definition: listen_dnsport.h:95
auth_probe::scan_target
struct auth_master * scan_target
scan tries all the upstream masters.
Definition: authzone.h:334
BIT_RD
#define BIT_RD
RD flag.
Definition: net_help.h:65
sldns_str2wire_cert_alg_buf
int sldns_str2wire_cert_alg_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_CERT_ALG from string to wireformat.
Definition: str2wire.c:1366
calc_num46
static void calc_num46(char **ifs, int num_ifs, int do_ip4, int do_ip6, int *num_ip4, int *num_ip6)
calculate number of ip4 and ip6 interfaces
Definition: outside_network.c:622
testpkt
static void testpkt(sldns_buffer *pkt, struct alloc_cache *alloc, sldns_buffer *out, const char *hex)
test a packet
Definition: unitmsgparse.c:314
DNSKEY_BIT_ZSK
#define DNSKEY_BIT_ZSK
DNSKEY zone sign key flag.
Definition: net_help.h:93
parse_keyword
static int parse_keyword(char **line, const char *keyword)
parse keyword in string.
Definition: replay.c:91
neg_lru_front
static void neg_lru_front(struct val_neg_cache *neg, struct val_neg_data *data)
Put data element at the front of the LRU list.
Definition: val_neg.c:147
context_deserialize_answer
struct ctx_query * context_deserialize_answer(struct ub_ctx *ctx, uint8_t *p, uint32_t len, int *err)
Deserialize an answer buffer.
Definition: context.c:332
dynlibmod_env::func_inform
func_inform_t func_inform
Module super_inform function.
Definition: dynlibmod.h:126
config_file::msg_buffer_size
size_t msg_buffer_size
number of bytes buffer size for DNS messages
Definition: config_file.h:148
sldns_wire2str_opcode_buf
int sldns_wire2str_opcode_buf(int opcode, char *s, size_t slen)
Convert host format opcode to a string.
Definition: wire2str.c:305
main
int main(int argc, char **argv)
Install service main.
Definition: unbound-service-install.c:50
sldns_wire2str_edns_subnet_print
int sldns_wire2str_edns_subnet_print(char **s, size_t *sl, uint8_t *data, size_t len)
Print EDNS SUBNET option data to string.
Definition: wire2str.c:1860
sldns_rr_tcttl_scan
static int sldns_rr_tcttl_scan(uint8_t **d, size_t *dl, char **s, size_t *sl)
scan type, class and ttl and printout, for rr
Definition: wire2str.c:418
pending_udp_query
struct pending * pending_udp_query(struct serviced_query *sq, struct sldns_buffer *packet, int timeout, comm_point_callback_type *cb, void *cb_arg)
Send UDP query, create pending answer.
Definition: outside_network.c:1239
module_stack::mod
struct module_func_block ** mod
the module callbacks, array of num_modules length (ref only)
Definition: modstack.h:54
ub_server_stats::rrset_cache_count
long long rrset_cache_count
number of rrset cache entries
Definition: unbound.h:751
worker
Structure holding working information for unbound.
Definition: worker.h:82
regional.h
query_dname_tolower
void query_dname_tolower(uint8_t *dname)
lowercase query dname
Definition: dname.c:135
dynlibmod_inform_super
void dynlibmod_inform_super(struct module_qstate *qstate, int id, struct module_qstate *super)
dynlib module
Definition: dynlibmod.c:186
sldns_wire2str_rr_unknown_scan
int sldns_wire2str_rr_unknown_scan(uint8_t **d, size_t *dlen, char **s, size_t *slen, uint8_t *pkt, size_t pktlen, int *comprloop)
Scan wireformat RR to string in unknown RR format, with user buffers.
Definition: wire2str.c:547
sldns_enum_pkt_section
sldns_enum_pkt_section
The sections of a packet.
Definition: pkthdr.h:116
ub_server_stats::qtcp
long long qtcp
number of queries over TCP
Definition: unbound.h:695
ip_list::len
socklen_t len
length of addr
Definition: unbound-anchor.c:166
HASH_DEFAULT_STARTARRAY
#define HASH_DEFAULT_STARTARRAY
default start size for hash arrays
Definition: lruhash.h:114
module_list_avail
const char ** module_list_avail(void)
Get list of modules available.
Definition: modstack.c:138
comm_base_internal
struct ub_event_base * comm_base_internal(struct comm_base *b)
Access internal data structure (for util/tube.c on windows)
Definition: netevent.c:268
respip_set_is_empty
int respip_set_is_empty(const struct respip_set *set)
respip set emptiness test
Definition: respip.c:1299
alloc_reg_obtain
struct regional * alloc_reg_obtain(struct alloc_cache *alloc)
Get a new regional for query states.
Definition: alloc.c:329
entry::sleeptime
unsigned int sleeptime
in seconds
Definition: testpkts.h:214
sldns_enum_rr_compress
sldns_enum_rr_compress
Used to specify whether compression is allowed.
Definition: rrdef.h:72
RESPIP_SUBQUERY_FINISHED
@ RESPIP_SUBQUERY_FINISHED
A subquery for CNAME chasing is completed.
Definition: respip.c:48
reply_equal
int reply_equal(struct reply_info *p, struct reply_info *q, struct regional *region)
Check if two replies are equal For fallback procedures.
Definition: iter_utils.c:967
nsec3_rrset_has_known
static int nsec3_rrset_has_known(struct ub_packed_rrset_key *s)
see if at least one RR is known (flags, algo)
Definition: val_nsec3.c:382
spool_temp_file
static void spool_temp_file(FILE *in, int *lineno, char *id)
spool temp file
Definition: testbound.c:172
dns_cache_find_delegation
struct delegpt * dns_cache_find_delegation(struct module_env *env, uint8_t *qname, size_t qnamelen, uint16_t qtype, uint16_t qclass, struct regional *region, struct dns_msg **msg, time_t timenow)
Find a delegation from the cache.
Definition: dns.c:462
config_get_option
int config_get_option(struct config_file *cfg, const char *opt, void(*func)(char *, void *), void *arg)
Call print routine for the given option.
Definition: config_file.c:894
dns64_inform_super
void dns64_inform_super(struct module_qstate *qstate, int id, struct module_qstate *super)
This function is called when a sub-query finishes to inform the parent query.
Definition: dns64.c:935
query_info::qname
uint8_t * qname
Salient data on the query: qname, in wireformat.
Definition: msgreply.h:75
verifytest_rrset
static void verifytest_rrset(struct module_env *env, struct val_env *ve, struct ub_packed_rrset_key *rrset, struct ub_packed_rrset_key *dnskey, struct query_info *qinfo)
verify and test one rrset against the key rrset
Definition: unitverify.c:176
iter_qstate::caps_server
size_t caps_server
state for capsfail: current server number to try
Definition: iterator.h:288
dname_strict_subdomain
int dname_strict_subdomain(uint8_t *d1, int labs1, uint8_t *d2, int labs2)
See if domain name d1 is a strict subdomain of d2.
Definition: dname.c:679
sldns_buffer_write_u8
INLINE void sldns_buffer_write_u8(sldns_buffer *buffer, uint8_t data)
writes the given byte of data at the current position in the buffer
Definition: sbuffer.h:511
subnet_qstate::qinfo_hash
hashvalue_type qinfo_hash
We need the hash for both cache lookup and insert.
Definition: subnetmod.h:78
ub_event_vmt::del_timer
int(* del_timer)(struct ub_event *)
Deactivate the timeout event.
Definition: unbound-event.h:145
try_read_anchor
static int try_read_anchor(const char *file)
Try to read the root RFC5011 autotrust anchor file,.
Definition: unbound-anchor.c:1995
sldns_get_rr_class_by_name
sldns_rr_class sldns_get_rr_class_by_name(const char *name)
retrieves a class by looking up its name.
Definition: rrdef.c:728
mesh_state_make_unique
void mesh_state_make_unique(struct mesh_state *mstate)
Make a mesh state unique.
Definition: mesh.c:855
do_update
static int do_update(char *domain, char *file)
update domain to file
Definition: anchor-update.c:110
mesh_state_attachment
int mesh_state_attachment(struct mesh_state *super, struct mesh_state *sub)
Setup attachment super/sub relation between super and sub mesh state.
Definition: mesh.c:1069
ub_event_get_version
const char * ub_event_get_version(void)
Returns event-base type.
Definition: ub_event.c:146
replay_runtime::bufsize
size_t bufsize
size of buffers
Definition: replay.h:317
auth_zones_find_zone
struct auth_zone * auth_zones_find_zone(struct auth_zones *az, uint8_t *name, size_t name_len, uint16_t dclass)
Find the auth zone that is above the given qname.
Definition: authzone.c:486
log_ident_set_default
void log_ident_set_default(const char *id)
Set default identity to print, default is 'unbound'.
Definition: log.c:185
sldns_b32_ntop_calculate_size
size_t sldns_b32_ntop_calculate_size(size_t src_data_length)
calculates the size needed to store the result of b32_ntop
Definition: parseutil.c:332
port_comm::next
struct port_comm * next
next in free list
Definition: outside_network.h:201
LDNS_RDF_TYPE_INT32
@ LDNS_RDF_TYPE_INT32
32 bits
Definition: rrdef.h:274
LDNS_RR_TYPE_NS
@ LDNS_RR_TYPE_NS
an authoritative name server
Definition: rrdef.h:87
autr_debug_print_ta
static void autr_debug_print_ta(struct autr_ta *ta)
debug print a trust anchor key
Definition: autotrust.c:2256
get_rrset_trust
static enum rrset_trust get_rrset_trust(struct msg_parse *msg, struct rrset_parse *rrset)
get trust value for rrset
Definition: msgreply.c:338
dump_msg_lruhash
static int dump_msg_lruhash(RES *ssl, struct worker *worker, struct lruhash *h)
dump lruhash msg cache
Definition: cachedump.c:249
val_neg_addreply
void val_neg_addreply(struct val_neg_cache *neg, struct reply_info *rep)
Insert NSECs from this message into the negative cache for reference.
Definition: val_neg.c:878
main
#define main
include the main program from the unbound daemon.
Definition: testbound.c:59
write_builtin_anchor
static void write_builtin_anchor(const char *file)
Write the builtin root anchor to a file.
Definition: unbound-anchor.c:2039
comm_point::tcp_conn_limit
struct tcl_list * tcp_conn_limit
if set, check for connection limit on tcp accept.
Definition: netevent.h:267
pending::outnet
struct outside_network * outnet
the outside network it is part of
Definition: outside_network.h:237
assemble_iterate_hasfirst
static int assemble_iterate_hasfirst(int iter(struct autr_ta **, uint8_t **, size_t *, size_t *), struct autr_ta *list)
see if iterator-list has any elements in it, or it is empty
Definition: autotrust.c:595
inplace_cb::next
struct inplace_cb * next
next in list
Definition: module.h:229
rrset_cache_update
int rrset_cache_update(struct rrset_cache *r, struct rrset_ref *ref, struct alloc_cache *alloc, time_t timenow)
Update an rrset in the rrset cache.
Definition: rrset.c:185
edns_opt_list_free
void edns_opt_list_free(struct edns_option *list)
Free edns option list allocated with malloc.
Definition: msgreply.c:1206
ipsecmod_operate
void ipsecmod_operate(struct module_qstate *qstate, enum module_ev event, int id, struct outbound_entry *outbound)
Operate on an event on a query (in qstate).
comm_signal::cb_arg
void * cb_arg
callback user argument
Definition: netevent.h:346
nsec3_get_salt
static int nsec3_get_salt(struct ub_packed_rrset_key *rrset, int r, uint8_t **salt, size_t *saltlen)
return nsec3 RR salt
Definition: val_nsec3.c:188
compress_any_dname
static int compress_any_dname(uint8_t *dname, sldns_buffer *pkt, int labs, struct regional *region, struct compress_tree_node **tree)
compress any domain name to the packet, return RETVAL_*
Definition: msgencode.c:336
verb_addr
static void verb_addr(const char *msg, struct ip_list *ip)
printout IP address with message
Definition: unbound-anchor.c:481
algo_needs_set_secure
int algo_needs_set_secure(struct algo_needs *n, uint8_t algo)
Mark this algorithm as a success, sec_secure, and see if we are done.
Definition: val_sigcrypt.c:450
iter_priv
Iterator priv structure.
Definition: iter_priv.h:55
autr_point_data::query_failed
uint8_t query_failed
How many times did it fail.
Definition: autotrust.h:119
dnscrypt_pad
size_t dnscrypt_pad(uint8_t *buf, const size_t len, const size_t max_len, const uint8_t *nonce, const uint8_t *secretkey)
Add random padding to a buffer, according to a client nonce.
Definition: dnscrypt.c:392
MAXARG
#define MAXARG
Max number of arguments to pass to unbound.
Definition: testbound.c:107
outbound_list_clear
void outbound_list_clear(struct outbound_list *list)
Clear the user owner outbound list structure.
Definition: outbound_list.c:54
serviced_query::tcp_upstream
int tcp_upstream
tcp upstream used, use tcp, or ssl_upstream for SSL
Definition: outside_network.h:342
MAX_TARGET_COUNT
#define MAX_TARGET_COUNT
max number of targets spawned for a query and its subqueries
Definition: iterator.h:57
comm_point_create_http_out
struct comm_point * comm_point_create_http_out(struct comm_base *base, size_t bufsize, comm_point_callback_type *callback, void *callback_arg, sldns_buffer *temp)
Create an outgoing HTTP commpoint.
Definition: netevent.c:2874
UB_STATS_QCLASS_NUM
#define UB_STATS_QCLASS_NUM
number of qclass that is stored for in array
Definition: unbound.h:652
tap_data::control_frame
int control_frame
are we reading a control frame
Definition: unbound-dnstap-socket.c:123
val_env::bogus_ttl
uint32_t bogus_ttl
TTL for bogus data; used instead of untrusted TTL from data.
Definition: validator.h:101
dnskey_get_flags
uint16_t dnskey_get_flags(struct ub_packed_rrset_key *k, size_t idx)
Get DNSKEY RR flags.
Definition: val_sigcrypt.c:147
auth_zone_create
struct auth_zone * auth_zone_create(struct auth_zones *az, uint8_t *nm, size_t nmlen, uint16_t dclass)
create an auth zone.
Definition: authzone.c:411
respip_find_or_create
static struct resp_addr * respip_find_or_create(struct respip_set *set, const char *ipstr, int create)
returns the node in the address tree for the specified netblock string; non-existent node will be cre...
Definition: respip.c:143
auth_nextprobe::backoff
time_t backoff
increasing backoff for failures
Definition: authzone.h:290
az_find_domain
static void az_find_domain(struct auth_zone *z, struct query_info *qinfo, int *node_exact, struct auth_data **node)
Find domain name (or closest match)
Definition: authzone.c:621
iter_resptype.h
dtio_check_nb_connect
static int dtio_check_nb_connect(struct dt_io_thread *dtio)
check for pending nonblocking connect errors, returns 1 if it is okay.
Definition: dtstream.c:630
kd_get_flags
static uint16_t kd_get_flags(struct packed_rrset_data *data, size_t idx)
get dnskey flags from data
Definition: val_kentry.c:386
addrtree::env
void * env
Environment for delfunc.
Definition: addrtree.h:81
slabhash_get_size
size_t slabhash_get_size(struct slabhash *sl)
Retrieve slab hash total size.
Definition: slabhash.c:145
alloc_clear_special
void alloc_clear_special(struct alloc_cache *alloc)
Free the special alloced items.
Definition: alloc.c:146
lowercase_rdata
static void lowercase_rdata(uint8_t **p, size_t *remain, uint16_t rdatalen, uint16_t t)
lowercase rdata of type
Definition: testpkts.c:1074
worker_stats_clear
void worker_stats_clear(struct worker *worker)
Init worker stats - includes server_stats_init, outside network and mesh.
Definition: worker.c:2027
config_taglist2str
char * config_taglist2str(struct config_file *cfg, uint8_t *taglist, size_t taglen)
convert tag bitlist to a malloced string with tag names.
Definition: config_file.c:1994
mesh_walk_supers
void mesh_walk_supers(struct mesh_area *mesh, struct mesh_state *mstate)
Call inform_super for the super query states that are interested in the results from this query state...
Definition: mesh.c:1408
delegpt_count_addr
void delegpt_count_addr(struct delegpt *dp, size_t *numaddr, size_t *numres, size_t *numavail)
count addresses, and number in result and available lists, for logging
Definition: iter_delegpt.c:240
worker_send_query
struct outbound_entry * worker_send_query(struct query_info *qinfo, uint16_t flags, int dnssec, int want_dnssec, int nocaps, struct sockaddr_storage *addr, socklen_t addrlen, uint8_t *zone, size_t zonelen, int ssl_upstream, char *tls_auth_name, struct module_qstate *q)
Worker service routine to send serviced queries to authoritative servers.
Definition: worker.c:1998
config_str3list::str3
char * str3
third string
Definition: config_file.h:751
rpz_insert_rr
int rpz_insert_rr(struct rpz *r, uint8_t *azname, size_t aznamelen, uint8_t *dname, size_t dnamelen, uint16_t rr_type, uint16_t rr_class, uint32_t rr_ttl, uint8_t *rdatawl, size_t rdatalen, uint8_t *rr, size_t rr_len)
Create policy from RR and add to this RPZ.
Definition: rpz.c:589
comm_base_timept
void comm_base_timept(struct comm_base *b, time_t **tt, struct timeval **tv)
Obtain two pointers.
Definition: netevent.c:236
tube_handle_listen
int tube_handle_listen(struct comm_point *c, void *arg, int error, struct comm_reply *reply_info)
for fptr wlist, callback function
verify_canonrrset
enum sec_status verify_canonrrset(struct sldns_buffer *buf, int algo, unsigned char *sigblock, unsigned int sigblock_len, unsigned char *key, unsigned int keylen, char **reason)
Check a canonical sig+rrset and signature against a dnskey.
mesh_area::num_detached_states
size_t num_detached_states
number of mesh_states that have no mesh_replies, and also an empty set of super-states,...
Definition: mesh.h:102
USEFUL_SERVER_TOP_TIMEOUT
#define USEFUL_SERVER_TOP_TIMEOUT
maximum timeout before a host is deemed unsuitable, in msec.
Definition: iterator.h:96
config_file::delay_close
int delay_close
delay close of udp-timeouted ports, if 0 no delayclose.
Definition: config_file.h:170
server_stats_log
void server_stats_log(struct ub_server_stats *stats, struct worker *worker, int threadnum)
display the stats to the log
Definition: stats.c:110
sldns_wire2str_pkt
char * sldns_wire2str_pkt(uint8_t *data, size_t len)
Convert wireformat packet to a string representation.
Definition: wire2str.c:199
local_zone::dclass
uint16_t dclass
the class of this zone.
Definition: localzone.h:132
auth_zone_write_file
int auth_zone_write_file(struct auth_zone *z, const char *fname)
Write auth zone data to file, in zonefile format.
Definition: authzone.c:1724
comm_timer_delete
void comm_timer_delete(struct comm_timer *timer)
delete timer.
Definition: fake_event.c:1525
val_neg_data::zone
struct val_neg_zone * zone
the zone that this denial is part of
Definition: val_neg.h:161
wipeout
static void wipeout(struct val_neg_cache *neg, struct val_neg_zone *zone, struct val_neg_data *el, struct ub_packed_rrset_key *nsec)
Remove NSEC records between start and end points.
Definition: val_neg.c:673
module_qstate::no_cache_store
int no_cache_store
whether modules should store answer in the cache
Definition: module.h:648
verify_respip_set_actions
static void verify_respip_set_actions(struct respip_set *set, addr_action_t actions[], int actions_len)
Utility function that verifies that the respip set has actions as expected.
Definition: unitmain.c:571
config_file::trust_anchor_file_list
struct config_strlist * trust_anchor_file_list
files with trusted DS and DNSKEYs in zonefile format, list
Definition: config_file.h:327
inplace_cb_edns_back_parsed_call
int inplace_cb_edns_back_parsed_call(struct module_env *env, struct module_qstate *qstate)
Call the registered functions in the inplace_cb_edns_back_parsed linked list.
Definition: msgreply.c:1116
mesh_area::replies_sum_wait
struct timeval replies_sum_wait
sum of waiting times for the replies
Definition: mesh.h:120
iter_env
Global state for the iterator.
Definition: iterator.h:109
val_error
static int val_error(struct module_qstate *qstate, int id)
Exit validation with an error status.
Definition: validator.c:276
dnskey_compare_skip_revbit
static int dnskey_compare_skip_revbit(uint8_t *a, size_t a_len, uint8_t *b, size_t b_len)
Compare two RRs skipping the REVOKED bit.
Definition: autotrust.c:1351
autr_point_data::revoked
uint8_t revoked
true if the trust point has been revoked
Definition: autotrust.h:121
packed_rrset_data::ttl
time_t ttl
TTL (in seconds like time()) of the rrset.
Definition: packed_rrset.h:238
anchor_read_bind_file_wild
static int anchor_read_bind_file_wild(struct val_anchors *anchors, sldns_buffer *buffer, const char *pat)
Read a BIND9 like files with trust anchors in named.conf format.
Definition: val_anchor.c:785
chunkline_non_comment_RR
static int chunkline_non_comment_RR(struct auth_chunk **chunk, size_t *chunk_pos, sldns_buffer *buf, struct sldns_file_parse_state *pstate)
find noncomment RR line in chunks, collates lines if ( ) format
Definition: authzone.c:4286
ub_ctx_add_ta_file
int ub_ctx_add_ta_file(struct ub_ctx *ctx, const char *fname)
Add trust anchors to the given context.
Definition: libunbound.c:409
comm_point_create_udp_ancil
struct comm_point * comm_point_create_udp_ancil(struct comm_base *base, int fd, sldns_buffer *buffer, comm_point_callback_type *callback, void *callback_arg)
Create an UDP with ancillary data comm point.
Definition: netevent.c:2574
az_nsec3_findnode
static struct auth_data * az_nsec3_findnode(struct auth_zone *z, uint8_t *hashnm, size_t hashnmlen)
Find the datanode that covers the nsec3hash-name.
Definition: authzone.c:2681
trust_anchor::parent
struct trust_anchor * parent
the ancestor in the trustanchor tree
Definition: val_anchor.h:106
xfr_probe_current_master
static struct auth_master * xfr_probe_current_master(struct auth_xfer *xfr)
pick up the master that is being scanned right now, task_probe
Definition: authzone.c:3875
config_file::qname_minimisation
int qname_minimisation
minimise outgoing QNAME and hide original QTYPE if possible
Definition: config_file.h:547
outside_network_create
struct outside_network * outside_network_create(struct comm_base *base, size_t bufsize, size_t num_ports, char **ifs, int num_ifs, int do_ip4, int do_ip6, size_t num_tcp, int dscp, struct infra_cache *infra, struct ub_randstate *rnd, int use_caps_for_id, int *availports, int numavailports, size_t unwanted_threshold, int tcp_mss, void(*unwanted_action)(void *), void *unwanted_param, int do_udp, void *sslctx, int delayclose, int tls_use_sni, struct dt_env *dtenv)
Create outside_network structure with N udp ports.
Definition: outside_network.c:734
caps_failed_rcode
int caps_failed_rcode(struct reply_info *rep)
see if reply has a 'useful' rcode for capsforid comparison, so not SERVFAIL or REFUSED,...
Definition: iter_utils.c:1060
apply_edns_options
int apply_edns_options(struct edns_data *edns_out, struct edns_data *edns_in, struct config_file *cfg, struct comm_point *c, struct regional *region)
Apply common EDNS options.
Definition: edns.c:75
delegpt_add_ns
int delegpt_add_ns(struct delegpt *dp, struct regional *regional, uint8_t *name, uint8_t lame)
Add a name to the delegation point.
Definition: iter_delegpt.c:103
log_reply
void void log_reply(const char *format,...) ATTR_FORMAT(printf
Log reply.
config_collate_func
void config_collate_func(char *line, void *arg)
function to collate the text strings into a strlist_head.
Definition: config_file.c:762
respip_always_nodata
@ respip_always_nodata
answer with nodata response
Definition: localzone.h:556
sldns_struct_rr_descriptor::_variable
sldns_rdf_type _variable
Special rdf types.
Definition: rrdef.h:462
COLLECT_CLASS_STATE
@ COLLECT_CLASS_STATE
Collecting query class information, for qclass=ANY, when it spawns off queries for every class,...
Definition: iterator.h:208
auth_rrset
A auth data RRset.
Definition: authzone.h:171
fptr_whitelist_modenv_detect_cycle
int fptr_whitelist_modenv_detect_cycle(int(*fptr)(struct module_qstate *qstate, struct query_info *qinfo, uint16_t flags, int prime, int valrec))
Check function pointer whitelist for module_env detect_cycle callback values.
Definition: fptr_wlist.c:380
iter_qstate::minimisation_state
enum minimisation_state minimisation_state
QNAME minimisation state, RFC7816.
Definition: iterator.h:382
createResponse
int createResponse(struct module_qstate *qstate, sldns_buffer *pkt)
Create response according to the ldns packet content.
Definition: pythonmod_utils.c:111
sldns_str2wire_nsec_buf
int sldns_str2wire_nsec_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_NSEC from string to wireformat.
Definition: str2wire.c:1277
iter_lookup_parent_glue_from_cache
int iter_lookup_parent_glue_from_cache(struct module_env *env, struct delegpt *dp, struct regional *region, struct query_info *qinfo)
Add parent-side glue if that exists in the cache.
Definition: iter_utils.c:1187
rrset_cache_update_wildcard
void rrset_cache_update_wildcard(struct rrset_cache *rrset_cache, struct ub_packed_rrset_key *rrset, uint8_t *ce, size_t ce_len, struct alloc_cache *alloc, time_t timenow)
Update or add an rrset in the rrset cache using a wildcard dname.
Definition: rrset.c:241
comm_point_drop_reply
void comm_point_drop_reply(struct comm_reply *repinfo)
Drop reply.
Definition: fake_event.c:1020
do_dump_requestlist
static void do_dump_requestlist(RES *ssl, struct worker *worker)
do the dump_requestlist command
Definition: remote.c:2396
dns64_block
static struct module_func_block dns64_block
The dns64 function block.
Definition: dns64.c:1020
name_tree_node::name
uint8_t * name
name in uncompressed wireformat
Definition: dnstree.h:61
config_get_option_list
int config_get_option_list(struct config_file *cfg, const char *opt, struct config_strlist **list)
Get an option and return strlist.
Definition: config_file.c:771
host_name_is_safe
static int host_name_is_safe(char *s)
check a host name for safety
Definition: petal.c:354
CMSG_LEN
#define CMSG_LEN(len)
if CMSG_LEN is not defined on this platform, a workaround
Definition: netevent.c:75
macro_assign
int macro_assign(rbtree_type *store, char *name, char *value)
Set macro value.
Definition: replay.c:909
tube_remove_bg_write
void tube_remove_bg_write(struct tube *tube)
Remove bg write setup from event base.
Definition: tube.c:126
auth_transfer::got_xfr_serial
int got_xfr_serial
did we detect the current AXFR/IXFR serial number yet, 0 not yet, 1 we saw the first,...
Definition: authzone.h:402
caps_strip_reply
void caps_strip_reply(struct reply_info *rep)
Remove unused bits from the reply if possible.
Definition: iter_utils.c:1025
nsec3_prove_nxornodata
enum sec_status nsec3_prove_nxornodata(struct module_env *env, struct val_env *ve, struct ub_packed_rrset_key **list, size_t num, struct query_info *qinfo, struct key_entry_key *kkey, int *nodata)
Prove NXDOMAIN or NODATA.
Definition: val_nsec3.c:1406
config_collate_arg::status
int status
if a malloc error occurred, 0 is OK
Definition: config_file.c:759
write_root_anchor
static void write_root_anchor(const char *root_anchor_file, BIO *ds)
write root anchor file
Definition: unbound-anchor.c:1870
sldns_edns_options
sldns_lookup_table * sldns_edns_options
EDNS option codes.
Definition: wire2str.c:175
outnet_serviced_query_stop
void outnet_serviced_query_stop(struct serviced_query *sq, void *cb_arg)
Remove service query callback.
Definition: outside_network.c:2177
xml_data::parser
XML_Parser parser
the parser, reference
Definition: unbound-anchor.c:1195
packed_rr_to_string
int packed_rr_to_string(struct ub_packed_rrset_key *rrset, size_t i, time_t now, char *dest, size_t dest_len)
Convert RR from RRset to string.
Definition: packed_rrset.c:271
auth_zones_find_or_add_xfer
static struct auth_xfer * auth_zones_find_or_add_xfer(struct auth_zones *az, struct auth_zone *z)
find or create xfer zone with name str.
Definition: authzone.c:541
rrset_trust_add_AA
@ rrset_trust_add_AA
Additional information from an authoritative answer.
Definition: packed_rrset.h:148
fstrm_create_control_frame_start
void * fstrm_create_control_frame_start(char *contenttype, size_t *len)
This creates an FSTRM control frame of type START.
Definition: dnstap_fstrm.c:49
rpz_trigger
rpz_trigger
RPZ triggers, only the QNAME trigger is currently supported in Unbound.
Definition: rpz.h:57
ub_signal_del
int ub_signal_del(struct ub_event *)
Deactivate a signal event.
Definition: ub_event.c:421
resp_addr
An address span with response control information.
Definition: respip.h:33
local_zone::namelen
size_t namelen
length of zone name
Definition: localzone.h:127
iter_add_prepend_answer
static int iter_add_prepend_answer(struct module_qstate *qstate, struct iter_qstate *iq, struct ub_packed_rrset_key *rrset)
Add rrset to ANSWER prepend list.
Definition: iterator.c:482
val_verify_rrset
enum sec_status val_verify_rrset(struct module_env *env, struct val_env *ve, struct ub_packed_rrset_key *rrset, struct ub_packed_rrset_key *keys, uint8_t *sigalg, char **reason, sldns_pkt_section section, struct module_qstate *qstate)
Verify RRset with keys.
Definition: val_utils.c:336
sec_status_secure
@ sec_status_secure
SECURE means that the object (RRset or message) validated according to local policy.
Definition: packed_rrset.h:196
testremove_unlim
static void testremove_unlim(struct slabhash *table, testdata_type **ref)
test adding a random element (unlimited range)
Definition: unitslabhash.c:209
cfg_stub_find
struct config_stub * cfg_stub_find(struct config_stub ***pp, const char *nm)
Find stub in config list, also returns prevptr (for deletion).
Definition: config_file.c:1271
config_file::val_sig_skew_min
int32_t val_sig_skew_min
the minimum for signature clock skew
Definition: config_file.h:348
rbtree_previous
rbnode_type * rbtree_previous(rbnode_type *node)
Returns previous smaller node in the tree.
Definition: rbtree.c:590
subnetmod_inform_super
void subnetmod_inform_super(struct module_qstate *qstate, int id, struct module_qstate *super)
subnet module
module_event_error
@ module_event_error
error
Definition: module.h:567
replay_answer
An answer that is pending to happen.
Definition: replay.h:366
rate_delkeyfunc
void rate_delkeyfunc(void *k, void *arg)
delete key, and destroy the lock
dnskey_algo_is_supported
int dnskey_algo_is_supported(struct ub_packed_rrset_key *dnskey_rrset, size_t dnskey_idx)
See if DNSKEY algorithm is supported.
Definition: val_sigcrypt.c:382
daemon::acl
struct acl_list * acl
access control, which client IPs are allowed to connect
Definition: daemon.h:115
rpz_config_to_action
static enum rpz_action rpz_config_to_action(char *a)
RPZ action enum for config string.
Definition: rpz.c:75
add_bg_result
static void add_bg_result(struct libworker *w, struct ctx_query *q, sldns_buffer *pkt, int err, char *reason, int was_ratelimited)
add result to the bg worker result queue
Definition: libworker.c:713
acl_addr::node
struct addr_tree_node node
node in address tree
Definition: acl_list.h:90
autr_holddown_exceed
static void autr_holddown_exceed(struct module_env *env, struct trust_anchor *tp, int *c)
See if time alone makes ADDPEND to VALID transition.
Definition: autotrust.c:1958
MIN_TTL
time_t MIN_TTL
MIN TTL default for messages and rrsets.
Definition: msgreply.c:61
dtio_find_in_queue
static int dtio_find_in_queue(struct dt_io_thread *dtio, struct dt_msg_queue *mq)
find message in queue, false if no message, true if message to send
Definition: dtstream.c:431
unbound.h
tube_read_msg
int tube_read_msg(struct tube *tube, uint8_t **buf, uint32_t *len, int nonblock)
Read length bytes followed by message.
Definition: tube.c:331
dname_signame_label_count
int dname_signame_label_count(uint8_t *dname)
Count labels for the RRSIG signature label field.
Definition: dname.c:750
auth_probe::cp_is_ip6
int cp_is_ip6
is the cp for ip6 or ip4
Definition: authzone.h:344
dns64_get_funcblock
struct module_func_block * dns64_get_funcblock(void)
Get the dns64 function block.
Definition: dns64.c:1030
dump_cache
int dump_cache(RES *ssl, struct worker *worker)
Dump cache(s) to text.
Definition: cachedump.c:294
str_contains_data
static int str_contains_data(char *str, char comment)
Check if a line contains data (besides comments)
Definition: autotrust.c:261
response_type_from_server
enum response_type response_type_from_server(int rdset, struct dns_msg *msg, struct query_info *request, struct delegpt *dp)
Classifies a response message (from the wire) based on the current request.
Definition: iter_resptype.c:107
move_into_cache
static int move_into_cache(struct ub_packed_rrset_key *k, struct packed_rrset_data *d, struct worker *worker)
move entry into cache
Definition: cachedump.c:379
config_set_option
int config_set_option(struct config_file *config, const char *option, const char *value)
Set the given keyword to the given value.
Definition: config_file.c:434
reply_find_rrset_section_ns
struct ub_packed_rrset_key * reply_find_rrset_section_ns(struct reply_info *rep, uint8_t *name, size_t namelen, uint16_t type, uint16_t dclass)
Find rrset in reply, inside the authority section.
Definition: msgreply.c:787
acl_get_control
enum acl_access acl_get_control(struct acl_addr *acl)
Lookup access control status for acl structure.
Definition: acl_list.c:470
replay_var
Replay macro variable.
Definition: replay.h:397
sldns_str2wire_nsec3_salt_buf
int sldns_str2wire_nsec3_salt_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_NSEC3_SALT from string to wireformat.
Definition: str2wire.c:1923
compress_owner
static int compress_owner(struct ub_packed_rrset_key *key, sldns_buffer *pkt, struct regional *region, struct compress_tree_node **tree, size_t owner_pos, uint16_t *owner_ptr, int owner_labs)
compress owner name of RR, return RETVAL_OUTMEM RETVAL_TRUNC
Definition: msgencode.c:287
unitmain.h
daemon::cfg
struct config_file * cfg
The config settings.
Definition: daemon.h:78
sldns_wire2str_edns_dau_print
int sldns_wire2str_edns_dau_print(char **s, size_t *sl, uint8_t *data, size_t len)
Print EDNS DAU option data to string.
Definition: wire2str.c:1817
config_str3list
List of three strings for config options.
Definition: config_file.h:743
lruhash::cb_arg
void * cb_arg
user argument for user functions
Definition: lruhash.h:161
ipset_get_mem
size_t ipset_get_mem(struct module_env *env, int id)
return memory estimate for ipset module
Definition: ipset.c:363
VAL_CLASS_NAMEERROR
@ VAL_CLASS_NAMEERROR
A NXDOMAIN response.
Definition: val_utils.h:73
libworker_attach_mesh
int libworker_attach_mesh(struct ub_ctx *ctx, struct ctx_query *q, int *async_id)
Attach context_query to mesh for callback in event-driven setup.
Definition: libworker.c:665
check_auth_name_for_ssl
int check_auth_name_for_ssl(char *auth_name)
check if authname SSL functionality is available, false if not
Definition: net_help.c:1249
key_entry_copy_toregion
struct key_entry_key * key_entry_copy_toregion(struct key_entry_key *kkey, struct regional *region)
Copy a key entry, to be region-allocated.
Definition: val_kentry.c:111
order_lock::create_file
char * create_file
the creation file
Definition: lock_verify.c:75
ub_result::canonname
char * canonname
canonical name for the result (the final cname).
Definition: unbound.h:147
key_cache_get_mem
size_t key_cache_get_mem(struct key_cache *kcache)
Get memory in use by the key cache.
Definition: val_kcache.c:157
dynlibmod_deinit
void dynlibmod_deinit(struct module_env *env, int id)
dynlib module deinit
Definition: dynlibmod.c:166
sumtrees_inuse
static size_t sumtrees_inuse(struct val_neg_cache *neg)
sum up the zone trees, in_use only
Definition: unitneg.c:321
rrset_get_count
static size_t rrset_get_count(struct ub_packed_rrset_key *rrset)
return number of rrs in an rrset
Definition: val_nsec3.c:112
config_file::fast_server_permil
int fast_server_permil
percent*10, how many times in 1000 to pick from the fastest destinations
Definition: config_file.h:176
forwards_apply_cfg
int forwards_apply_cfg(struct iter_forwards *fwd, struct config_file *cfg)
Process forwards config.
Definition: iter_fwd.c:325
sldns_str2wire_hex_buf
int sldns_str2wire_hex_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_HEX from string to wireformat.
Definition: str2wire.c:1248
sldns_buffer_copy
void sldns_buffer_copy(sldns_buffer *result, sldns_buffer *from)
Copy contents of the from buffer to the result buffer and then flips the result buffer.
Definition: sbuffer.c:151
dns64_get_mem
size_t dns64_get_mem(struct module_env *env, int id)
dns64 alloc size routine
Definition: dns64.c:1009
slabhash_testdata::data
int data
data value
Definition: slabhash.h:214
LDNS_RR_TYPE_CDNSKEY
@ LDNS_RR_TYPE_CDNSKEY
RFC 7344.
Definition: rrdef.h:195
INIT_REQUEST_2_STATE
@ INIT_REQUEST_2_STATE
Root priming events reactivate here, most other events pass through this naturally as the 2nd part of...
Definition: iterator.h:181
iter_qstate::outlist
struct outbound_list outlist
list of pending queries to authoritative servers.
Definition: iterator.h:379
config_file::dns64_ignore_aaaa
struct config_strlist * dns64_ignore_aaaa
ignore AAAAs for these domain names and use A record anyway
Definition: config_file.h:480
config_auth::masters
struct config_strlist * masters
list of masters
Definition: config_file.h:660
local_zones_find_le
struct local_zone * local_zones_find_le(struct local_zones *zones, uint8_t *name, size_t len, int labs, uint16_t dclass, int *exact)
Find zone that with exactly or smaller name/class User must lock the tree or result zone.
Definition: localzone.c:1147
xfr_transfer_move_to_next_lookup
static void xfr_transfer_move_to_next_lookup(struct auth_xfer *xfr, struct module_env *env)
move to the next lookup of hostname for task_transfer
Definition: authzone.c:3765
local_encode
static int local_encode(struct query_info *qinfo, struct module_env *env, struct edns_data *edns, struct comm_reply *repinfo, sldns_buffer *buf, struct regional *temp, struct ub_packed_rrset_key *rrset, int ansec, int rcode)
encode answer consisting of 1 rrset
Definition: localzone.c:1196
rbtree_first
rbnode_type * rbtree_first(rbtree_type *rbtree)
Returns first (smallest) node in the tree.
Definition: rbtree.c:549
replay_moment::repevt_infra_rtt
@ repevt_infra_rtt
store infra rtt cache entry: addr and string (int)
Definition: replay.h:214
alloc_special_clean
#define alloc_special_clean(x)
clean the special type.
Definition: alloc.h:58
sldns_buffer_capacity
INLINE size_t sldns_buffer_capacity(sldns_buffer *buffer)
returns the number of bytes the buffer can hold.
Definition: sbuffer.h:297
MIN_TTL
time_t MIN_TTL
Minimum TTL that is allowed.
Definition: msgreply.c:61
order_lock_cmp
int order_lock_cmp(const void *e1, const void *e2)
Due to module breakage by fptr wlist, these test app declarations are presented here.
Definition: unbound-dnstap-socket.c:1568
lz_nodefault
static int lz_nodefault(struct config_file *cfg, const char *name)
lookup a zone in cfg->nodefault list
Definition: localzone.c:738
forwards_add_zone
int forwards_add_zone(struct iter_forwards *fwd, uint16_t c, struct delegpt *dp)
Add zone to forward structure.
Definition: iter_fwd.c:472
addrtree_create
struct addrtree * addrtree_create(addrlen_t max_depth, void(*delfunc)(void *, void *), size_t(*sizefunc)(void *), void *env, uint32_t max_node_count)
Create a new tree.
Definition: addrtree.c:121
az_domain_create
static struct auth_data * az_domain_create(struct auth_zone *z, uint8_t *nm, size_t nmlen)
create domain with the given name
Definition: authzone.c:585
dns_copy_msg
struct dns_msg * dns_copy_msg(struct dns_msg *from, struct regional *region)
Copy a dns_msg to this regional.
Definition: iter_utils.c:638
read_acl_tag_datas
static int read_acl_tag_datas(struct acl_list *acl, struct config_file *cfg)
read acl tag datas config
Definition: acl_list.c:414
sldns_str2wire_ilnp64_buf
int sldns_str2wire_ilnp64_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_ILNP64 from string to wireformat.
Definition: str2wire.c:1949
LDNS_RR_TYPE_EUI48
@ LDNS_RR_TYPE_EUI48
draft-jabley-dnsext-eui48-eui64-rrtypes
Definition: rrdef.h:212
perfio::id
size_t id
id number
Definition: perf.c:133
TCP_QUERY_TIMEOUT_MINIMUM
#define TCP_QUERY_TIMEOUT_MINIMUM
The minimum actual TCP timeout to use, regardless of what we advertise, in msec.
Definition: netevent.c:91
val_neg_cache::num_neg_cache_nxdomain
size_t num_neg_cache_nxdomain
number of times neg cache records were used to generate NXDOMAIN responses.
Definition: val_neg.h:88
delegpt_addr::addr
struct sockaddr_storage addr
delegation point address
Definition: iter_delegpt.h:141
ub_ctx_add_ta
int ub_ctx_add_ta(struct ub_ctx *ctx, const char *ta)
Add a trust anchor to the given context.
Definition: libunbound.c:390
val_nsec_proves_no_wc
int val_nsec_proves_no_wc(struct ub_packed_rrset_key *nsec, uint8_t *qname, size_t qnamelen)
Determine if the given NSEC proves that a wildcard match does not exist.
Definition: val_nsec.c:510
outside_network::unused_fds
struct port_comm * unused_fds
linked list of available commpoints, unused file descriptors, for use as outgoing UDP ports.
Definition: outside_network.h:102
listen_type_tcp
@ listen_type_tcp
tcp type
Definition: listen_dnsport.h:87
pythonmod_env::func_deinit
PyObject * func_deinit
Module deinit function.
Definition: pythonmod.c:90
tcp_proxy
List of TCP proxy fd pairs to TCP connect client to server.
Definition: delayer.c:116
iter_indicates_dnssec
int iter_indicates_dnssec(struct module_env *env, struct delegpt *dp, struct dns_msg *msg, uint16_t dclass)
See if delegation is expected to have DNSSEC information (RRSIGs) in its answers, or not.
Definition: iter_utils.c:799
do_view_datas_remove
static void do_view_datas_remove(RES *ssl, struct worker *worker, char *arg)
Remove RR data from stdin from view.
Definition: remote.c:1509
SQ
#define SQ
what to put on statistics lines between var and value, ": " or "="
Definition: remote.c:107
anchor_new_ta_key
static struct ta_key * anchor_new_ta_key(uint8_t *rdata, size_t rdata_len, uint16_t type)
create new trustanchor key
Definition: val_anchor.c:274
config_file::qname_minimisation_strict
int qname_minimisation_strict
minimise QNAME in strict mode, minimise according to RFC.
Definition: config_file.h:550
rrset_ref
Information to reference an rrset.
Definition: msgreply.h:104
optind
int optind
getopt global, in case header files fail to declare it.
sldns_struct_rr_descriptor::_wireformat
const sldns_rdf_type * _wireformat
Wireformat specification for the rr, i.e.
Definition: rrdef.h:460
VAL_INIT_STATE
@ VAL_INIT_STATE
initial state for validation
Definition: validator.h:133
fptr_whitelist_alloc_cleanup
int fptr_whitelist_alloc_cleanup(void(*fptr)(void *))
Check function pointer whitelist for alloc clear on id overflow call values.
Definition: fptr_wlist.c:560
iter_scrub.h
set_next_probe
static int set_next_probe(struct module_env *env, struct trust_anchor *tp, struct ub_packed_rrset_key *dnskey_rrset)
set next probe for trust anchor
Definition: autotrust.c:2046
ta_is_dnskey_sep
static int ta_is_dnskey_sep(struct autr_ta *ta)
Check if TA is KSK DNSKEY.
Definition: autotrust.c:298
sldns_buffer::_fixed
unsigned _fixed
If the buffer is fixed it cannot be resized.
Definition: sbuffer.h:131
ub_ctx_err
ub_ctx_err
The error constants.
Definition: context.h:182
pythonmod_env::func_init
PyObject * func_init
Module init function.
Definition: pythonmod.c:88
rrset_canonical_sort_cmp
static int rrset_canonical_sort_cmp(const void *x, const void *y)
compare rrsets and sort canonically.
Definition: iter_utils.c:946
lruhash_deldatafunc_type
void(* lruhash_deldatafunc_type)(void *, void *)
old data is deleted.
Definition: lruhash.h:138
dname_pkt_compare
int dname_pkt_compare(struct sldns_buffer *pkt, uint8_t *d1, uint8_t *d2)
Compare dnames in packet (compressed).
Definition: dname.c:233
cb_pair
Definition: dynlibmod.h:95
addrtree::size_bytes
size_t size_bytes
Size of tree in bytes.
Definition: addrtree.h:74
moment_assign
static void moment_assign(struct replay_runtime *runtime, struct replay_moment *mom)
pass time
Definition: fake_event.c:529
unittest_wrapper_addrtree_cmpbit
int unittest_wrapper_addrtree_cmpbit(const addrkey_t *key1, const addrkey_t *key2, addrlen_t n)
Wrappers for static functions to unit test.
Definition: addrtree.c:517
outbound_list
The outbound list.
Definition: outbound_list.h:52
respip_global_apply_cfg
int respip_global_apply_cfg(struct respip_set *set, struct config_file *cfg)
Apply response-ip config settings to the global (default) view.
Definition: respip.c:398
pkt_hash_rrset_first
static hashvalue_type pkt_hash_rrset_first(sldns_buffer *pkt, uint8_t *dname)
create partial dname hash for rrset hash
Definition: msgparse.c:182
RET_ERR_SHIFT
#define RET_ERR_SHIFT(e, move)
Move parse error but keep its ID.
Definition: str2wire.c:31
set_tp_times
static void set_tp_times(struct trust_anchor *tp, time_t rrsig_exp_interval, time_t origttl, int *changed)
update the time values for the trustpoint
Definition: autotrust.c:1469
comm_point_create_tcp_out
struct comm_point * comm_point_create_tcp_out(struct comm_base *base, size_t bufsize, comm_point_callback_type *callback, void *callback_arg)
Create an outgoing TCP commpoint.
Definition: netevent.c:2809
mesh_state_ref::s
struct mesh_state * s
the mesh state
Definition: mesh.h:210
dump_msg_ref
static int dump_msg_ref(RES *ssl, struct ub_packed_rrset_key *k)
dump message to rrset reference
Definition: cachedump.c:140
parse_create_msg
int parse_create_msg(sldns_buffer *pkt, struct msg_parse *msg, struct alloc_cache *alloc, struct query_info *qinf, struct reply_info **rep, struct regional *region)
Allocate and decompress parsed message and rrsets.
Definition: msgreply.c:441
http_chunked_segment
static int http_chunked_segment(struct comm_point *c)
handle nonchunked data segment, return 0=fail, 1=wait, 2=process more
Definition: netevent.c:2116
sldns_buffer::_data
uint8_t * _data
The data contained in the buffer.
Definition: sbuffer.h:128
listen_type_udpancil
@ listen_type_udpancil
udp ipv6 (v4mapped) for use with ancillary data
Definition: listen_dnsport.h:89
sldns_rr_dnskey_key_size_raw
size_t sldns_rr_dnskey_key_size_raw(const unsigned char *keydata, const size_t len, int alg)
get the length of the keydata in bits
Definition: keyraw.c:38
packed_rrset_ttl_add
void packed_rrset_ttl_add(struct packed_rrset_data *data, time_t add)
Fixup TTLs in fixed data packed_rrset_data blob.
Definition: packed_rrset.c:219
chunk_rrlist_gonext
static void chunk_rrlist_gonext(struct auth_chunk **rr_chunk, int *rr_num, size_t *rr_pos, size_t rr_nextpos)
RR list iterator, move to next RR.
Definition: authzone.c:4443
iter_qstate::response
struct dns_msg * response
The response.
Definition: iterator.h:251
ub_openssl_lock_init
int ub_openssl_lock_init(void)
Initialize openssl locking for thread safety.
Definition: net_help.c:1334
optind
int optind
getopt global, in case header files fail to declare it.
delete_fake_pending
static void delete_fake_pending(struct fake_pending *pend)
delete a fake pending
Definition: fake_event.c:174
iter_hints
Iterator hints structure.
Definition: iter_hints.h:53
infra_sizefunc
size_t infra_sizefunc(void *k, void *d)
calculate size for the hashtable, does not count size of lameness, so the hashtable is a fixed number...
dnsc_nonces_lookup
static struct lruhash_entry * dnsc_nonces_lookup(struct slabhash *cache, const uint8_t nonce[crypto_box_HALF_NONCEBYTES], const uint8_t magic_query[DNSCRYPT_MAGIC_HEADER_LEN], const uint8_t pk[crypto_box_PUBLICKEYBYTES], uint32_t hash)
Lookup a record in nonces_cache.
Definition: dnscrypt.c:215
key_entry_compfunc
int key_entry_compfunc(void *k1, void *k2)
function for lruhash operation
Definition: val_kentry.c:68
xml_data
XML parse private data during the parse.
Definition: unbound-anchor.c:1193
dynlibmod_clear
void dynlibmod_clear(struct module_qstate *qstate, int id)
dynlib module cleanup query state
Definition: dynlibmod.c:194
xfr_process_notify
static void xfr_process_notify(struct auth_xfer *xfr, struct module_env *env, int has_serial, uint32_t serial, struct auth_master *fromhost)
process a notify serial, start new probe or note serial.
Definition: authzone.c:3543
config_file::dnscrypt_port
int dnscrypt_port
port on which to provide dnscrypt service
Definition: config_file.h:560
LDNS_RDF_TYPE_NONE
@ LDNS_RDF_TYPE_NONE
none
Definition: rrdef.h:266
sldns_wirerr_get_ttl
uint32_t sldns_wirerr_get_ttl(uint8_t *rr, size_t len, size_t dname_len)
Get the ttl of the RR.
Definition: str2wire.c:812
serviced_query::retry
int retry
number of UDP retries
Definition: outside_network.h:380
key_cache_obtain
struct key_entry_key * key_cache_obtain(struct key_cache *kcache, uint8_t *name, size_t namelen, uint16_t key_class, struct regional *region, time_t now)
Lookup key entry in the cache.
Definition: val_kcache.c:128
outnet_serviced_query
struct serviced_query * outnet_serviced_query(struct outside_network *outnet, struct query_info *qinfo, uint16_t flags, int dnssec, int want_dnssec, int nocaps, int tcp_upstream, int ssl_upstream, char *tls_auth_name, struct sockaddr_storage *addr, socklen_t addrlen, uint8_t *zone, size_t zonelen, struct module_qstate *qstate, comm_point_callback_type *callback, void *callback_arg, sldns_buffer *buff, struct module_env *env)
Perform a serviced query to the authoritative servers.
Definition: outside_network.c:2104
ub_packed_rrset_key::id
rrset_id_type id
the ID of this rrset.
Definition: packed_rrset.h:122
local_zone::region
struct regional * region
in this region the zone's data is allocated.
Definition: localzone.h:152
val_get_funcblock
struct module_func_block * val_get_funcblock(void)
Get the validator function block.
Definition: validator.c:3274
iter_scrub_ds
void iter_scrub_ds(struct dns_msg *msg, struct ub_packed_rrset_key *ns, uint8_t *z)
Remove DS records that are inappropriate before they are cached.
Definition: iter_utils.c:1243
module_env::auth_zones
struct auth_zones * auth_zones
auth zones
Definition: module.h:498
neg_params_ok
static int neg_params_ok(struct val_neg_zone *zone, struct ub_packed_rrset_key *rrset)
check nsec3 parameters on nsec3 rrset with current zone values
Definition: val_neg.c:1302
msg_parse::qclass
uint16_t qclass
query class, host order.
Definition: msgparse.h:124
rrset_parse::rrset_all_next
struct rrset_parse * rrset_all_next
next in list of all rrsets
Definition: msgparse.h:145
check_auth
static void check_auth(struct config_file *cfg)
check auth zones
Definition: unbound-checkconf.c:852
anchor_list_keytags
size_t anchor_list_keytags(struct trust_anchor *ta, uint16_t *list, size_t num)
Get a list of keytags for the trust anchor.
Definition: val_anchor.c:1288
ctx_query::cb_event
ub_event_callback_type cb_event
for event callbacks the type is ub_event_callback_type
Definition: context.h:161
sldns_wire2str_rcode
char * sldns_wire2str_rcode(int rcode)
Convert wire packet rcode to a string, 'NOERROR', 'NXDOMAIN'...
Definition: wire2str.c:240
daemon_fork
void daemon_fork(struct daemon *daemon)
Fork workers and start service.
Definition: daemon.c:571
check_lru_table
static void check_lru_table(struct lruhash *table)
check integrity of hash table
Definition: unitslabhash.c:151
sldns_str2wire_class_buf
int sldns_str2wire_class_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_CLASS from string to wireformat.
Definition: str2wire.c:1352
signit
static void signit(ldns_rr_list *rrs, ldns_key_list *keys)
sign the rrs with the keys
Definition: signit.c:198
tap_socket::ev_added
int ev_added
has the event been added
Definition: unbound-dnstap-socket.c:147
checkzonetree
static void checkzonetree(struct val_neg_zone *zone)
check if tree of data in zone is valid
Definition: unitneg.c:417
sldns_str2wire_aaaa_buf
int sldns_str2wire_aaaa_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_AAAA from string to wireformat.
Definition: str2wire.c:1077
val_neg_data::node
rbnode_type node
rbtree node element, key is this struct: the name
Definition: val_neg.h:144
LDNS_RR_TYPE_MR
@ LDNS_RR_TYPE_MR
a mail rename domain name (EXPERIMENTAL)
Definition: rrdef.h:101
key_entry_set_reason
void key_entry_set_reason(struct key_entry_key *kkey, char *reason)
Set reason why a key is bad.
Definition: val_kentry.c:241
name_tree_node
Tree of domain names.
Definition: dnstree.h:55
rr_tests
static void rr_tests(void)
read rrs to and from string, to and from wireformat
Definition: unitldns.c:209
trust_anchor::ds_rrset
struct ub_packed_rrset_key * ds_rrset
the DS RRset
Definition: val_anchor.h:118
netblockstrtoaddr
int netblockstrtoaddr(const char *str, int port, struct sockaddr_storage *addr, socklen_t *addrlen, int *net)
Convert ip netblock (ip/netsize) string and port to sockaddr.
Definition: net_help.c:285
dname_strict_subdomain
int dname_strict_subdomain(uint8_t *d1, int labs1, uint8_t *d2, int labs2)
See if domain name d1 is a strict subdomain of d2.
Definition: dname.c:679
cfg_uid
uid_t cfg_uid
from cfg username, after daemonize setup performed
Definition: config_file.c:74
dt_io_thread::cur_msg
void * cur_msg
the buffer that currently getting written, or NULL if no (partial) message written now
Definition: dtstream.h:160
sldns_fskipcs
void sldns_fskipcs(FILE *fp, const char *s)
skips all of the characters in the given string in the fp, moving the position to the first character...
Definition: parse.c:419
sldns_str2wire_alg_buf
int sldns_str2wire_alg_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_ALG from string to wireformat.
Definition: str2wire.c:1386
FLAGS_GET_RCODE
#define FLAGS_GET_RCODE(f)
get RCODE bits from uint16 flags
Definition: net_help.h:73
local_zone::type
enum localzone_type type
how to process zone
Definition: localzone.h:141
val_anchor.h
module_func_block
Module functionality block.
Definition: module.h:671
is_dir
static int is_dir(const char *fname)
true if fname is a directory
Definition: unbound-checkconf.c:421
do_list_local_zones
static void do_list_local_zones(RES *ssl, struct local_zones *zones)
do the list_local_zones command
Definition: remote.c:2691
do_flush_negative
static void do_flush_negative(RES *ssl, struct worker *worker)
remove all negative(NODATA,NXDOMAIN), and servfail messages from cache
Definition: remote.c:1889
macro_lookup
char * macro_lookup(rbtree_type *store, char *name)
Look up a macro value.
Definition: replay.c:893
rrset_parse
Data stored for an rrset during parsing.
Definition: msgparse.h:141
tcp_req_open_item
List of open items in TCP channel.
Definition: listen_dnsport.h:278
config_file::harden_short_bufsize
int harden_short_bufsize
harden against very small edns buffer sizes
Definition: config_file.h:248
auth_xfer_delete
void auth_xfer_delete(struct auth_xfer *xfr)
delete xfer structure (not its tree entry)
Definition: authzone.c:2080
config_delstubs
void config_delstubs(struct config_stub *list)
Delete items in config stub list.
Definition: config_file.c:1360
remote_read
static int remote_read(SSL *ssl, int fd, char *buf, size_t len)
read from ssl or fd, fatalexit on error, 0 EOF, 1 success
Definition: unbound-control.c:664
DSNS_FIND_STATE
@ DSNS_FIND_STATE
Find NS record to resolve DS record from, walking to the right NS spot until we find it.
Definition: iterator.h:212
readfile
static void readfile(rbtree_type *tree, const char *fname)
read the logfile
Definition: memstats.c:190
local_zone_override::type
enum localzone_type type
override for local zone type
Definition: localzone.h:194
auth_xfer_transfer_lookup_callback
void auth_xfer_transfer_lookup_callback(void *arg, int rcode, sldns_buffer *buf, enum sec_status ATTR_UNUSED(sec), char *ATTR_UNUSED(why_bogus), int ATTR_UNUSED(was_ratelimited))
callback for task_transfer lookup of host name, of A or AAAA
Definition: authzone.c:5344
dnskey_calc_keytag
uint16_t dnskey_calc_keytag(struct ub_packed_rrset_key *dnskey_rrset, size_t dnskey_idx)
Get dnskey keytag, footprint value.
Definition: val_sigcrypt.c:373
parse_extract_edns
int parse_extract_edns(struct msg_parse *msg, struct edns_data *edns, struct regional *region)
After parsing the packet, extract EDNS data from packet.
Definition: msgparse.c:967
qlist_add_line
static void qlist_add_line(struct perfinfo *info, char *line, int no)
setup query list in info
Definition: perf.c:531
alloc_clear_special_list
static void alloc_clear_special_list(struct alloc_cache *alloc)
free the special list
Definition: alloc.c:131
sldns_wireparse_errors
sldns_lookup_table * sldns_wireparse_errors
error string from wireparse
Definition: wire2str.c:154
FLAGS_SET_RCODE
#define FLAGS_SET_RCODE(f, r)
set RCODE bits in uint16 flags
Definition: net_help.h:75
serviced_tcp_callback
int serviced_tcp_callback(struct comm_point *c, void *arg, int error, struct comm_reply *rep)
TCP reply or error callback for serviced queries.
Definition: outside_network.c:1803
rtt_timeout
int rtt_timeout(const struct rtt_info *rtt)
Get timeout to use for sending a UDP packet.
Definition: rtt.c:72
codeline::alloc
uint64_t alloc
number of bytes allocated
Definition: memstats.c:60
val_neg_data_compare
int val_neg_data_compare(const void *a, const void *b)
Comparison function for rbtree val neg data elements.
Definition: val_neg.c:65
edns_opt_list_free
void edns_opt_list_free(struct edns_option *list)
Free edns option list allocated with malloc.
Definition: msgreply.c:1206
sldns_b32_pton_calculate_size
size_t sldns_b32_pton_calculate_size(size_t src_text_length)
calculates the size needed to store the result of b32_pton
Definition: parseutil.c:454
tube_create
struct tube * tube_create(void)
Create a pipe.
Definition: tube.c:57
serviced_cmp
int serviced_cmp(const void *key1, const void *key2)
compare function of serviced query rbtree
Definition: outside_network.c:106
fatal_exit
void fatal_exit(const char *format,...)
implementation of fatal_exit
Definition: log.c:341
comm_point_get_mem
size_t comm_point_get_mem(struct comm_point *c)
Get size of memory used by comm point.
Definition: netevent.c:3263
auth_xfer::retry
time_t retry
retry time (from SOA), time to wait with next_probe if no master responds
Definition: authzone.h:259
addrtree_find
struct addrnode * addrtree_find(struct addrtree *tree, const addrkey_t *addr, addrlen_t sourcemask, time_t now)
Find a node containing an element in the tree.
Definition: addrtree.c:474
lock_ref
reference to a lock in a rbtree set
Definition: lock_verify.c:90
cachedb_deinit
void cachedb_deinit(struct module_env *env, int id)
Deinit the cachedb module.
do_macro_recursion
static char * do_macro_recursion(rbtree_type *store, struct replay_runtime *runtime, char *at, size_t remain)
do macro recursion
Definition: replay.c:630
domain_limit_findcreate
static struct domain_limit_data * domain_limit_findcreate(struct infra_cache *infra, char *name)
find or create element in domainlimit tree
Definition: infra.c:152
ub_event_set_fd
void ub_event_set_fd(struct ub_event *, int fd)
Change or set the file descriptor on the event.
Definition: ub_event.c:374
tap_receive
static ssize_t tap_receive(struct tap_data *data, void *buf, size_t len)
receive bytes on the tap connection, prints errors if bad, returns 0: closed/error,...
Definition: unbound-dnstap-socket.c:748
infra_delete
void infra_delete(struct infra_cache *infra)
Delete infra cache.
Definition: infra.c:282
server_stats_prefetch
void server_stats_prefetch(struct ub_server_stats *stats, struct worker *worker)
add query if was cached and also resulted in a prefetch
Definition: stats.c:101
check_formerr_gone
static int check_formerr_gone
do not accept formerr
Definition: unitmsgparse.c:61
dt_io_thread::io_list
struct dt_io_list_item * io_list
list of queues that is registered to get written
Definition: dtstream.h:122
key_entry_data::reason
char * reason
not NULL sometimes to give reason why bogus
Definition: val_kentry.h:82
comm_point::comm_local
@ comm_local
AF_UNIX socket - for internal commands.
Definition: netevent.h:235
skip_ttl_rdata
static int skip_ttl_rdata(sldns_buffer *pkt)
skip rr ttl and rdata
Definition: msgparse.c:692
config_stub::hosts
struct config_strlist * hosts
list of stub nameserver hosts (domain name)
Definition: config_file.h:638
ub_server_stats::num_neg_cache_nxdomain
long long num_neg_cache_nxdomain
number of times neg cache records were used to generate NXDOMAIN responses.
Definition: unbound.h:782
ALLOC_SPECIAL_MAX
#define ALLOC_SPECIAL_MAX
how many blocks to cache locally.
Definition: alloc.h:66
send_eof
static void send_eof(SSL *ssl, int fd)
send end-of-file marker to server
Definition: unbound-control.c:746
local_zones_zone_answer
int local_zones_zone_answer(struct local_zone *z, struct module_env *env, struct query_info *qinfo, struct edns_data *edns, struct comm_reply *repinfo, sldns_buffer *buf, struct regional *temp, struct local_data *ld, enum localzone_type lz_type)
Answer using the local zone only (not local data used).
Definition: localzone.c:1518
dnskey_get_flags
uint16_t dnskey_get_flags(struct ub_packed_rrset_key *k, size_t idx)
Get DNSKEY RR flags.
Definition: val_sigcrypt.c:147
prog_name
static const char * prog_name
string to show in warnings and errors
Definition: testpkts.c:41
acl_refuse_non_local
@ acl_refuse_non_local
disallow access to zones that aren't local, 'REFUSED' reply
Definition: acl_list.h:62
waiting_tcp
Query waiting for TCP buffer.
Definition: outside_network.h:269
ds_response_to_ke
static int ds_response_to_ke(struct module_qstate *qstate, struct val_qstate *vq, int id, int rcode, struct dns_msg *msg, struct query_info *qinfo, struct key_entry_key **ke)
In inform supers, with the resulting message and rcode and the current keyset in the super state,...
Definition: validator.c:2659
module_finished
@ module_finished
module is finished with query
Definition: module.h:547
uitoa
static int uitoa(unsigned n, char *s)
Convert an unsigned integer to a string.
Definition: dns64.c:177
alloc_get_id
uint64_t alloc_get_id(struct alloc_cache *alloc)
Set ID number of special type to a fresh new ID number.
Definition: alloc.c:195
main
int main(int argc, char *argv[])
main program to verify all traces passed
Definition: lock_verify.c:392
libworker::want_quit
int want_quit
want to quit, stop handling new content
Definition: libworker.h:79
infra_get_lame_rtt
int infra_get_lame_rtt(struct infra_cache *infra, struct sockaddr_storage *addr, socklen_t addrlen, uint8_t *name, size_t namelen, uint16_t qtype, int *lame, int *dnsseclame, int *reclame, int *rtt, time_t timenow)
Get Lameness information and average RTT if host is in the cache.
Definition: infra.c:672
chunkline_get_line
static int chunkline_get_line(struct auth_chunk **chunk, size_t *chunk_pos, sldns_buffer *buf)
read one line from chunks into buffer at current position
Definition: authzone.c:4112
log_time_asc
static int log_time_asc
print time in UTC or in secondsfrom1970
Definition: log.c:83
auth_xfer::allow_notify_list
struct auth_master * allow_notify_list
the list of masters for checking notifies.
Definition: authzone.h:245
rrset_array_lock
int rrset_array_lock(struct rrset_ref *ref, size_t count, time_t timenow)
Obtain readlock on a (sorted) list of rrset references.
Definition: rrset.c:307
comm_point_tcp_handle_read
static int comm_point_tcp_handle_read(int fd, struct comm_point *c, int short_ok)
Handle tcp reading callback.
Definition: netevent.c:1412
config_file::prefer_ip6
int prefer_ip6
prefer ip6 upstream queries.
Definition: config_file.h:91
iter_forward_zone::namelen
size_t namelen
length of name
Definition: iter_fwd.h:72
comm_point_delete
void comm_point_delete(struct comm_point *c)
Close and deallocate (free) the comm point.
Definition: netevent.c:3100
anchors_delete_insecure
void anchors_delete_insecure(struct val_anchors *anchors, uint16_t c, uint8_t *nm)
Delete insecure point trust anchor.
Definition: val_anchor.c:1241
perfinfo::qlist_data
uint8_t ** qlist_data
list of query packets (data)
Definition: perf.c:123
val_neg_cache::num_neg_cache_noerror
size_t num_neg_cache_noerror
number of times neg cache records were used to generate NOERROR responses.
Definition: val_neg.h:85
config_file::stat_extended
int stat_extended
if true, the statistics are kept in greater detail
Definition: config_file.h:77
log_addr
void log_addr(enum verbosity_value v, const char *str, struct sockaddr_storage *addr, socklen_t addrlen)
Prints the sockaddr in readable format with log_info.
Definition: net_help.c:189
perfinfo::buf
sldns_buffer * buf
all purpose buffer (for UDP send and receive)
Definition: perf.c:81
ub_ctx_set_event
int ub_ctx_set_event(struct ub_ctx *ctx, struct event_base *base)
Set a new libevent event_base on a context created with ub_ctx_create_event.
Definition: libunbound.c:1386
local_zones_answer
int local_zones_answer(struct local_zones *zones, struct module_env *env, struct query_info *qinfo, struct edns_data *edns, sldns_buffer *buf, struct regional *temp, struct comm_reply *repinfo, uint8_t *taglist, size_t taglen, uint8_t *tagactions, size_t tagactionssize, struct config_strlist **tag_datas, size_t tag_datas_size, char **tagname, int num_tags, struct view *view)
Answer authoritatively for local zones.
Definition: localzone.c:1652
addr_is_broadcast
int addr_is_broadcast(struct sockaddr_storage *addr, socklen_t addrlen)
See if sockaddr is 255.255.255.255.
Definition: net_help.c:759
fptr_whitelist_start_accept
int fptr_whitelist_start_accept(void(*fptr)(void *))
Check function pointer whitelist for start_accept callback values.
Definition: fptr_wlist.c:151
rrset_trust_to_string
const char * rrset_trust_to_string(enum rrset_trust s)
Get a printable string for a rrset trust value.
Definition: packed_rrset.c:229
xml_data::calgo
BIO * calgo
the current anchor: Algorithm
Definition: unbound-anchor.c:1212
acl_addr::control
enum acl_access control
access control on this netblock
Definition: acl_list.h:92
main
int main(int argc, char **argv)
Remove service main.
Definition: unbound-service-remove.c:50
test_buffers
static int test_buffers(sldns_buffer *pkt, sldns_buffer *out)
see if buffers contain the same packet
Definition: unitmsgparse.c:71
perfinfo::total_recv
size_t total_recv
total number recvd
Definition: perf.c:103
dname_is_wild
int dname_is_wild(uint8_t *dname)
Return true if the label is a wildcard, *.example.com.
Definition: dname.c:769
fptr_whitelist_mod_deinit
int fptr_whitelist_mod_deinit(void(*fptr)(struct module_env *env, int id))
Check function pointer whitelist for module deinit call values.
Definition: fptr_wlist.c:417
az_remove_rr_decompress
static int az_remove_rr_decompress(struct auth_zone *z, uint8_t *pkt, size_t pktlen, struct sldns_buffer *scratch_buffer, uint8_t *dname, uint16_t rr_type, uint16_t rr_class, uint32_t rr_ttl, uint8_t *rr_data, uint16_t rr_rdlen, int *nonexist)
remove RR from zone, from packet, decompress RR, if nonexist is nonNULL set the flag but otherwise ig...
Definition: authzone.c:1435
perfendstats
static void perfendstats(struct perfinfo *info)
show end stats
Definition: perf.c:414
log_nametypeclass
void log_nametypeclass(enum verbosity_value v, const char *str, uint8_t *name, uint16_t type, uint16_t dclass)
Print string with neat domain name, type and class.
Definition: net_help.c:481
sldns_enum_rr_class
sldns_enum_rr_class
The different RR classes.
Definition: rrdef.h:50
ub_default_event_base
struct ub_event_base * ub_default_event_base(int sigs, time_t *time_secs, struct timeval *time_tv)
Return a default event base.
Definition: ub_event_pluggable.c:351
pkt_rrsig_covered
static int pkt_rrsig_covered(sldns_buffer *pkt, uint8_t *here, uint16_t *type)
return type networkformat that rrsig in packet covers
Definition: msgparse.c:237
lruhash::num
size_t num
the number of entries in the hash table.
Definition: lruhash.h:176
lruhash_test
void lruhash_test(void)
unit test lruhashtable implementation
Definition: unitlruhash.c:480
worker_start_accept
void worker_start_accept(void *arg)
start accept callback handler
Definition: worker.c:2035
sldns_wire2str_str_scan
int sldns_wire2str_str_scan(uint8_t **d, size_t *dl, char **s, size_t *sl)
Scan wireformat str field to string, with user buffers.
Definition: wire2str.c:1137
read_http_headers
static int read_http_headers(SSL *ssl, char *file, size_t flen, char *host, size_t hlen, int *vs)
read http headers and process them
Definition: petal.c:215
anchors_delete
void anchors_delete(struct val_anchors *anchors)
Delete trust anchor storage.
Definition: val_anchor.c:140
sldns_wire2str_alg_scan
int sldns_wire2str_alg_scan(uint8_t **d, size_t *dl, char **s, size_t *sl)
Scan wireformat alg field to string, with user buffers.
Definition: wire2str.c:1335
dnstree.h
test_thr_main
static void * test_thr_main(void *arg)
main routine for threaded hash table test
Definition: unitlruhash.c:432
resolve_host_ip
static void resolve_host_ip(struct ub_ctx *ctx, const char *host, int port, int tp, int cl, struct ip_list **head)
Resolve name, type, class and add addresses to iplist.
Definition: unbound-anchor.c:548
sock_list_find
int sock_list_find(struct sock_list *list, struct sockaddr_storage *addr, socklen_t len)
Find addr in list.
Definition: net_help.c:809
auth_zone_read_zonefile
int auth_zone_read_zonefile(struct auth_zone *z, struct config_file *cfg)
read auth zone from zonefile.
Definition: authzone.c:1562
add_empty_default
static int add_empty_default(struct local_zones *zones, struct config_file *cfg, const char *name)
enter (AS112) empty default zone
Definition: localzone.c:757
ratelimit_list_arg::now
time_t now
current time
Definition: remote.c:2791
do_get_option
static void do_get_option(RES *ssl, struct worker *worker, char *arg)
do the get_option command
Definition: remote.c:2593
sldns_str2wire_rr_question_buf
int sldns_str2wire_rr_question_buf(const char *str, uint8_t *rr, size_t *len, size_t *dname_len, uint8_t *origin, size_t origin_len, uint8_t *prev, size_t prev_len)
Same as sldns_str2wire_rr_buf, but there is no rdata, it returns an RR with zero rdata and no ttl.
Definition: str2wire.c:790
config_file::incoming_num_tcp
size_t incoming_num_tcp
number of incoming tcp buffers per (per thread)
Definition: config_file.h:139
config_create_forlib
struct config_file * config_create_forlib(void)
Create config file structure for library use.
Definition: config_file.c:356
check_rrsigs
static int check_rrsigs
see if RRSIGs are properly matched to RRsets.
Definition: unitmsgparse.c:65
sldns_serial_arithmetics_gmtime_r
struct tm * sldns_serial_arithmetics_gmtime_r(int32_t time, time_t now, struct tm *result)
The function interprets time as the number of seconds since epoch with respect to now using serial ar...
Definition: parseutil.c:175
auth_zone::lock
lock_rw_type lock
lock on the data in the structure For the node, parent, name, namelen, namelabs, dclass,...
Definition: authzone.h:114
dns_msg_create
struct dns_msg * dns_msg_create(uint8_t *qname, size_t qnamelen, uint16_t qtype, uint16_t qclass, struct regional *region, size_t capacity)
Utility, create new, unpacked data structure for cache response.
Definition: dns.c:408
add_item
static void add_item(struct val_neg_cache *neg)
add a random item
Definition: unitneg.c:195
sldns_str2wire_nsec_buf
int sldns_str2wire_nsec_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_NSEC from string to wireformat.
Definition: str2wire.c:1277
config_response_ip_data
static addr_data_t config_response_ip_data[]
Dataset used to test redirect rrset initialization for both global and per-view respip redirect confi...
Definition: unitmain.c:736
auth_zones_find_or_add_zone
static struct auth_zone * auth_zones_find_or_add_zone(struct auth_zones *az, char *name)
find or create zone with name str.
Definition: authzone.c:518
perform_data_remove
static int perform_data_remove(RES *ssl, struct local_zones *zones, char *arg)
Remove RR data.
Definition: remote.c:1340
RR_to_ip
static struct ip_list * RR_to_ip(int tp, char *data, int len, int port)
create ip_list entry for a RR record
Definition: unbound-anchor.c:510
port_comm::pif
struct port_if * pif
interface it is used in
Definition: outside_network.h:205
rrset_cache_update_wildcard
void rrset_cache_update_wildcard(struct rrset_cache *rrset_cache, struct ub_packed_rrset_key *rrset, uint8_t *ce, size_t ce_len, struct alloc_cache *alloc, time_t timenow)
Update or add an rrset in the rrset cache using a wildcard dname.
Definition: rrset.c:241
rrset_get_rdata
static void rrset_get_rdata(struct ub_packed_rrset_key *k, size_t idx, uint8_t **rdata, size_t *len)
get rdata pointer and size
Definition: val_sigcrypt.c:137
pr_rrs
static void pr_rrs(sldns_buffer *buf, struct reply_info *rep)
print RRs to string
Definition: unitauth.c:671
contact_server
static int contact_server(const char *svr, struct config_file *cfg, int statuscmd)
contact the server with TCP connect
Definition: unbound-control.c:547
fake_temp_file
void fake_temp_file(const char *adj, const char *id, char *buf, size_t len)
Get filename to store temporary config stuff.
Definition: fake_event.c:111
acl_list_apply_cfg
int acl_list_apply_cfg(struct acl_list *acl, struct config_file *cfg, struct views *v)
Process access control config.
Definition: acl_list.c:437
regional_get_mem
size_t regional_get_mem(struct regional *r)
get total memory size in use by region
Definition: regional.c:230
resp_addr_get_rrset
struct ub_packed_rrset_key * resp_addr_get_rrset(struct resp_addr *addr)
returns rrset portion of the specified node in the respip address tree; returns NULL for NULL input; ...
Definition: respip.c:1293
az_nsec3_hashname
static int az_nsec3_hashname(struct auth_zone *z, uint8_t *hashname, size_t *hashnmlen, uint8_t *nm, size_t nmlen, int algo, size_t iter, uint8_t *salt, size_t saltlen)
Hash name and return b32encoded hashname for lookup, zone name appended.
Definition: authzone.c:2653
log_packed_rrset
void log_packed_rrset(enum verbosity_value v, const char *str, struct ub_packed_rrset_key *rrset)
Print the string with prefix, one rr per line.
Definition: packed_rrset.c:299
setup_sslctx
static SSL_CTX * setup_sslctx(void)
create SSL context
Definition: unbound-anchor.c:762
acl_list
Access control storage structure.
Definition: acl_list.h:74
udp_send_errno_needs_log
static int udp_send_errno_needs_log(struct sockaddr *addr, socklen_t addrlen)
see if errno for udp has to be logged or not uses globals
Definition: netevent.c:275
rrset_cache_touch
void rrset_cache_touch(struct rrset_cache *r, struct ub_packed_rrset_key *key, hashvalue_type hash, rrset_id_type id)
Touch rrset, with given pointer and id.
Definition: rrset.c:94
auth_xfer::task_nextprobe
struct auth_nextprobe * task_nextprobe
task to wait for next-probe-timeout, once timeouted, see if a SOA probe is needed,...
Definition: authzone.h:219
module_qstate::query_flags
uint16_t query_flags
flags uint16 from query
Definition: module.h:600
fd_for_dest
static int fd_for_dest(struct outside_network *outnet, struct sockaddr_storage *to_addr, socklen_t to_addrlen)
create fd to send to this destination
Definition: outside_network.c:2191
ub_event_base::magic
unsigned long magic
magic must be UB_EVENT_MAGIC (0x44d74d78)
Definition: unbound-event.h:117
processTargetResponse
static void processTargetResponse(struct module_qstate *qstate, int id, struct module_qstate *forq)
Do final processing on responses to target queries.
Definition: iterator.c:3228
delegpt_free_mlc
void delegpt_free_mlc(struct delegpt *dp)
free malloced delegation point.
Definition: iter_delegpt.c:547
reply_info::qdcount
uint8_t qdcount
Number of RRs in the query section.
Definition: msgreply.h:141
hints_get_mem
size_t hints_get_mem(struct iter_hints *hints)
Get memory in use by hints.
Definition: iter_hints.c:514
nsec3_prove_nameerror
enum sec_status nsec3_prove_nameerror(struct module_env *env, struct val_env *ve, struct ub_packed_rrset_key **list, size_t num, struct query_info *qinfo, struct key_entry_key *kkey)
Determine if the set of NSEC3 records provided with a response prove NAME ERROR.
Definition: val_nsec3.c:1065
regional_test
void regional_test(void)
unit test for regional allocator functions
Definition: unitregional.c:243
node_size
static size_t node_size(const struct addrtree *tree, const struct addrnode *n)
Size in bytes of node and parent edge.
Definition: addrtree.c:114
fstrm_create_control_frame_start
void * fstrm_create_control_frame_start(char *contenttype, size_t *len)
This creates an FSTRM control frame of type START.
Definition: dnstap_fstrm.c:49
sldns_str2wire_time_buf
int sldns_str2wire_time_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_TIME from string to wireformat.
Definition: str2wire.c:1416
config_file::prefetch
int prefetch
if prefetching of messages should be performed.
Definition: config_file.h:278
val_reply_remove_auth
void val_reply_remove_auth(struct reply_info *rep, size_t index)
Remove rrset with index from reply, from the authority section.
Definition: val_utils.c:914
sldns_hexdigit_to_int
int sldns_hexdigit_to_int(char ch)
Returns the int value of the given (hex) digit.
Definition: parseutil.c:187
auth_master::ixfr
int ixfr
use IXFR for this master
Definition: authzone.h:442
infra_data::isdnsseclame
uint8_t isdnsseclame
is the host lame (does not serve the zone authoritatively), or is the host dnssec lame (does not serv...
Definition: infra.h:93
sldns_wire2str_rr_buf
int sldns_wire2str_rr_buf(uint8_t *d, size_t dlen, char *s, size_t slen)
Convert RR to string presentation format, on one line.
Definition: wire2str.c:253
xfr_probe_nextmaster
static void xfr_probe_nextmaster(struct auth_xfer *xfr)
move to next master in list, task_probe
Definition: authzone.c:3931
dname_canon_lab_cmp
int dname_canon_lab_cmp(uint8_t *d1, int labs1, uint8_t *d2, int labs2, int *mlabs)
Compare dnames, Canonical in rfc4034 sense, but by label.
Definition: dname.c:802
listen_start_accept
void listen_start_accept(struct listen_dnsport *listen)
start accept handlers for TCP (was stopped before)
Definition: listen_dnsport.c:1584
ports_create_if
static int ports_create_if(const char *ifname, int do_auto, int do_udp, int do_tcp, struct addrinfo *hints, const char *port, struct listen_port **list, size_t rcv, size_t snd, int ssl_port, struct config_strlist *tls_additional_port, int *reuseport, int transparent, int tcp_mss, int freebind, int use_systemd, int dnscrypt_port, int dscp)
Helper for ports_open.
Definition: listen_dnsport.c:1210
traverse_postorder
void traverse_postorder(rbtree_type *tree, void(*func)(rbnode_type *, void *), void *arg)
Call function for all elements in the redblack tree, such that leaf elements are called before parent...
Definition: rbtree.c:622
dtio_reconnect_timeout_cb
void dtio_reconnect_timeout_cb(int fd, short bits, void *arg)
callback for the dnstap reconnect, to start reconnecting to output
sldns_wirerr_get_rdatalen
uint16_t sldns_wirerr_get_rdatalen(uint8_t *rr, size_t len, size_t dname_len)
Get the rdata length of the RR.
Definition: str2wire.c:819
find_matching_nsec3
static int find_matching_nsec3(struct module_env *env, struct nsec3_filter *flt, rbtree_type *ct, uint8_t *nm, size_t nmlen, struct ub_packed_rrset_key **rrset, int *rr)
Find matching NSEC3 Find the NSEC3Record that matches a hash of a name.
Definition: val_nsec3.c:736
respip_nodata_answer
static int respip_nodata_answer(uint16_t qtype, enum respip_action action, const struct reply_info *rep, size_t rrset_id, struct reply_info **new_repp, struct regional *region)
apply response ip action in case where no action data is provided.
Definition: respip.c:788
UB_EV_TIMEOUT
#define UB_EV_TIMEOUT
event timeout
Definition: unbound-event.h:67
tcl_close_connection
void tcl_close_connection(struct tcl_addr *tcl)
Decrement TCP connection count if found.
Definition: tcp_conn_limit.c:171
rr_comment_nsec3
static int rr_comment_nsec3(char **s, size_t *slen, uint8_t *rr, size_t rrlen, size_t dname_off)
print rr comment for type NSEC3
Definition: wire2str.c:634
tube_poll
int tube_poll(struct tube *tube)
See if data is ready for reading on the tube without blocking.
Definition: tube.c:411
main
int main(int argc, char *argv[])
Main routine for unbound-host.
Definition: unbound-host.c:424
readhex.h
config_file::stream_wait_size
size_t stream_wait_size
size of the stream wait buffers, max
Definition: config_file.h:146
ub_winsock_register_wsaevent
struct ub_event * ub_winsock_register_wsaevent(struct ub_event_base *base, void *wsaevent, void(*cb)(int, short, void *), void *arg)
Create a new ub_event associated with the wsaevent for the event base.
Definition: ub_event.c:338
mesh_area
Mesh of query states.
Definition: mesh.h:82
sldns_wire2str_edns_scan
int sldns_wire2str_edns_scan(uint8_t **data, size_t *data_len, char **str, size_t *str_len, uint8_t *pkt, size_t pktlen)
Scan wireformat EDNS OPT to string, with user buffers.
Definition: wire2str.c:2021
serviced_query::serviced_initial
@ serviced_initial
initial status
Definition: outside_network.h:359
comm_timer_disable
void comm_timer_disable(struct comm_timer *timer)
disable timer.
Definition: netevent.c:3312
authzone.h
comm_base_exit
void comm_base_exit(struct comm_base *b)
Exit from dispatch loop.
Definition: fake_event.c:963
ub_resolve_async
int ub_resolve_async(struct ub_ctx *ctx, const char *name, int rrtype, int rrclass, void *mydata, ub_callback_type callback, int *async_id)
Perform resolution and validation of the target name.
Definition: libunbound.c:766
ub_server_stats::qbit_RA
long long qbit_RA
number of queries with RA bit
Definition: unbound.h:711
sldns_str2wire_int32_buf
int sldns_str2wire_int32_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_INT32 from string to wireformat.
Definition: str2wire.c:1045
sldns_wire2str_rdata_unknown_scan
int sldns_wire2str_rdata_unknown_scan(uint8_t **d, size_t *dlen, char **s, size_t *slen)
Scan wireformat rdata to string in unknown format, with user buffers.
Definition: wire2str.c:748
comm_base_create
struct comm_base * comm_base_create(int sigs)
Create a new comm base.
Definition: netevent.c:160
respip_conf_actions_test
static void respip_conf_actions_test(void)
Global respip actions test; apply raw config data and verify that all the nodes in the respip set,...
Definition: unitmain.c:600
auth_zone_delegpt
static int auth_zone_delegpt(struct module_qstate *qstate, struct iter_qstate *iq, uint8_t *delname, size_t delnamelen)
Generate a delegation point for an auth zone (unless cached dp is better) false on alloc failure.
Definition: iterator.c:926
view_and_respipchecks
static void view_and_respipchecks(struct config_file *cfg)
check view and response-ip configuration
Definition: unbound-checkconf.c:288
rrset_trust_ultimate
@ rrset_trust_ultimate
ultimately trusted, no more trust is possible; trusted keys from the unbound configuration setup.
Definition: packed_rrset.h:169
alloc_set_special_next
#define alloc_set_special_next(x, y)
set next pointer.
Definition: alloc.h:62
neg_zone_chain
static struct val_neg_zone * neg_zone_chain(uint8_t *nm, size_t nm_len, int labs, uint16_t dclass, struct val_neg_zone *parent)
Create a linked list of parent zones, starting at longname ending on the parent (can be NULL,...
Definition: val_neg.c:482
log_reply_info
void log_reply_info(enum verbosity_value v, struct query_info *qinf, struct sockaddr_storage *addr, socklen_t addrlen, struct timeval dur, int cached, struct sldns_buffer *rmsg)
Print string with neat domain name, type, class, status code from, and size of a query response.
Definition: msgreply.c:843
fake_commpoint::cb
comm_point_callback_type * cb
the callback, stored for usage
Definition: fake_event.c:84
module_qstate::no_cache_lookup
int no_cache_lookup
whether modules should answer from the cache
Definition: module.h:646
local_data_find_tag_datas
int local_data_find_tag_datas(const struct query_info *qinfo, struct config_strlist *list, struct ub_packed_rrset_key *r, struct regional *temp)
find local data tag string match for the given type in the list
Definition: localzone.c:1248
libworker_attach_mesh
int libworker_attach_mesh(struct ub_ctx *ctx, struct ctx_query *q, int *async_id)
Attach context_query to mesh for callback in event-driven setup.
Definition: libworker.c:665
mesh_report_reply
void mesh_report_reply(struct mesh_area *mesh, struct outbound_entry *e, struct comm_reply *reply, int what)
Handle new event from the wire.
Definition: mesh.c:756
module_env
Module environment.
Definition: module.h:324
az_xfr_allowed_notify
static int az_xfr_allowed_notify(struct auth_xfer *xfr, struct sockaddr_storage *addr, socklen_t addrlen, struct auth_master **fromhost)
check access list for notifies
Definition: authzone.c:3489
auth_xfer_transfer_http_callback
int auth_xfer_transfer_http_callback(struct comm_point *c, void *arg, int err, struct comm_reply *repinfo)
callback for task_transfer http connections
Definition: authzone.c:5907
errinf_to_str_servfail
char * errinf_to_str_servfail(struct module_qstate *qstate)
Create error info in string.
Definition: config_file.c:2449
auth_transfer::ixfr_possible_timeout_count
int ixfr_possible_timeout_count
we saw an ixfr-indicating timeout, count of them
Definition: authzone.h:397
delegpt_add_ns
int delegpt_add_ns(struct delegpt *dp, struct regional *region, uint8_t *name, uint8_t lame)
Add a name to the delegation point.
Definition: iter_delegpt.c:103
get_rdf_size
size_t get_rdf_size(sldns_rdf_type rdf)
Obtain size in the packet of an rr type, that is before dname type.
Definition: msgparse.c:599
iter_qstate::ratelimit_ok
int ratelimit_ok
if true, already tested for ratelimiting and passed the test
Definition: iterator.h:322
sldns_buffer_set_limit
INLINE void sldns_buffer_set_limit(sldns_buffer *buffer, size_t limit)
changes the buffer's limit.
Definition: sbuffer.h:283
slabhash_setmarkdel
void slabhash_setmarkdel(struct slabhash *table, lruhash_markdelfunc_type md)
Set markdel function.
Definition: slabhash.c:218
outside_network::tcp_wait_last
struct waiting_tcp * tcp_wait_last
last of waiting query list
Definition: outside_network.h:162
config_file::host_ttl
int host_ttl
host cache ttl in seconds
Definition: config_file.h:162
dt_msg_queue::dtio
struct dt_io_thread * dtio
reference to the io thread to wakeup
Definition: dtstream.h:75
replyline
static void replyline(char *line, uint8_t *reply, size_t reply_len, int *do_flag)
parse REPLY line
Definition: testpkts.c:160
sldns_wire2str_type_buf
int sldns_wire2str_type_buf(uint16_t rrtype, char *str, size_t len)
Convert wire RR type to a string, 'MX', 'TYPE12'.
Definition: wire2str.c:287
auth_probe::timer
struct comm_timer * timer
timeout for packets.
Definition: authzone.h:347
memdup
void * memdup(void *data, size_t len)
Allocate memory and copy over contents.
Definition: net_help.c:177
waiting_tcp::cb_arg
void * cb_arg
callback user argument
Definition: outside_network.h:296
addr_tree_find
struct addr_tree_node * addr_tree_find(rbtree_type *tree, struct sockaddr_storage *addr, socklen_t addrlen, int net)
Find element in addr tree.
Definition: dnstree.c:241
delegpt_add_rrset_AAAA
int delegpt_add_rrset_AAAA(struct delegpt *dp, struct regional *region, struct ub_packed_rrset_key *ak, uint8_t lame, int *additions)
Add AAAA RRset to delegpt.
Definition: iter_delegpt.c:445
fake_pending::qtype
int qtype
qtype
Definition: replay.h:340
local_zones_find_le
struct local_zone * local_zones_find_le(struct local_zones *zones, uint8_t *name, size_t len, int labs, uint16_t dclass, int *exact)
Find zone that with exactly or smaller name/class User must lock the tree or result zone.
Definition: localzone.c:1147
outnet_comm_point_for_tcp
struct comm_point * outnet_comm_point_for_tcp(struct outside_network *outnet, comm_point_callback_type *cb, void *cb_arg, struct sockaddr_storage *to_addr, socklen_t to_addrlen, sldns_buffer *query, int timeout, int ssl, char *host)
Create tcp commpoint suitable for communication to the destination.
Definition: outside_network.c:2344
UB_STATS_RPZ_ACTION_NUM
#define UB_STATS_RPZ_ACTION_NUM
number of RPZ actions
Definition: unbound.h:660
NUM_TIMEOUTS_FALLBACK_IXFR
#define NUM_TIMEOUTS_FALLBACK_IXFR
number of timeouts before we fallback from IXFR to AXFR, because some versions of servers (eg.
Definition: authzone.c:93
pythonmod_get_mem
size_t pythonmod_get_mem(struct module_env *env, int id)
python module alloc size routine
Definition: pythonmod.c:569
wsvc_rc_stop
void wsvc_rc_stop(FILE *out)
Stop the service from servicecontrolmanager, tells OS to stop daemon.
Definition: w_inst.c:300
timehist_export
void timehist_export(struct timehist *hist, long long *array, size_t sz)
Export histogram to an array.
Definition: timehist.c:228
addrtree_create
struct addrtree * addrtree_create(addrlen_t max_depth, void(*delfunc)(void *, void *), size_t(*sizefunc)(void *), void *env, uint32_t max_node_count)
Create a new tree.
Definition: addrtree.c:121
forwards_add_zone
int forwards_add_zone(struct iter_forwards *fwd, uint16_t c, struct delegpt *dp)
Add zone to forward structure.
Definition: iter_fwd.c:472
config_file::trust_anchor_signaling
int trust_anchor_signaling
send key tag query
Definition: config_file.h:341
sldns_str2wire_tsigtime_buf
int sldns_str2wire_tsigtime_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_TSIGTIME from string to wireformat.
Definition: str2wire.c:1458
log_rpz_apply
static void log_rpz_apply(uint8_t *dname, enum rpz_action a, struct query_info *qinfo, struct comm_reply *repinfo, char *log_name)
print log information for an applied RPZ policy.
Definition: rpz.c:920
log_name_addr
void log_name_addr(enum verbosity_value v, const char *str, uint8_t *zone, struct sockaddr_storage *addr, socklen_t addrlen)
Prints zone name and sockaddr in readable format with log_info.
Definition: net_help.c:543
xfer_link_data
static int xfer_link_data(sldns_buffer *pkt, struct auth_xfer *xfr)
Link the data from this packet into the worklist of transferred data.
Definition: authzone.c:5707
infra_dp_ratelimit
int infra_dp_ratelimit
ratelimit value for delegation point
Definition: infra.c:64
replay_get_oldest_timer
struct fake_timer * replay_get_oldest_timer(struct replay_runtime *runtime)
get oldest enabled fake timer
Definition: replay.c:547
sldns_wire2str_int16_data_scan
int sldns_wire2str_int16_data_scan(uint8_t **d, size_t *dl, char **s, size_t *sl)
Scan wireformat int16_data field to string, with user buffers.
Definition: wire2str.c:1628
fptr_whitelist_rbtree_cmp
int fptr_whitelist_rbtree_cmp(int(*fptr)(const void *, const void *))
Check function pointer whitelist for rbtree cmp callback values.
Definition: fptr_wlist.c:219
do_flush_requestlist
static void do_flush_requestlist(RES *ssl, struct worker *worker)
flush requestlist
Definition: remote.c:1677
load_rrset_cache
static int load_rrset_cache(RES *ssl, struct worker *worker)
load rrset cache
Definition: cachedump.c:522
dtio_stop_flush_exit
static void dtio_stop_flush_exit(struct stop_flush_info *info)
stop from stop_flush event loop
Definition: dtstream.c:1583
auth_xfer_setup
static int auth_xfer_setup(struct auth_zone *z, struct auth_xfer *x)
Setup auth_xfer zone This populates the have_zone, soa values, and so on times.
Definition: authzone.c:1815
val_operate
void val_operate(struct module_qstate *qstate, enum module_ev event, int id, struct outbound_entry *outbound)
validator operate on a query
Definition: validator.c:2480
sldns_is_last_of_string
static int sldns_is_last_of_string(const char *str)
see if the string ends, or ends in whitespace
Definition: str2wire.c:1239
auth_zone::zone_expired
int zone_expired
the zone has expired (enabled by the xfer worker), fallback happens if that option is enabled.
Definition: authzone.h:126
auth_transfer::lookup_target
struct auth_master * lookup_target
for the hostname lookups, which master is current
Definition: authzone.h:373
validate_cname_noanswer_response
static void validate_cname_noanswer_response(struct module_env *env, struct val_env *ve, struct query_info *qchase, struct reply_info *chase_reply, struct key_entry_key *kkey)
Validate CNAME NOANSWER response, no more data after a CNAME chain.
Definition: validator.c:1350
nsec3_known_algo
static int nsec3_known_algo(struct ub_packed_rrset_key *rrset, int r)
return if nsec3 RR has known algorithm
Definition: val_nsec3.c:157
dnsc_parse_certs
static int dnsc_parse_certs(struct dnsc_env *env, struct config_file *cfg)
Parse certificates files provided by the configuration and load them into dnsc_env.
Definition: dnscrypt.c:577
dns_msg
Region allocated message reply.
Definition: dns.h:61
val_nsec_proves_no_wc
int val_nsec_proves_no_wc(struct ub_packed_rrset_key *nsec, uint8_t *qname, size_t qnamelen)
Determine if the given NSEC proves that a wildcard match does not exist.
Definition: val_nsec.c:510
key_entry_sizefunc
size_t key_entry_sizefunc(void *key, void *data)
function for lruhash operation
Definition: val_kentry.c:52
fd_close
static void fd_close(int fd)
close the fd
Definition: petal.c:133
az_generate_notype_answer
static int az_generate_notype_answer(struct auth_zone *z, struct regional *region, struct dns_msg *msg, struct auth_data *node)
generate answer for notype answer
Definition: authzone.c:2978
do_set_option
static void do_set_option(RES *ssl, struct worker *worker, char *arg)
do the set_option command
Definition: remote.c:2564
addr_is_any
int addr_is_any(struct sockaddr_storage *addr, socklen_t addrlen)
See if sockaddr is 0.0.0.0 or ::0.
Definition: net_help.c:767
reply_info_set_ttls
void reply_info_set_ttls(struct reply_info *rep, time_t timenow)
Set TTLs inside the replyinfo to absolute values.
Definition: msgreply.c:514
wipe_ip_usage
static void wipe_ip_usage(struct ip_list *p)
clear used flags
Definition: unbound-anchor.c:671
ipsecmod_whitelist_apply_cfg
int ipsecmod_whitelist_apply_cfg(struct ipsecmod_env *ie, struct config_file *cfg)
Process ipsecmod_whitelist config.
config_file::serve_expired_client_timeout
int serve_expired_client_timeout
serve expired entries only after trying to update the entries and this timeout (in milliseconds) is r...
Definition: config_file.h:375
nsec3_has_type
int nsec3_has_type(struct ub_packed_rrset_key *rrset, int r, uint16_t type)
see if NSEC3 RR contains given type
Definition: val_nsec3.c:283
get_rrset_ttl
static time_t get_rrset_ttl(struct ub_packed_rrset_key *k)
get ttl of rrset
Definition: authzone.c:159
unit_show_feature
void unit_show_feature(const char *feature)
we are testing this functionality
Definition: unitmain.c:847
local_zone_enter_defaults
int local_zone_enter_defaults(struct local_zones *zones, struct config_file *cfg)
Enter defaults to local zone.
Definition: localzone.c:782
answer_norec_from_cache
static int answer_norec_from_cache(struct worker *worker, struct query_info *qinfo, uint16_t id, uint16_t flags, struct comm_reply *repinfo, struct edns_data *edns)
answer nonrecursive query from the cache
Definition: worker.c:470
autr_point_data::last_success
time_t last_success
last successful DNSKEY set
Definition: autotrust.h:106
xml_append_bio
static void xml_append_bio(BIO *b, BIO *a)
Append bio to bio.
Definition: unbound-anchor.c:1472
errinf_rrset
void errinf_rrset(struct module_qstate *qstate, struct ub_packed_rrset_key *rr)
Append text to error info: for RRset name type class.
Definition: config_file.c:2474
new_entry
static struct entry * new_entry(void)
create new entry
Definition: testpkts.c:256
process_nsec3
static void process_nsec3(int argc, char *argv[])
process nsec3 params and perform hashing
Definition: signit.c:236
inplace_cb_reply_func_type
int inplace_cb_reply_func_type(struct query_info *qinfo, struct module_qstate *qstate, struct reply_info *rep, int rcode, struct edns_data *edns, struct edns_option **opt_list_out, struct comm_reply *repinfo, struct regional *region, int id, void *callback)
Inplace callback function called before replying.
Definition: module.h:257
delegpt::name
uint8_t * name
the domain name of the delegation point.
Definition: iter_delegpt.h:59
lruhash_clear
void lruhash_clear(struct lruhash *table)
Clear hash table.
Definition: lruhash.c:438
unbound.c
comm_timer_set
void comm_timer_set(struct comm_timer *timer, struct timeval *tv)
reset timevalue for timer.
Definition: netevent.c:3321
ub_server_stats::ans_rcode_nodata
long long ans_rcode_nodata
answers with pseudo rcode 'nodata'
Definition: unbound.h:725
anchors_get_mem
size_t anchors_get_mem(struct val_anchors *anchors)
Get memory in use by the trust anchor storage.
Definition: val_anchor.c:1202
donotq_delete
void donotq_delete(struct iter_donotq *donotq)
Delete donotqueryaddresses structure.
Definition: iter_donotq.c:67
ub_ctx_trustedkeys
int ub_ctx_trustedkeys(struct ub_ctx *ctx, const char *fname)
Add trust anchors to the given context.
Definition: libunbound.c:447
replay_moment::repevt_front_query
@ repevt_front_query
incoming query
Definition: replay.h:194
config_delete
void config_delete(struct config_file *cfg)
Destroy the config file structure.
Definition: config_file.c:1421
NETEVENT_SLOW_ACCEPT_TIME
#define NETEVENT_SLOW_ACCEPT_TIME
timeout to slow accept calls when not possible, in msec.
Definition: netevent.h:92
init_cfg_parse
void init_cfg_parse(void)
init lex state
dt_msg_queue_delete
void dt_msg_queue_delete(struct dt_msg_queue *mq)
Delete a worker message queue.
Definition: dtstream.c:131
local_zone_type2str
const char * local_zone_type2str(enum localzone_type t)
Print localzone type to a string.
Definition: localzone.c:1746
NETEVENT_CLOSED
#define NETEVENT_CLOSED
to pass closed connection to callback function
Definition: netevent.h:83
mesh_cb::cb
mesh_cb_func_type cb
callback routine for results.
Definition: mesh.h:260
tcp_req_info_handle_read_close
int tcp_req_info_handle_read_close(struct tcp_req_info *req)
the read channel has closed
Definition: listen_dnsport.c:1762
outnet_get_tcp_fd
int outnet_get_tcp_fd(struct sockaddr_storage *addr, socklen_t addrlen, int tcp_mss, int dscp)
get TCP file descriptor for address, returns -1 on failure, tcp_mss is 0 or maxseg size to set for TC...
Definition: outside_network.c:208
serviced_query::node
rbnode_type node
The rbtree node, key is this record.
Definition: outside_network.h:328
auth_transfer::masters
struct auth_master * masters
list of upstream masters for this zone, from config
Definition: authzone.h:370
anchors_dnskey_unsupported
static size_t anchors_dnskey_unsupported(struct trust_anchor *ta)
Check DNSKEY algos for support, warn if not.
Definition: val_anchor.c:970
PROBE_MAXRTO
#define PROBE_MAXRTO
Timeout when only a single probe query per IP is allowed.
Definition: infra.c:56
ub_result::why_bogus
char * why_bogus
If the result is bogus this contains a string (zero terminated) that describes the failure.
Definition: unbound.h:204
verify_test
void verify_test(void)
unit test for verification functions
Definition: unitverify.c:506
view
View.
Definition: view.h:66
ub_c_error
void ub_c_error(const char *msg)
parsing helpers: print error with file and line numbers
Definition: config_file.c:1638
local_zones_find
struct local_zone * local_zones_find(struct local_zones *zones, uint8_t *name, size_t len, int labs, uint16_t dclass)
Find zone that with exactly given name, class.
Definition: localzone.c:1133
RESPIP_INIT
@ RESPIP_INIT
The general state.
Definition: respip.c:43
log_info
void log_info(const char *format,...)
implementation of log_info
Definition: log.c:302
autr_debug_print
void autr_debug_print(struct val_anchors *anchors)
Debug printout of rfc5011 tracked anchors.
Definition: autotrust.c:2312
edns_option_is_known
struct edns_known_option * edns_option_is_known(uint16_t opt_code, struct module_env *env)
Check if an edns option is known.
Definition: module.c:184
sldns_wire2str_rcode_buf
int sldns_wire2str_rcode_buf(int rcode, char *s, size_t slen)
Convert wire RR rcode to a string, 'NOERROR', 'NXDOMAIN'.
Definition: wire2str.c:299
ssl_handle_it
static int ssl_handle_it(struct comm_point *c)
handle ssl tcp connection with dns contents
Definition: netevent.c:1398
CMSG_SPACE
#define CMSG_SPACE(l)
if CMSG_SPACE is not defined on this platform, a workaround
Definition: netevent.c:83
query_info::local_alias
struct local_rrset * local_alias
Alias local answer(s) for the qname.
Definition: msgreply.h:98
config_set_option
int config_set_option(struct config_file *cfg, const char *opt, const char *val)
Set the given keyword to the given value.
Definition: config_file.c:434
detect_cycle
static int detect_cycle(struct lock_ref *visit, struct lock_ref *from)
Detect cycle by comparing visited now with all (unvisited) bigger nodes.
Definition: lock_verify.c:308
comm_base_delete_no_base
void comm_base_delete_no_base(struct comm_base *b)
Delete comm base structure but not the underlying lib event base.
Definition: netevent.c:220
sbuffer.h
comm_signal::ev_signal
struct internal_signal * ev_signal
the internal event stuff
Definition: netevent.h:340
config_file::msg_cache_size
size_t msg_cache_size
size of the message cache
Definition: config_file.h:150
entry_to_repinfo
static void entry_to_repinfo(struct entry *e, struct alloc_cache *alloc, struct regional *region, sldns_buffer *pkt, struct query_info *qi, struct reply_info **rep)
entry to reply info conversion
Definition: unitverify.c:84
delegpt_copy
struct delegpt * delegpt_copy(struct delegpt *dp, struct regional *regional)
Create a copy of a delegation point.
Definition: iter_delegpt.c:64
edns_opt_list_compare
int edns_opt_list_compare(struct edns_option *p, struct edns_option *q)
Compare edns option lists, also the order and contents of edns-options.
Definition: msgreply.c:1188
tap_socket::socketpath
char * socketpath
socketpath, if this is an AF_LOCAL socket
Definition: unbound-dnstap-socket.c:153
usage
static void usage(char *argv[])
usage information for streamtcp
Definition: unbound-dnstap-socket.c:74
LDNS_RDF_TYPE_B32_EXT
@ LDNS_RDF_TYPE_B32_EXT
b32 string
Definition: rrdef.h:284
fake_timer::cb_arg
void * cb_arg
the callback user argument
Definition: replay.h:387
sldns_wire2str_rcode
char * sldns_wire2str_rcode(int rcode)
Convert wire packet rcode to a string, 'NOERROR', 'NXDOMAIN'...
Definition: wire2str.c:240
nsec3_hash_name
int nsec3_hash_name(rbtree_type *table, struct regional *region, sldns_buffer *buf, struct ub_packed_rrset_key *nsec3, int rr, uint8_t *dname, size_t dname_len, struct nsec3_cached_hash **hash)
Obtain the hash of an owner name.
Definition: val_nsec3.c:630
perfinfo::start
struct timeval start
when did the total test start
Definition: perf.c:101
iter_env::priv
struct iter_priv * priv
private address space and private domains
Definition: iterator.h:120
processDSNSFind
static int processDSNSFind(struct module_qstate *qstate, struct iter_qstate *iq, int id)
Try to find the NS record set that will resolve a qtype DS query.
Definition: iterator.c:2091
config_file::dnstap_send_identity
int dnstap_send_identity
true to send "identity" via dnstap
Definition: config_file.h:501
views_find_view
struct view * views_find_view(struct views *vs, const char *name, int write)
find a view by name
Definition: view.c:224
ub_libevent_event_base
struct ub_event_base * ub_libevent_event_base(struct event_base *libevent_base)
Return an ub_event_base constructed for the given libevent event base.
Definition: ub_event.c:241
sldns_wire2str_rr_comment_buf
int sldns_wire2str_rr_comment_buf(uint8_t *rr, size_t rr_len, size_t dname_len, char *str, size_t str_len)
This creates the comment to print after the RR.
Definition: wire2str.c:279
rate_data
Data for ratelimits per domain name It is incremented when a non-cache-lookup happens for that domain...
Definition: infra.h:177
hdlr
static void hdlr(DWORD ctrl)
Service control handler.
Definition: win_svc.c:105
open_svr
static int open_svr(const char *svr, int udp)
open TCP socket to svr
Definition: streamtcp.c:85
local_data_find_tag_action
enum localzone_type local_data_find_tag_action(const uint8_t *taglist, size_t taglen, const uint8_t *taglist2, size_t taglen2, const uint8_t *tagactions, size_t tagactionssize, enum localzone_type lzt, int *tag, char *const *tagname, int num_tags)
See if two sets of tag lists (in the form of bitmap) have the same tag that has an action.
Definition: localzone.c:1618
dname_test_strict_subdomain
static void dname_test_strict_subdomain(void)
test dname_strict_subdomain
Definition: unitdname.c:411
rrset_trust_auth_AA
@ rrset_trust_auth_AA
Data from the authority section of an authoritative answer.
Definition: packed_rrset.h:157
auth_zones_can_fallback
int auth_zones_can_fallback(struct auth_zones *az, uint8_t *nm, size_t nmlen, uint16_t dclass)
see if the auth zone for the name can fallback
Definition: authzone.c:3390
dt_io_thread::ssl_handshake_done
int ssl_handshake_done
true if the handshake for SSL is done, 0 if not
Definition: dtstream.h:149
replay_runtime::scenario
struct replay_scenario * scenario
The scenario.
Definition: replay.h:270
iter_qstate::dsns_point
uint8_t * dsns_point
If nonNULL we are walking upwards from DS query to find NS.
Definition: iterator.h:345
val_anchors::lock
lock_basic_type lock
lock on trees
Definition: val_anchor.h:62
ringbuf::size
size_t size
size of buffer
Definition: delayer.c:66
http_check_connect
static int http_check_connect(int fd, struct comm_point *c)
check pending connect for http
Definition: netevent.c:2270
sldns_wire2str_class_scan
int sldns_wire2str_class_scan(uint8_t **d, size_t *dlen, char **s, size_t *slen)
Scan wireformat rr class to string, with user buffers.
Definition: wire2str.c:910
inplace_cb_query_call
int inplace_cb_query_call(struct module_env *env, struct query_info *qinfo, uint16_t flags, struct sockaddr_storage *addr, socklen_t addrlen, uint8_t *zone, size_t zonelen, struct module_qstate *qstate, struct regional *region)
Call the registered functions in the inplace_cb_query linked list.
Definition: msgreply.c:1100
found_cycle
static void found_cycle(struct lock_ref *visit, int level)
print cycle message
Definition: lock_verify.c:281
outside_network_delete
void outside_network_delete(struct outside_network *outnet)
Delete outside_network structure.
Definition: outside_network.c:912
comm_point::http_in_headers
int http_in_headers
Currently reading in http headers.
Definition: netevent.h:209
acl_addr::taglist
uint8_t * taglist
tag bitlist
Definition: acl_list.h:94
config_delview
void config_delview(struct config_view *p)
Delete a view item.
Definition: config_file.c:1371
config_stub::ssl_upstream
int ssl_upstream
use SSL for queries to this stub
Definition: config_file.h:646
outnet_get_mem
size_t outnet_get_mem(struct outside_network *outnet)
Get memory size in use by outside network.
Definition: outside_network.c:2490
rbtree_insert
rbnode_type * rbtree_insert(rbtree_type *rbtree, rbnode_type *data)
Insert data into the tree.
Definition: rbtree.c:228
alloc_cache::super
struct alloc_cache * super
global allocator above this one.
Definition: alloc.h:76
parse_reply_in_temp_region
struct reply_info * parse_reply_in_temp_region(sldns_buffer *pkt, struct regional *region, struct query_info *qi)
get msg reply struct (in temp region)
Definition: msgreply.c:927
server_stats_reply
void server_stats_reply(struct worker *worker, int reset)
Send stats over comm tube in reply to query cmd.
Definition: stats.c:386
fptr_whitelist_comm_signal
int fptr_whitelist_comm_signal(void(*fptr)(int, void *))
Check function pointer whitelist for comm_signal callback values.
Definition: fptr_wlist.c:145
storeQueryInCache
int storeQueryInCache(struct module_qstate *qstate, struct query_info *qinfo, struct reply_info *msgrep, int is_referral)
Store the reply_info and query_info pair in message cache (qstate->msg_cache)
Definition: pythonmod_utils.c:59
worker::alloc
struct alloc_cache alloc
allocation cache for this thread
Definition: worker.h:117
regional_destroy
void regional_destroy(struct regional *r)
Destroy regional.
Definition: regional.c:114
ub_server_stats::qtcp_outgoing
long long qtcp_outgoing
number of outgoing queries over TCP
Definition: unbound.h:697
do_list_stubs
static void do_list_stubs(RES *ssl, struct worker *worker)
do the list_stubs command
Definition: remote.c:2633
order_lock_cmp
int order_lock_cmp(const void *e1, const void *e2)
Due to module breakage by fptr wlist, these test app declarations are presented here.
Definition: worker_cb.c:224
TLS_shutdown
static void TLS_shutdown(int fd, SSL *ssl, SSL_CTX *sslctx)
perform neat TLS shutdown
Definition: unbound-anchor.c:818
dnskey_get_protocol
static int dnskey_get_protocol(struct ub_packed_rrset_key *k, size_t idx)
Get DNSKEY protocol value from rdata.
Definition: val_sigcrypt.c:167
tcp_req_info::num_done_req
int num_done_req
number of pending writeable results
Definition: listen_dnsport.h:270
ub_event_add_bits
void ub_event_add_bits(struct ub_event *ev, short bits)
Add event bits for this event to fire on.
Definition: ub_event_pluggable.c:545
IS_NUMBER_OR_ZERO
#define IS_NUMBER_OR_ZERO
check that the value passed is >= 0
Definition: config_file.c:385
auth_probe::timeout
int timeout
timeout in msec
Definition: authzone.h:349
stop_flush_info::timer_done
int timer_done
has the timer fired
Definition: dtstream.c:1571
listen_delete
void listen_delete(struct listen_dnsport *front)
delete the listening structure
Definition: listen_dnsport.c:1423
nsec3_filter::zone_len
size_t zone_len
length of the zonename
Definition: val_nsec3.c:101
RTT_BAND
#define RTT_BAND
RTT band, within this amount from the best, servers are chosen randomly.
Definition: iterator.h:102
mesh_area::use_rpz
int use_rpz
If we need to use RPZ (value passed from daemon)
Definition: mesh.h:155
trust_anchor::numDS
size_t numDS
number of DSs in the keylist
Definition: val_anchor.h:114
daemon_remote::max_active
int max_active
max active commpoints
Definition: remote.h:99
setup_ctx
static SSL_CTX * setup_ctx(struct config_file *cfg)
setup SSL context
Definition: unbound-control.c:499
tube_callback_type
void tube_callback_type(struct tube *, uint8_t *, size_t, int, void *)
Callback from pipe listen function void mycallback(tube, msg, len, error, user_argument); if error is...
Definition: tube.h:58
worker_win_stop_cb
void worker_win_stop_cb(int fd, short ev, void *arg)
windows worker stop event callback handler
Definition: win_svc.c:515
sldns_str2wire_dname_buf_origin
int sldns_str2wire_dname_buf_origin(const char *str, uint8_t *buf, size_t *len, uint8_t *origin, size_t origin_len)
Same as sldns_str2wire_dname_buf, but concatenates origin if the domain name is relative (does not en...
Definition: str2wire.c:144
serviced_query::to_be_deleted
int to_be_deleted
true if serviced_query is scheduled for deletion already
Definition: outside_network.h:378
pkt_dname_tolower
void pkt_dname_tolower(struct sldns_buffer *pkt, uint8_t *dname)
lowercase pkt dname (follows compression pointers)
Definition: dname.c:151
config_str3list::next
struct config_str3list * next
next item in list
Definition: config_file.h:745
val_classify_response
enum val_classification val_classify_response(uint16_t query_flags, struct query_info *origqinf, struct query_info *qinf, struct reply_info *rep, size_t skip)
Given a response, classify ANSWER responses into a subtype.
Definition: val_utils.c:62
read_rrs
static ldns_rr_list * read_rrs(FILE *in)
read list of rrs from the file
Definition: signit.c:163
subnet_markdel
void subnet_markdel(void *key)
mark subnet msg to be deleted
serviced_tcp_callback
int serviced_tcp_callback(struct comm_point *c, void *arg, int error, struct comm_reply *rep)
TCP reply or error callback for serviced queries.
Definition: outside_network.c:1803
query_info_hash
hashvalue_type query_info_hash(struct query_info *q, uint16_t flags)
calculate hash value of query_info, lowercases the qname, uses CD flag for AAAA qtype
Definition: msgreply.c:627
chunkline_count_parens
static int chunkline_count_parens(sldns_buffer *buf, size_t start)
count number of open and closed parenthesis in a chunkline
Definition: authzone.c:4147
dynlib_mod_count
static int dynlib_mod_count
module counter for multiple dynlib modules
Definition: dynlibmod.c:70
ssl_printf
int ssl_printf(RES *ssl, const char *format,...)
printf style printing to the ssl connection
Definition: remote.c:600
rpz_data_delete_rr
static int rpz_data_delete_rr(struct local_zone *z, uint8_t *policydname, size_t policydnamelen, uint16_t rr_type, uint8_t *rdata, size_t rdatalen)
Remove RR from RPZ's local-data.
Definition: rpz.c:747
serviced_cmp
int serviced_cmp(const void *key1, const void *key2)
compare function of serviced query rbtree
Definition: outside_network.c:106
infra_ratelimit_inc
int infra_ratelimit_inc(struct infra_cache *infra, uint8_t *name, size_t namelen, time_t timenow, struct query_info *qinfo, struct comm_reply *replylist)
Increment the query rate counter for a delegation point.
Definition: infra.c:911
purge_node
static void purge_node(struct addrtree *tree, struct addrnode *node)
Purge a node from the tree.
Definition: addrtree.c:213
az_change_dnames
static void az_change_dnames(struct dns_msg *msg, uint8_t *oldname, uint8_t *newname, size_t newlen, int an_only)
Change a dname to a different one, for wildcard namechange.
Definition: authzone.c:2509
config_file::tls_cert_bundle
char * tls_cert_bundle
cert bundle for outgoing connections
Definition: config_file.h:120
seen_trustanchor
static void seen_trustanchor(struct autr_ta *ta, uint8_t seen)
Set fetched value.
Definition: autotrust.c:1315
fatal_exit
void fatal_exit(const char *format,...) ATTR_FORMAT(printf
Log fatal error message, and exit the current process.
processInitRequest3
static int processInitRequest3(struct module_qstate *qstate, struct iter_qstate *iq, int id)
Process the third part of the initial request handling.
Definition: iterator.c:1670
worker_create
struct worker * worker_create(struct daemon *daemon, int id, int *ports, int n)
Create the worker structure.
Definition: worker.c:1700
hex_to_buf
void hex_to_buf(struct sldns_buffer *pkt, const char *hex)
Helper to convert hex string to packet buffer.
Definition: readhex.c:65
macro_length
static size_t macro_length(char *text)
return length of macro
Definition: replay.c:590
perf_tv_subtract
static void perf_tv_subtract(struct timeval *t1, struct timeval *t2)
timeval subtract, t1 -= t2
Definition: perf.c:189
distribute_cmd
static void distribute_cmd(struct daemon_remote *rc, RES *ssl, char *cmd)
tell other processes to execute the command
Definition: remote.c:2870
anchors_assemble_rrsets
static int anchors_assemble_rrsets(struct val_anchors *anchors)
Assemble the rrsets in the anchors, ready for use by validator.
Definition: val_anchor.c:986
ub_comm_base_now
void ub_comm_base_now(struct comm_base *cb)
Equip the comm_base with the current time.
Definition: ub_event.c:448
module_env::now
time_t * now
time in seconds, converted to integer
Definition: module.h:481
as112_zones
const char ** as112_zones
Array of text-format domain names of the AS112 zones.
Definition: as112.c:143
local_data::namelabs
int namelabs
number of labels in name
Definition: localzone.h:171
iter_hints::tree
rbtree_type tree
Hints are stored in this tree.
Definition: iter_hints.h:62
pythonmod_deinit
void pythonmod_deinit(struct module_env *env, int id)
python module deinit
Definition: pythonmod.c:439
inplace_cb_query_func_type
int inplace_cb_query_func_type(struct query_info *qinfo, uint16_t flags, struct module_qstate *qstate, struct sockaddr_storage *addr, socklen_t addrlen, uint8_t *zone, size_t zonelen, struct regional *region, int id, void *callback)
Inplace callback function called before sending the query to a nameserver.
Definition: module.h:281
winsock_event.h
sock_list_prepend
void sock_list_prepend(struct sock_list **list, struct sock_list *add)
Append one list to another.
Definition: net_help.c:798
ub_randfree
void ub_randfree(struct ub_randstate *s)
Delete the random state.
Definition: random.c:204
autr_ta::s
autr_state_type s
5011 state
Definition: autotrust.h:77
views::vtree
rbtree_type vtree
rbtree of struct view
Definition: view.h:60
rpz_dname_to_trigger
static enum rpz_trigger rpz_dname_to_trigger(uint8_t *dname, size_t dname_len)
Get RPZ trigger for dname.
Definition: rpz.c:275
NETEVENT_NOERROR
#define NETEVENT_NOERROR
to pass no_error to callback function
Definition: netevent.h:81
rrset_parse::rrset_bucket_next
struct rrset_parse * rrset_bucket_next
next in hash bucket
Definition: msgparse.h:143
module.h
regional_create
struct regional * regional_create(void)
Create a new regional.
Definition: regional.c:66
log_set_time_asc
void log_set_time_asc(int use_asc)
Set if the time value is printed ascii or decimal in log entries.
Definition: log.c:203
rrset_check_sec_status
void rrset_check_sec_status(struct rrset_cache *r, struct ub_packed_rrset_key *rrset, time_t now)
Looks up security status of an rrset.
Definition: rrset.c:405
dtio_stop_ev_cb
void dtio_stop_ev_cb(int fd, short bits, void *arg)
callback for the output when the thread stops and wants to finish up
dt_io_thread
IO thread that reads from the queues and writes them.
Definition: dtstream.h:115
dt_io_thread_unregister_queue
void dt_io_thread_unregister_queue(struct dt_io_thread *dtio, struct dt_msg_queue *mq)
Unregister queue from io thread.
Definition: dtstream.c:384
pythonmod_env::fname
const char * fname
Python script filename.
Definition: pythonmod.c:82
ub_server_stats::num_query_dnscrypt_crypted
long long num_query_dnscrypt_crypted
number of queries that used dnscrypt
Definition: unbound.h:758
reply_info::flags
uint16_t flags
the flags for the answer, host byte order.
Definition: msgreply.h:127
az_find_candidate_ce
static struct auth_data * az_find_candidate_ce(struct auth_zone *z, struct query_info *qinfo, struct auth_data *n)
domain is not exact, find first candidate ce (name that matches a part of qname) in tree
Definition: authzone.c:2190
query_dname_len
size_t query_dname_len(struct sldns_buffer *query)
Determine length of dname in buffer, no compression ptrs allowed,.
Definition: dname.c:52
config_file::directory
char * directory
working directory
Definition: config_file.h:289
get_rrset_bogus
static size_t get_rrset_bogus(struct worker *worker, int reset)
get rrsets bogus number from validator
Definition: stats.c:186
BIT_AD
#define BIT_AD
AD flag.
Definition: net_help.h:59
strextstate
const char * strextstate(enum module_ext_state s)
Debug utility: module external qstate to string.
Definition: module.c:45
local_data::rrsets
struct local_rrset * rrsets
the data rrsets, with different types, linked list.
Definition: localzone.h:174
rrset_moveover_rrsigs
static int rrset_moveover_rrsigs(struct auth_data *node, uint16_t rr_type, struct auth_rrset *rrset, struct auth_rrset *rrsig)
See if rrsig set has covered sigs for rrset and move them over.
Definition: authzone.c:931
ub_ctx_set_option
int ub_ctx_set_option(struct ub_ctx *ctx, const char *opt, const char *val)
Set an option for the context.
Definition: libunbound.c:345
val_mark_indeterminate
void val_mark_indeterminate(struct reply_info *rep, struct val_anchors *anchors, struct rrset_cache *r, struct module_env *env)
Mark all unchecked rrset entries not below a trust anchor as indeterminate.
Definition: val_utils.c:1011
comm_point_delete
void comm_point_delete(struct comm_point *c)
Close and deallocate (free) the comm point.
Definition: fake_event.c:1341
log_name_addr
void log_name_addr(enum verbosity_value v, const char *str, uint8_t *zone, struct sockaddr_storage *addr, socklen_t addrlen)
Prints zone name and sockaddr in readable format with log_info.
Definition: net_help.c:543
isalldigit
static int isalldigit(const char *str, size_t l)
all digit number
Definition: config_file.c:1858
neg_cache_delete
void neg_cache_delete(struct val_neg_cache *neg)
Destroy negative cache.
Definition: val_neg.c:133
anchors_lookup
struct trust_anchor * anchors_lookup(struct val_anchors *anchors, uint8_t *qname, size_t qname_len, uint16_t qclass)
Given a qname/qclass combination, find the trust anchor closest above it.
Definition: val_anchor.c:1162
lruhash_status
void lruhash_status(struct lruhash *table, const char *id, int extended)
Output debug info to the log as to state of the hash table.
Definition: lruhash.c:459
listen_dnsport::cps
struct listen_list * cps
list of comm points used to get incoming events
Definition: listen_dnsport.h:67
sldns_wire2str_a_scan
int sldns_wire2str_a_scan(uint8_t **data, size_t *data_len, char **str, size_t *str_len)
Scan wireformat ip4 A field to string, with user buffers.
Definition: wire2str.c:1091
UB_LIBCMD_CANCEL
@ UB_LIBCMD_CANCEL
Cancel query, sent to bg worker.
Definition: context.h:222
tcp_proxy::next
struct tcp_proxy * next
next in list
Definition: delayer.c:139
az_nsec3_hash
static size_t az_nsec3_hash(uint8_t *buf, size_t buflen, uint8_t *nm, size_t nmlen, int algo, size_t iter, uint8_t *salt, size_t saltlen)
Hash a name with nsec3param into buffer, it has zone name appended.
Definition: authzone.c:2622
dt_frame_read_buf::buf_cap
size_t buf_cap
Capacity of the buffer.
Definition: dtstream.h:100
log_assert
#define log_assert(x)
an assertion that is thrown to the logfile.
Definition: log.h:229
ub_event_vmt::free
void(* free)(struct ub_event *)
Destructor for the ub_event object.
Definition: unbound-event.h:136
rrset_trust_to_string
const char * rrset_trust_to_string(enum rrset_trust s)
Get a printable string for a rrset trust value.
Definition: packed_rrset.c:229
config_file::auths
struct config_auth * auths
the auth zone definitions, linked list
Definition: config_file.h:214
ub_ctx_resolvconf
int ub_ctx_resolvconf(struct ub_ctx *ctx, const char *fname)
Read list of nameservers to use from the filename given.
Definition: libunbound.c:1072
rrset_parse::rrsig_count
size_t rrsig_count
number of RRSIGs over this rrset.
Definition: msgparse.h:171
apply_axfr
static int apply_axfr(struct auth_xfer *xfr, struct auth_zone *z, struct sldns_buffer *scratch_buffer)
apply AXFR to zone in memory.
Definition: authzone.c:4724
internal_timer::base
struct comm_base * base
the comm base
Definition: netevent.c:134
local_data_cmp
int local_data_cmp(const void *d1, const void *d2)
Compare two local_data entries in rbtree.
Definition: localzone.c:121
LDNS_RDF_TYPE_A
@ LDNS_RDF_TYPE_A
A record.
Definition: rrdef.h:276
config_file::tcp_idle_timeout
int tcp_idle_timeout
tcp idle timeout, in msec
Definition: config_file.h:105
slabhash_traverse
void slabhash_traverse(struct slabhash *sh, int wr, void(*func)(struct lruhash_entry *, void *), void *arg)
Traverse a slabhash.
Definition: slabhash.c:226
find_arg2
static int find_arg2(RES *ssl, char *arg, char **arg2)
find second argument, modifies string
Definition: remote.c:1159
perfio::timeout
struct timeval timeout
timeout value
Definition: perf.c:137
autr_process_prime
int autr_process_prime(struct module_env *env, struct val_env *ve, struct trust_anchor *tp, struct ub_packed_rrset_key *dnskey_rrset, struct module_qstate *qstate)
Perform autotrust processing.
Definition: autotrust.c:2141
create_cfg_parser
static void create_cfg_parser(struct config_file *cfg, char *filename, const char *chroot)
initialize the global cfg_parser object
Definition: config_file.c:1169
sig_info
static struct perfinfo * sig_info
signal handler global info
Definition: perf.c:148
slabhash_test
void slabhash_test(void)
unit test slabhashtable implementation
Definition: unitslabhash.c:359
replay_runtime::answer_last
struct replay_answer * answer_last
last element in answer list.
Definition: replay.h:288
forwards_find
struct delegpt * forwards_find(struct iter_forwards *fwd, uint8_t *qname, uint16_t qclass)
Find forward zone exactly by name.
Definition: iter_fwd.c:342
UB_EVENT_MAGIC
#define UB_EVENT_MAGIC
magic number to identify this version of the pluggable event api
Definition: unbound-event.h:78
sldns_file_parse_state::origin
uint8_t origin[LDNS_MAX_DOMAINLEN+1]
the origin domain name, if len!=0.
Definition: str2wire.h:220
do_flush_name
static void do_flush_name(RES *ssl, struct worker *w, char *arg)
remove name rrset from cache
Definition: remote.c:1917
read_calloc_stat
static void read_calloc_stat(char *line, rbtree_type *tree)
read up the calloc stats
Definition: memstats.c:153
iter_block
static struct module_func_block iter_block
The iterator function block.
Definition: iterator.c:3941
do_forward
static void do_forward(RES *ssl, struct worker *worker, char *args)
do the status command
Definition: remote.c:2056
inplace_cb_reply_servfail_call
int inplace_cb_reply_servfail_call(struct module_env *env, struct query_info *qinfo, struct module_qstate *qstate, struct reply_info *rep, int rcode, struct edns_data *edns, struct comm_reply *repinfo, struct regional *region)
Call the registered functions in the inplace_cb_reply linked list.
Definition: msgreply.c:1086
shm_main_info::ptr_ctl
struct ub_shm_stat_info * ptr_ctl
the global stats block, shared memory segment
Definition: shm_main.h:58
auth_xfer_timer
void auth_xfer_timer(void *arg)
xfer nextprobe timeout callback, this is part of task_nextprobe
Definition: authzone.c:6480
config_file::ip_ratelimit_size
size_t ip_ratelimit_size
memory size in bytes for ip_ratelimit cache
Definition: config_file.h:530
acl_list_create
struct acl_list * acl_list_create(void)
Create acl structure.
Definition: acl_list.c:52
config_create_forlib
struct config_file * config_create_forlib(void)
Create config file structure for library use.
Definition: config_file.c:356
val_nsec.h
module_qstate::is_priming
int is_priming
if this is a (stub or root) priming query (with hints)
Definition: module.h:602
main
int main(int argc, char *argv[])
Main routine for unbound-anchor.
Definition: unbound-anchor.c:2298
local_zone_inform_deny
@ local_zone_inform_deny
log client address, and block (drop)
Definition: localzone.h:86
wsvc_remove
void wsvc_remove(FILE *out)
Remove installed service from servicecontrolmanager, registry entries.
Definition: w_inst.c:249
N3HASHBUFLEN
#define N3HASHBUFLEN
bytes to use for NSEC3 hash buffer.
Definition: authzone.c:74
auth_zones::xtree
rbtree_type xtree
rbtree of struct auth_xfer
Definition: authzone.h:78
do_zones_add
static void do_zones_add(RES *ssl, struct local_zones *zones)
Do the local_zones command.
Definition: remote.c:1233
config_file::root_key_sentinel
int root_key_sentinel
enable root key sentinel
Definition: config_file.h:343
O_LS2
#define O_LS2(opt, name, lst)
compare and print list option
Definition: config_file.c:864
tcp_callback_writer
static void tcp_callback_writer(struct comm_point *c)
do the callback when writing is done
Definition: netevent.c:998
NORR_TTL
#define NORR_TTL
Negative cache time (for entries without any RRs.)
Definition: msgparse.h:89
packed_rrset_ptr_fixup
void packed_rrset_ptr_fixup(struct packed_rrset_data *data)
Fixup pointers in fixed data packed_rrset_data blob.
Definition: packed_rrset.c:178
daemon_remote_delete
void daemon_remote_delete(struct daemon_remote *rc)
remote control state to delete.
Definition: testbound.c:512
addrtree
Definition: addrtree.h:65
LDNS_RDF_TYPE_CERT_ALG
@ LDNS_RDF_TYPE_CERT_ALG
certificate algorithm
Definition: rrdef.h:296
rpz
RPZ containing policies.
Definition: rpz.h:92
detect_wrongly_truncated
static int detect_wrongly_truncated(struct reply_info *rep)
Detect wrong truncated response (say from BIND 9.6.1 that is forwarding and saw the NS record without...
Definition: validator.c:693
caps_white_apply_cfg
static int caps_white_apply_cfg(rbtree_type *ntree, struct config_file *cfg)
apply config caps whitelist items to name tree
Definition: iter_utils.c:111
entry::match_qname
uint8_t match_qname
match qname with answer qname
Definition: testpkts.h:174
packed_rrset_data::security
enum sec_status security
security status of the rrset data
Definition: packed_rrset.h:246
rbtree_previous
rbnode_type * rbtree_previous(rbnode_type *rbtree)
Returns previous smaller node in the tree.
Definition: rbtree.c:590
dnsc_parse_keys
static int dnsc_parse_keys(struct dnsc_env *env, struct config_file *cfg)
Parse the secret key files from dnscrypt-secret-key config and populates a list of dnsccert with es_v...
Definition: dnscrypt.c:791
cachedb_backend::lookup
int(* lookup)(struct module_env *, struct cachedb_env *, char *, struct sldns_buffer *)
Lookup (env, cachedb_env, key, result_buffer): true if found.
Definition: cachedb.h:82
lz_freeup_cfg
static void lz_freeup_cfg(struct config_file *cfg)
free memory from config
Definition: localzone.c:1041
sock_list_prepend
void sock_list_prepend(struct sock_list **list, struct sock_list *add)
Append one list to another.
Definition: net_help.c:798
entry::match_opcode
uint8_t match_opcode
match query opcode with answer opcode
Definition: testpkts.h:170
resp_addr_get_action
enum respip_action resp_addr_get_action(const struct resp_addr *addr)
returns respip action for the specified node in the respip address returns respip_none for NULL input...
Definition: respip.c:1287
val_neg_data::count
int count
the number of elements, including this one and the ones whose parents (-parents) include this one,...
Definition: val_neg.h:158
iter_store_parentside_rrset
void iter_store_parentside_rrset(struct module_env *env, struct ub_packed_rrset_key *rrset)
Store parent-side rrset in separate rrset cache entries for later last-resort * lookups in case the c...
Definition: iter_utils.c:1067
VAL_CLASS_ANY
@ VAL_CLASS_ANY
A response to a qtype=ANY query.
Definition: val_utils.h:80
prime_root
static int prime_root(struct module_qstate *qstate, struct iter_qstate *iq, int id, uint16_t qclass)
Generate and send a root priming request.
Definition: iterator.c:777
rrset_parse::rrsig_last
struct rr_parse * rrsig_last
last in list of RRSIG RRs over this rrset.
Definition: msgparse.h:175
check_read_exact
static void check_read_exact(const char *name, const char *zone)
check that a zone (in string) can be read and reproduced
Definition: unitauth.c:586
sldns_str2wire_time_buf
int sldns_str2wire_time_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_TIME from string to wireformat.
Definition: str2wire.c:1416
dns_msg_create
struct dns_msg * dns_msg_create(uint8_t *qname, size_t qnamelen, uint16_t qtype, uint16_t qclass, struct regional *region, size_t capacity)
Utility, create new, unpacked data structure for cache response.
Definition: dns.c:408
slabhash
Hash table formed from several smaller ones.
Definition: slabhash.h:57
dname_canon_lab_cmp
int dname_canon_lab_cmp(uint8_t *d1, int labs1, uint8_t *d2, int labs2, int *mlabs)
Compare dnames, Canonical in rfc4034 sense, but by label.
Definition: dname.c:802
sldns_wire2str_rr
char * sldns_wire2str_rr(uint8_t *rr, size_t len)
Convert wireformat RR to a string representation.
Definition: wire2str.c:208
tcp_req_info_create
struct tcp_req_info * tcp_req_info_create(struct sldns_buffer *spoolbuf)
Create tcp request info structure that keeps track of open requests on the TCP channel that are resol...
Definition: listen_dnsport.c:1598
mesh_state_is_unique
int mesh_state_is_unique(struct mesh_state *mstate)
Check if the mesh state is unique.
Definition: mesh.c:849
comm_base_set_slow_accept_handlers
void comm_base_set_slow_accept_handlers(struct comm_base *b, void(*stop_acc)(void *), void(*start_acc)(void *), void *arg)
Set the slow_accept mode handlers.
Definition: netevent.c:260
auth_addr_list_copy
static struct auth_addr * auth_addr_list_copy(struct auth_addr *source)
copy a list of auth_addrs
Definition: authzone.c:3665
sldns_rcodes
struct sldns_struct_lookup_table * sldns_rcodes
Response codes.
Definition: wire2str.c:101
dt_io_thread::ssl
void * ssl
ssl for current connection, type SSL*
Definition: dtstream.h:147
query_info_clear
void query_info_clear(struct query_info *m)
clear out query info structure
Definition: msgreply.c:591
traverse_post
static void traverse_post(void(*func)(rbnode_type *, void *), void *arg, rbnode_type *node)
recursive descent traverse
Definition: rbtree.c:610
dosetup
static void dosetup(struct timehist *hist)
do setup exponentially
Definition: timehist.c:71
val_find_DS
struct dns_msg * val_find_DS(struct module_env *env, uint8_t *nm, size_t nmlen, uint16_t c, struct regional *region, uint8_t *topname)
Find DS denial message in cache.
Definition: val_utils.c:1135
fake_event_init
void fake_event_init(struct replay_scenario *scen)
Initialise fake event services.
Definition: fake_event.c:123
sldns_edns_options
struct sldns_struct_lookup_table * sldns_edns_options
EDNS option codes.
Definition: wire2str.c:175
config_file::do_ip6
int do_ip6
do ip6 query support.
Definition: config_file.h:87
change
static void change(FILE *out, char *path, size_t max, const char *from, const char *to)
change suffix
Definition: w_inst.c:175
context_lookup_new_query
struct ctx_query * context_lookup_new_query(struct ub_ctx *ctx, uint8_t *p, uint32_t len)
Lookup query from new_query buffer.
Definition: context.c:278
read_names
static int read_names(struct iter_priv *priv, struct config_file *cfg)
Read private-domain declarations from config.
Definition: iter_priv.c:109
UB_EV_PERSIST
#define UB_EV_PERSIST
event must persist
Definition: unbound-event.h:75
lruhash_entry::lru_next
struct lruhash_entry * lru_next
next entry in lru chain.
Definition: lruhash.h:214
local_data_find_type
static struct local_rrset * local_data_find_type(struct local_data *data, uint16_t type, int alias_ok)
Find an rrset in local data structure.
Definition: localzone.c:293
new_rrset
static struct rrset_parse * new_rrset(struct msg_parse *msg, uint8_t *dname, size_t dnamelen, uint16_t type, uint16_t dclass, hashvalue_type hash, uint32_t rrset_flags, sldns_pkt_section section, struct regional *region)
Allocate new rrset in region, fill with data.
Definition: msgparse.c:77
reply_info::rrsets
struct ub_packed_rrset_key ** rrsets
List of pointers (only) to the rrsets in the order in which they appear in the reply message.
Definition: msgreply.h:193
port_if::avail_ports
int * avail_ports
the available ports array.
Definition: outside_network.h:182
config_file::target_fetch_policy
char * target_fetch_policy
the target fetch policy for the iterator
Definition: config_file.h:173
TARGET_FETCH_STOP
#define TARGET_FETCH_STOP
at what query-sent-count to stop target fetch policy
Definition: iterator.h:87
mesh_stats
void mesh_stats(struct mesh_area *mesh, const char *str)
Print some stats about the mesh to the log.
Definition: mesh.c:1726
ub_result::ttl
int ttl
TTL for the result, in seconds.
Definition: unbound.h:217
interfacechecks
static void interfacechecks(struct config_file *cfg)
check interface strings
Definition: unbound-checkconf.c:332
todo_probe
static struct trust_anchor * todo_probe(struct module_env *env, time_t *next)
fetch first to-probe trust-anchor and lock it and set retrytime
Definition: autotrust.c:2391
config_file::val_nsec3_key_iterations
char * val_nsec3_key_iterations
nsec3 maximum iterations per key size, string
Definition: config_file.h:377
ub_event_vmt::add_bits
void(* add_bits)(struct ub_event *, short)
Add event bits for this event to fire on.
Definition: unbound-event.h:128
skip_pkt_rr
static int skip_pkt_rr(sldns_buffer *pkt)
skip RR in packet
Definition: msgparse.c:1037
delegpt_count_ns
void delegpt_count_ns(struct delegpt *dp, size_t *numns, size_t *missing)
count NS and number missing for logging
Definition: iter_delegpt.c:227
fake_event_cleanup
void fake_event_cleanup(void)
Deinit fake event services.
Definition: fake_event.c:129
LDNS_RR_TYPE_NSAP
@ LDNS_RR_TYPE_NSAP
RFC1706.
Definition: rrdef.h:127
dlv_topdomain
static void dlv_topdomain(struct ub_packed_rrset_key *nsec, uint8_t *qname, uint8_t **nm, size_t *nm_len)
Find shared topdomain that exists.
Definition: val_nsec.c:549
read_root_hints
static int read_root_hints(struct iter_hints *hints, char *fname)
read root hints from file
Definition: iter_hints.c:299
xfr_process_chunk_list
static int xfr_process_chunk_list(struct auth_xfer *xfr, struct module_env *env, int *ixfr_fail)
process chunk list and update zone in memory, return false if it did not work
Definition: authzone.c:4972
query_info::qclass
uint16_t qclass
qclass, host byte order
Definition: msgreply.h:81
dt_io_thread::socket_path
char * socket_path
the file path for unix socket (or NULL)
Definition: dtstream.h:209
sldns_opcodes
sldns_lookup_table * sldns_opcodes
Operation codes.
Definition: wire2str.c:111
config_file::harden_glue
int harden_glue
harden against spoofed glue (out of zone data)
Definition: config_file.h:252
reply_info::ar_numrrsets
size_t ar_numrrsets
Count of additional section RRsets.
Definition: msgreply.h:181
sldns_wire2str_dname_buf
int sldns_wire2str_dname_buf(uint8_t *dname, size_t dname_len, char *str, size_t len)
Convert wire dname to a string, "example.com.".
Definition: wire2str.c:311
serviced_check_qname
static int serviced_check_qname(sldns_buffer *pkt, uint8_t *qbuf, size_t qbuflen)
check that perturbed qname is identical
Definition: outside_network.c:1663
val_verify_rrset_entry
enum sec_status val_verify_rrset_entry(struct module_env *env, struct val_env *ve, struct ub_packed_rrset_key *rrset, struct key_entry_key *kkey, char **reason, sldns_pkt_section section, struct module_qstate *qstate)
Verify RRset with keys from a keyset.
Definition: val_utils.c:393
addr_tree_compare
int addr_tree_compare(const void *k1, const void *k2)
compare addr tree nodes
Definition: dnstree.c:60
rrset_has_signer
static int rrset_has_signer(struct ub_packed_rrset_key *rrset, uint8_t *name, size_t len)
see if rrset has signer name as one of the rrsig signers
Definition: val_utils.c:833
serviced_query::tls_auth_name
char * tls_auth_name
the name of the tls authentication name, eg.
Definition: outside_network.h:345
rbtree_delete
rbnode_type * rbtree_delete(rbtree_type *rbtree, const void *key)
Delete element from tree.
Definition: rbtree.c:329
lru_touch
void lru_touch(struct lruhash *table, struct lruhash_entry *entry)
Touch entry, so it becomes the most recently used in the LRU list.
Definition: lruhash.c:288
sldns_wire2str_wks_scan
int sldns_wire2str_wks_scan(uint8_t **data, size_t *data_len, char **str, size_t *str_len)
Scan wireformat WKS field to string, with user buffers.
Definition: wire2str.c:1470
tube::cmd_read
size_t cmd_read
are we currently reading a command, 0 if not, else bytecount
Definition: tube.h:77
val_qstate::qchase
struct query_info qchase
The query name we have chased to; qname after following CNAMEs.
Definition: validator.h:168
algo_needs_missing
int algo_needs_missing(struct algo_needs *n)
See which algo is missing.
Definition: val_sigcrypt.c:471
server_stats_compile
void server_stats_compile(struct worker *worker, struct ub_stats_info *s, int reset)
Compile stats into structure for this thread worker.
Definition: stats.c:254
val_favorite_ds_algo
int val_favorite_ds_algo(struct ub_packed_rrset_key *ds_rrset)
Return algo number for favorite (best) algorithm that we support in DS.
Definition: val_utils.c:465
edns_opt_list_remove
int edns_opt_list_remove(struct edns_option **list, uint16_t code)
Remove any option found on the edns option list that matches the code.
Definition: msgreply.c:1003
pythonmod_get_mem
size_t pythonmod_get_mem(struct module_env *env, int id)
python module alloc size routine
Definition: pythonmod.c:569
serviced_perturb_qname
static void serviced_perturb_qname(struct ub_randstate *rnd, uint8_t *qbuf, size_t len)
perturb a dname capitalization randomly
Definition: outside_network.c:1544
local_zone::taglen
size_t taglen
length of the taglist (in bytes)
Definition: localzone.h:145
ub_poll
int ub_poll(struct ub_ctx *ctx)
Poll a context to see if it has any new results Do not poll in a loop, instead extract the fd below t...
Definition: libunbound.c:504
timehist_export
void timehist_export(struct timehist *hist, long long *array, size_t sz)
Export histogram to an array.
Definition: timehist.c:228
prime_supers
static void prime_supers(struct module_qstate *qstate, int id, struct module_qstate *forq)
Return priming query results to interested super querystates.
Definition: iterator.c:3121
inplace_cb_reply_local_call
int inplace_cb_reply_local_call(struct module_env *env, struct query_info *qinfo, struct module_qstate *qstate, struct reply_info *rep, int rcode, struct edns_data *edns, struct comm_reply *repinfo, struct regional *region)
Call the registered functions in the inplace_cb_reply_local linked list.
Definition: msgreply.c:1076
trust_anchor::dnskey_rrset
struct ub_packed_rrset_key * dnskey_rrset
The DNSKEY RRset.
Definition: val_anchor.h:120
sldns_wire2str_hip_scan
int sldns_wire2str_hip_scan(uint8_t **data, size_t *data_len, char **str, size_t *str_len)
Scan wireformat HIP (algo, HIT, pubkey) field to string, with user buffers.
Definition: wire2str.c:1603
module_func_block::inform_super
void(* inform_super)(struct module_qstate *qstate, int id, struct module_qstate *super)
inform super querystate about the results from this subquerystate.
Definition: module.h:724
sldns_wire2str_eui64_scan
int sldns_wire2str_eui64_scan(uint8_t **data, size_t *data_len, char **str, size_t *str_len)
Scan wireformat EUI64 field to string, with user buffers.
Definition: wire2str.c:1678
msgparse_bucket_remove
void msgparse_bucket_remove(struct msg_parse *msg, struct rrset_parse *rrset)
Remove rrset from hash table.
Definition: msgparse.c:265
iter_forward_zone::parent
struct iter_forward_zone * parent
pointer to parent in tree (or NULL if none)
Definition: iter_fwd.h:82
optind
int optind
getopt global, in case header files fail to declare it.
FSTRM_CONTROL_FRAME_START
#define FSTRM_CONTROL_FRAME_START
control frame value to denote the control frame START
Definition: dnstap_fstrm.h:102
sldns_buffer_read_u8_at
INLINE uint8_t sldns_buffer_read_u8_at(sldns_buffer *buffer, size_t at)
returns the byte value at the given position in the buffer
Definition: sbuffer.h:626
provide_file_chunked
static void provide_file_chunked(SSL *ssl, char *fname)
provide file over SSL, chunked encoding
Definition: petal.c:438
tcp_connect_errno_needs_log
int tcp_connect_errno_needs_log(struct sockaddr *addr, socklen_t addrlen)
See if errno for tcp connect has to be logged or not.
Definition: netevent.c:328
config_parse_taglist
uint8_t * config_parse_taglist(struct config_file *cfg, char *str, size_t *listlen)
parse taglist from string into bytestring with bitlist.
Definition: config_file.c:1956
LDNS_SECTION_ANY
@ LDNS_SECTION_ANY
bogus section, if not interested
Definition: pkthdr.h:122
comm_reply::pktinfo
union comm_reply::@6 pktinfo
the return source interface data
ub_event_vmt::winsock_tcp_wouldblock
void(* winsock_tcp_wouldblock)(struct ub_event *, int eventbit)
Libunbound will signal the eventloop when a TCP windows socket will block on next read or write (give...
Definition: unbound-event.h:158
reply_info_parsedelete
void reply_info_parsedelete(struct reply_info *rep, struct alloc_cache *alloc)
Delete reply_info and packed_rrsets (while they are not yet added to the hashtables....
Definition: msgreply.c:533
worker_create
struct worker * worker_create(struct daemon *daemon, int id, int *ports, int n)
Create the worker structure.
Definition: worker.c:1700
libworker.h
az_generate_answer_with_node
static int az_generate_answer_with_node(struct auth_zone *z, struct query_info *qinfo, struct regional *region, struct dns_msg *msg, struct auth_data *node)
Create answers when an exact match exists for the domain name.
Definition: authzone.c:3132
key_created
static int key_created
if key has been created
Definition: log.c:68
RESPONSE_TYPE_UNTYPED
@ RESPONSE_TYPE_UNTYPED
'untyped' means that the type of this response hasn't been assigned.
Definition: iter_resptype.h:57
cachedb_backend::store
void(* store)(struct module_env *, struct cachedb_env *, char *, uint8_t *, size_t, time_t)
Store (env, cachedb_env, key, data, data_len)
Definition: cachedb.h:86
print_hex_buf
static int print_hex_buf(char **s, size_t *slen, uint8_t *buf, size_t len)
print hex format into text buffer for specified length
Definition: wire2str.c:344
tcp_req_info_add_result
static int tcp_req_info_add_result(struct tcp_req_info *req, uint8_t *buf, size_t len)
Add a result to the result list.
Definition: listen_dnsport.c:1872
EDNSSUBNET_ADDRFAM_IP4
#define EDNSSUBNET_ADDRFAM_IP4
In use by the edns subnet option code, as assigned by IANA.
Definition: edns-subnet.h:46
calc_next_probe
static time_t calc_next_probe(struct module_env *env, time_t wait)
calculate next probe time
Definition: autotrust.c:1999
reply_info_sortref
void reply_info_sortref(struct reply_info *rep)
Sorts the ref array.
Definition: msgreply.c:507
reply_info_set_ttls
void reply_info_set_ttls(struct reply_info *rep, time_t timenow)
Set TTLs inside the replyinfo to absolute values.
Definition: msgreply.c:514
addr_in_common
int addr_in_common(struct sockaddr_storage *addr1, int net1, struct sockaddr_storage *addr2, int net2, socklen_t addrlen)
See how many bits are shared, equal, between two addrs.
Definition: net_help.c:698
ub_server_stats::ans_bogus
long long ans_bogus
answers that were bogus (withheld as SERVFAIL)
Definition: unbound.h:729
replay_moment::time_step
int time_step
The replay time step number.
Definition: replay.h:185
lruhash::sizefunc
lruhash_sizefunc_type sizefunc
the size function for entries in this table
Definition: lruhash.h:151
perfinfo::qlist_capacity
size_t qlist_capacity
allocated size of qlist array
Definition: perf.c:121
ub_c_wrap
int ub_c_wrap(void)
wrap function
Definition: config_file.c:1645
val_qstate::trust_anchor_labs
int trust_anchor_labs
trust anchor labels
Definition: validator.h:195
dt_io_list_item::queue
struct dt_msg_queue * queue
buffer of this worker
Definition: dtstream.h:231
ub_event_vmt::del
int(* del)(struct ub_event *)
Deactivate the event.
Definition: unbound-event.h:140
config_file::outgoing_num_ports
int outgoing_num_ports
outgoing port range number of ports (per thread)
Definition: config_file.h:135
sldns_wire2str_b64_scan_num
static int sldns_wire2str_b64_scan_num(uint8_t **d, size_t *dl, char **s, size_t *sl, size_t num)
scan number of bytes from wire into b64 presentation format
Definition: wire2str.c:1221
rrset_array_unlock
void rrset_array_unlock(struct rrset_ref *ref, size_t count)
Unlock array (sorted) of rrset references.
Definition: rrset.c:326
ub_server_stats::qipv6
long long qipv6
number of queries over IPv6
Definition: unbound.h:701
mesh_reply
Reply to a client.
Definition: mesh.h:216
xml_parse_setup
static void xml_parse_setup(XML_Parser parser, struct xml_data *data, time_t now)
XML parser setup of the callbacks for the tags.
Definition: unbound-anchor.c:1558
sldns_fget_token_l
ssize_t sldns_fget_token_l(FILE *f, char *token, const char *delim, size_t limit, int *line_nr)
returns a token/char from the stream F.
Definition: parse.c:33
filter_first
static struct ub_packed_rrset_key * filter_first(struct nsec3_filter *filter, size_t *rrsetnum, int *rrnum)
Start iterating over NSEC3 records.
Definition: val_nsec3.c:373
delegpt_add_ns_mlc
int delegpt_add_ns_mlc(struct delegpt *dp, uint8_t *name, uint8_t lame)
add a name to malloced delegation point.
Definition: iter_delegpt.c:579
config_file::ip_dscp
int ip_dscp
IP_TOS socket option requested on port 53 sockets.
Definition: config_file.h:194
optind
int optind
getopt global, in case header files fail to declare it.
slabhash::array
struct lruhash ** array
lookup array of hash tables
Definition: slabhash.h:65
acl_deny_non_local
@ acl_deny_non_local
disallow any access to zones that aren't local, drop it
Definition: acl_list.h:60
outbound_list::first
struct outbound_entry * first
The linked list of outbound query entries.
Definition: outbound_list.h:54
check_chroot_filelist
static void check_chroot_filelist(const char *desc, struct config_strlist *list, const char *chrootdir, struct config_file *cfg)
check file list, every file must be inside the chroot location
Definition: unbound-checkconf.c:476
dt_io_thread::reconnect_timeout
int reconnect_timeout
the current reconnection timeout, it is increased with exponential backoff, in msec
Definition: dtstream.h:186
xfr_transfer_start_lookups
static void xfr_transfer_start_lookups(struct auth_xfer *xfr)
start the lookups for task_transfer
Definition: authzone.c:3752
pkt_dname_len
size_t pkt_dname_len(sldns_buffer *pkt)
Determine correct, compressed, dname present in packet.
Definition: dname.c:183
alloc_clear
void alloc_clear(struct alloc_cache *alloc)
Free the alloc.
Definition: alloc.c:160
ub_event_set_fd
void ub_event_set_fd(struct ub_event *ev, int fd)
Change or set the file descriptor on the event.
Definition: ub_event_pluggable.c:565
comm_timer_create
struct comm_timer * comm_timer_create(struct comm_base *base, void(*cb)(void *), void *cb_arg)
create timer.
Definition: fake_event.c:1494
auth_xfer::dclass
uint16_t dclass
the class of this zone, in host byteorder.
Definition: authzone.h:214
config_file::hide_version
int hide_version
do not report version (version.server, version.bind)
Definition: config_file.h:315
ub_server_stats::qtls_resume
long long qtls_resume
number of TLS connection resume
Definition: unbound.h:791
ce_response::ce_len
size_t ce_len
length of ce
Definition: val_nsec3.c:82
serviced_query::dnssec
int dnssec
If an EDNS section is included, the DO/CD bit will be turned on.
Definition: outside_network.h:336
sldns_struct_rr_descriptor::_minimum
uint8_t _minimum
Minimum number of rdata fields in the RRs of this type.
Definition: rrdef.h:456
find_match
struct entry * find_match(struct entry *entries, uint8_t *query_pkt, size_t len, enum transport_type transport)
finds entry in list, or returns NULL.
Definition: testpkts.c:1427
module_env::worker_base
struct comm_base * worker_base
the worker event base
Definition: module.h:471
mesh_add_sub
int mesh_add_sub(struct module_qstate *qstate, struct query_info *qinfo, uint16_t qflags, int prime, int valrec, struct module_qstate **newq, struct mesh_state **sub)
Add detached query.
Definition: mesh.c:1001
codeline_cmp
int codeline_cmp(const void *a, const void *b)
compare two codeline structs for rbtree from memstats test app
Definition: unbound-dnstap-socket.c:1580
delegpt_rrset_add_ns
int delegpt_rrset_add_ns(struct delegpt *dp, struct regional *regional, struct ub_packed_rrset_key *ns_rrset, uint8_t lame)
Add NS rrset; calls add_ns repeatedly.
Definition: iter_delegpt.c:399
my_event
Definition: ub_event_pluggable.c:142
respip_action
respip_action
Valid response ip actions for the IP-response-driven-action feature; defined here instead of in the r...
Definition: localzone.h:536
ub_version
const char * ub_version(void)
Get a version string from the libunbound implementation.
Definition: libunbound.c:1380
check_packet_ok
static int check_packet_ok(sldns_buffer *pkt, uint16_t qtype, struct auth_xfer *xfr, uint32_t *serial)
check if returned packet is OK
Definition: authzone.c:4032
ecs_whitelist_delete
void ecs_whitelist_delete(struct ecs_whitelist *whitelist)
Delete ecs_whitelist structure.
donotq_str_cfg
static int donotq_str_cfg(struct iter_donotq *dq, const char *str)
apply donotq string
Definition: iter_donotq.c:92
daemon_remote::busy_list
struct rc_state * busy_list
current commpoints busy; should be a short list, malloced
Definition: remote.h:101
isip6
static int isip6(const char *nm, char **res)
determine if str is ip6 and put into reverse lookup format
Definition: unbound-host.c:134
ipset_init
int ipset_init(struct module_env *env, int id)
Init the ipset module.
Definition: ipset.c:226
comm_reply
Reply information for a communication point.
Definition: netevent.h:113
ub_openssl_lock_init
int ub_openssl_lock_init(void)
Initialize openssl locking for thread safety.
Definition: net_help.c:1334
dtio_stop_timer_cb
void dtio_stop_timer_cb(int fd, short bits, void *arg)
callback for the timer when the thread stops and wants to finish up
mesh_serve_expired_lookup
struct dns_msg * mesh_serve_expired_lookup(struct module_qstate *qstate, struct query_info *lookup_qinfo)
Try to get a (expired) cached answer.
Definition: mesh.c:363
processLastResort
static int processLastResort(struct module_qstate *qstate, struct iter_qstate *iq, struct iter_env *ie, int id)
Called by processQueryTargets when it would like extra targets to query but it seems to be out of opt...
Definition: iterator.c:1910
val_state_to_string
const char * val_state_to_string(enum val_state state)
Get validator state as a string.
Definition: validator.c:3280
ub_event.h
iter_state_to_string
const char * iter_state_to_string(enum iter_state state)
Get iterator state as a string.
Definition: iterator.c:3954
optarg
char * optarg
getopt global, in case header files fail to declare it.
infra_cache::domain_rates
struct slabhash * domain_rates
hash table with query rates per name: rate_key, rate_data
Definition: infra.h:118
dt_io_thread::command_event
void * command_event
the event to listen to the commandpipe
Definition: dtstream.h:173
query_info_parse
int query_info_parse(struct query_info *m, sldns_buffer *query)
Parse wire query into a queryinfo structure, return 0 on parse error.
Definition: msgreply.c:546
dt_io_thread::client_cert_file
char * client_cert_file
client cert files: the .pem file
Definition: dtstream.h:220
VAL_CLASS_UNTYPED
@ VAL_CLASS_UNTYPED
Not subtyped yet.
Definition: val_utils.h:63
nsec_closest_encloser
uint8_t * nsec_closest_encloser(uint8_t *qname, struct ub_packed_rrset_key *nsec)
Determine closest encloser of a query name and the NSEC that covers it (and thus disproved it).
Definition: val_nsec.c:475
delegpt_add_neg_msg
void delegpt_add_neg_msg(struct delegpt *dp, struct msgreply_entry *msg)
Add negative message to delegation point.
Definition: iter_delegpt.c:497
sldns_wire2str_rr_unknown_scan
int sldns_wire2str_rr_unknown_scan(uint8_t **data, size_t *data_len, char **str, size_t *str_len, uint8_t *pkt, size_t pktlen, int *comprloop)
Scan wireformat RR to string in unknown RR format, with user buffers.
Definition: wire2str.c:547
sldns_buffer_begin
INLINE uint8_t * sldns_buffer_begin(const sldns_buffer *buffer)
returns a pointer to the beginning of the buffer (the data at position 0).
Definition: sbuffer.h:344
verbosity
enum verbosity_value verbosity
The global verbosity setting.
Definition: log.c:64
stat_printout
static void stat_printout(struct perfinfo *info, struct timeval *now, struct timeval *elapsed)
print nice stats about qps
Definition: perf.c:338
config_file::ratelimit_slabs
size_t ratelimit_slabs
number of slabs for ratelimit cache
Definition: config_file.h:537
ub_signal_new
struct ub_event * ub_signal_new(struct ub_event_base *, int fd, void(*cb)(int, short, void *), void *arg)
Create a new ub_event signal for the event base.
Definition: ub_event.c:314
fptr_whitelist_modenv_kill_sub
int fptr_whitelist_modenv_kill_sub(void(*fptr)(struct module_qstate *newq))
Check function pointer whitelist for module_env kill_sub callback values.
Definition: fptr_wlist.c:373
config_file::val_log_level
int val_log_level
log bogus messages by the validator
Definition: config_file.h:356
fptr_whitelist_event
int fptr_whitelist_event(void(*fptr)(int, short, void *))
Check function pointer whitelist for event structure callback values.
Definition: fptr_wlist.c:164
mesh_area::all
rbtree_type all
rbtree of all current queries (mesh_state.node)
Definition: mesh.h:91
delegpt_rrset_add_ns
int delegpt_rrset_add_ns(struct delegpt *dp, struct regional *region, struct ub_packed_rrset_key *ns_rrset, uint8_t lame)
Add NS rrset; calls add_ns repeatedly.
Definition: iter_delegpt.c:399
rrset_data_delete
void rrset_data_delete(void *data, void *userdata)
Old data to be deleted.
sldns_wire2str_nsec3_salt_scan
int sldns_wire2str_nsec3_salt_scan(uint8_t **d, size_t *dl, char **s, size_t *sl)
Scan wireformat nsec3_salt field to string, with user buffers.
Definition: wire2str.c:1302
dnscrypt.h
val_qstate::key_entry
struct key_entry_key * key_entry
the current key entry
Definition: validator.h:208
iter_inform_super
void iter_inform_super(struct module_qstate *qstate, int id, struct module_qstate *super)
Return priming query results to interested super querystates.
Definition: iterator.c:3588
find_key
static int find_key(struct trust_anchor *tp, uint16_t t, uint8_t *rdata, size_t rdata_len, struct autr_ta **result)
Find key.
Definition: autotrust.c:1409
go_cmd
static int go_cmd(SSL *ssl, int fd, int quiet, int argc, char *argv[])
send command and display result
Definition: unbound-control.c:754
handle_origin
static int handle_origin(char *line, uint8_t **origin, size_t *origin_len)
handle origin lines
Definition: autotrust.c:904
perfsetup
static void perfsetup(struct perfinfo *info)
setup perf test environment
Definition: perf.c:205
fake_pending::addrlen
socklen_t addrlen
len of addr
Definition: replay.h:334
rrset_update_sec_status
void rrset_update_sec_status(struct rrset_cache *r, struct ub_packed_rrset_key *rrset, time_t now)
Update security status of an rrset.
Definition: rrset.c:366
tcp_proxy::answerlast
struct tcp_send_list * answerlast
last in answerlist
Definition: delayer.c:136
mesh_state_ref_compare
int mesh_state_ref_compare(const void *ap, const void *bp)
compare two mesh references
Definition: mesh.c:234
packed_rrset_key
The identifying information for an RRset.
Definition: packed_rrset.h:74
ub_server_stats::num_query_subnet_cache
long long num_query_subnet_cache
number of queries answered from edns-subnet specific data, and the answer was from the edns-subnet ca...
Definition: unbound.h:787
resp_addr_del
static void resp_addr_del(rbnode_type *n, void *ATTR_UNUSED(arg))
helper traverse to delete resp_addr nodes
Definition: respip.c:74
remote_stream
Connection to print to, either SSL or plain over fd.
Definition: remote.h:111
replay_moment::repevt_traffic
@ repevt_traffic
cause traffic to flow
Definition: replay.h:216
LDNS_RR_TYPE_RKEY
@ LDNS_RR_TYPE_RKEY
draft-reid-dnsext-rkey
Definition: rrdef.h:191
port_insert
static int port_insert(struct listen_port **list, int s, enum listen_type ftype)
Add port to open ports list.
Definition: listen_dnsport.c:1097
subtract_1982
static uint32_t subtract_1982(uint32_t a, uint32_t b)
if we know that b is larger than a, return the difference between them, that is the distance between ...
Definition: val_sigcrypt.c:1249
S_MEMSIZE
#define S_MEMSIZE(str, var)
put memsize into variable
Definition: config_file.c:415
reset_holddown
static void reset_holddown(struct module_env *env, struct autr_ta *ta, int *changed)
Set last_change to now.
Definition: autotrust.c:1700
rdata_copy
static int rdata_copy(sldns_buffer *pkt, struct packed_rrset_data *data, uint8_t *to, struct rr_parse *rr, time_t *rr_ttl, uint16_t type, sldns_pkt_section section)
do the rdata copy
Definition: msgreply.c:181
test_anchor_empty
static void test_anchor_empty(struct val_anchors *a)
test empty set
Definition: unitanchor.c:51
name_tree_insert
int name_tree_insert(rbtree_type *tree, struct name_tree_node *node, uint8_t *name, size_t len, int labs, uint16_t dclass)
insert element into name tree.
Definition: dnstree.c:84
listen_sslctx_setup_2
void listen_sslctx_setup_2(void *ctxt)
Further setup of listening SSL context, after keys loaded.
Definition: net_help.c:952
entry::match_do
uint8_t match_do
match DO bit
Definition: testpkts.h:190
https_to_ip
static BIO * https_to_ip(struct ip_list *ip, const char *pathname, const char *urlname, struct ip_list *src, int use_sni)
https to an IP addr, return BIO with pathname or NULL
Definition: unbound-anchor.c:1127
ub_winsock_unregister_wsaevent
void ub_winsock_unregister_wsaevent(struct ub_event *ev)
Free a with a wsaevent associated event.
Definition: ub_event_pluggable.c:652
tcp_req_info::done_req_list
struct tcp_req_done_item * done_req_list
list of pending writable result packets, malloced one at a time
Definition: listen_dnsport.h:272
key_entry_keysize
size_t key_entry_keysize(struct key_entry_key *kkey)
Get keysize of the keyentry.
Definition: val_kentry.c:397
ctx_query::async
int async
was this an async query?
Definition: context.h:154
load_cache
int load_cache(RES *ssl, struct worker *worker)
Load cache(s) from text.
Definition: cachedump.c:702
rbtree_create
rbtree_type * rbtree_create(int(*cmpf)(const void *, const void *))
Create new tree (malloced) with given key compare function.
Definition: rbtree.c:78
val_neg_data::parent
struct val_neg_data * parent
pointer to parent node in the negative cache
Definition: val_neg.h:153
listening_ports_open
struct listen_port * listening_ports_open(struct config_file *cfg, int *reuseport)
Create shared listening ports Getaddrinfo, create socket, bind and listen to zero or more interfaces ...
Definition: listen_dnsport.c:1443
ub_ctx::created_bg
int created_bg
is bg worker created yet ?
Definition: context.h:87
mesh_continue
static int mesh_continue(struct mesh_area *mesh, struct mesh_state *mstate, enum module_ext_state s, enum module_ev *ev)
Continue processing the mesh state at another module.
Definition: mesh.c:1585
sldns_rr_classes
struct sldns_struct_lookup_table * sldns_rr_classes
lookuptable for rr classes
Definition: rrdef.c:28
auth_transfer::scan_addr
struct auth_addr * scan_addr
what address we are scanning for the master, or NULL if the master is in IP format itself
Definition: authzone.h:385
config_strlist::str
char * str
config option string
Definition: config_file.h:725
handle_newq
static void handle_newq(struct libworker *w, uint8_t *buf, uint32_t len)
handle new query command for bg worker
Definition: libworker.c:793
module_event_capsfail
@ module_event_capsfail
reply is there, but capitalisation check failed
Definition: module.h:563
slabhash_insert
void slabhash_insert(struct slabhash *sl, hashvalue_type hash, struct lruhash_entry *entry, void *data, void *arg)
Insert a new element into the hashtable, uses lruhash_insert.
Definition: slabhash.c:116
log_thread_set
void log_thread_set(int *num)
Init a thread (will print this number for the thread log entries).
Definition: log.c:167
delegpt_no_ipv4
void delegpt_no_ipv4(struct delegpt *dp)
Register the fact that there is no ipv4 and thus As are not going to be queried for or be useful.
Definition: iter_delegpt.c:520
sldns_cert_algorithms
sldns_lookup_table * sldns_cert_algorithms
Taken from RFC 2538, section 2.1.
Definition: wire2str.c:84
ub_ctx_debugout
int ub_ctx_debugout(struct ub_ctx *ctx, void *out)
Set debug output (and error output) to the specified stream.
Definition: libunbound.c:475
wsvc_desetup_worker
void wsvc_desetup_worker(struct worker *worker)
Desetup lead worker events.
Definition: win_svc.c:627
lock_ref::file
char * file
why is this ref
Definition: lock_verify.c:96
dynlibmod_get_mem
size_t dynlibmod_get_mem(struct module_env *env, int id)
dynlib module alloc size routine
Definition: dynlibmod.c:201
insert_section
static int insert_section(struct reply_info *rep, size_t num_rrsets, uint16_t *num_rrs, sldns_buffer *pkt, size_t rrsets_before, time_t timenow, struct regional *region, struct compress_tree_node **tree, sldns_pkt_section s, uint16_t qtype, int dnssec, size_t rr_offset)
store msg section in wireformat buffer, return RETVAL_*
Definition: msgencode.c:542
testfromdrillfile
static void testfromdrillfile(sldns_buffer *pkt, struct alloc_cache *alloc, sldns_buffer *out, const char *fname)
simple test of parsing, drill file
Definition: unitmsgparse.c:467
module_qstate::respip_action_info
struct respip_action_info * respip_action_info
Extended result of response-ip action processing, mainly for logging purposes.
Definition: module.h:662
pretty_class
static void pretty_class(char *s, size_t len, int c)
nice string for class
Definition: unbound-host.c:238
libworker_handle_reply
int libworker_handle_reply(struct comm_point *c, void *arg, int error, struct comm_reply *reply_info)
process incoming replies from the network
Definition: libworker.c:876
ub_winsock_tcp_wouldblock
void ub_winsock_tcp_wouldblock(struct ub_event *ev, int eventbits)
Signal the eventloop when a TCP windows socket will block on next read or write (given by the eventbi...
Definition: ub_event_pluggable.c:663
outside_network::unwanted_threshold
size_t unwanted_threshold
threshold when to take defensive action.
Definition: outside_network.h:94
view_cmp
int view_cmp(const void *v1, const void *v2)
Compare two view entries in rbtree.
Definition: view.c:48
hexstr2bin
static size_t hexstr2bin(char *hexstr, int len, uint8_t *buf, size_t offset, size_t buf_len)
Converts a hex string to binary data.
Definition: testpkts.c:295
rpz_insert_rr
int rpz_insert_rr(struct rpz *r, uint8_t *azname, size_t aznamelen, uint8_t *dname, size_t dnamelen, uint16_t rr_type, uint16_t rr_class, uint32_t rr_ttl, uint8_t *rdatawl, size_t rdatalen, uint8_t *rr, size_t rr_len)
Create policy from RR and add to this RPZ.
Definition: rpz.c:589
infra_deldatafunc
void infra_deldatafunc(void *d, void *arg)
delete data and destroy the lameness hashtable
iter_server_selection
struct delegpt_addr * iter_server_selection(struct iter_env *iter_env, struct module_env *env, struct delegpt *dp, uint8_t *name, size_t namelen, uint16_t qtype, int *dnssec_lame, int *chase_to_rd, int open_target, struct sock_list *blacklist, time_t prefetch)
Select a valid, nice target to send query to.
Definition: iter_utils.c:549
tcp_proxy::addr_len
socklen_t addr_len
length of address
Definition: delayer.c:125
pythonmod_env::func_operate
PyObject * func_operate
Module operate function.
Definition: pythonmod.c:92
libworker::ctx
struct ub_ctx * ctx
context we are operating under
Definition: libworker.h:72
ub_c_error
void ub_c_error(const char *str)
parsing helpers: print error with file and line numbers
Definition: config_file.c:1638
dname_remove_label
void dname_remove_label(uint8_t **dname, size_t *len)
Snip off first label from a dname, returning the parent zone.
Definition: dname.c:728
sldns_wire2str_rcode_print
int sldns_wire2str_rcode_print(char **s, size_t *slen, int rcode)
Print host format rcode to string.
Definition: wire2str.c:871
parse_id
static struct trust_anchor * parse_id(struct val_anchors *anchors, char *line)
parse id sequence for anchor
Definition: autotrust.c:810
ub_ctx_async
int ub_ctx_async(struct ub_ctx *ctx, int dothread)
Set a context behaviour for asynchronous action.
Definition: libunbound.c:487
ub_signal_add
int ub_signal_add(struct ub_event *ev, struct timeval *tv)
Activate a signal event.
Definition: ub_event.c:415
rrset_parse::rr_last
struct rr_parse * rr_last
last in list of RRs in this rrset.
Definition: msgparse.h:169
daemon::tcl
struct tcl_list * tcl
TCP connection limit, limit connections from client IPs.
Definition: daemon.h:117
xml_data::ds
BIO * ds
the compiled anchors as DS records
Definition: unbound-anchor.c:1203
do_lookup
static struct ub_result * do_lookup(struct ub_ctx *ctx, char *domain)
lookup data
Definition: anchor-update.c:66
lruhash_delkeyfunc_type
void(* lruhash_delkeyfunc_type)(void *, void *)
old keys are deleted.
Definition: lruhash.h:135
delegpt_set_name
int delegpt_set_name(struct delegpt *dp, struct regional *regional, uint8_t *name)
Set name of delegation point.
Definition: iter_delegpt.c:94
SERVE_EXPIRED
int SERVE_EXPIRED
If we serve expired entries and prefetch them.
Definition: msgreply.c:65
transport_type
transport_type
Type of transport, since some entries match based on UDP or TCP of query.
Definition: testpkts.h:146
entry::reply_list
struct reply_packet * reply_list
pre canned reply
Definition: testpkts.h:201
auth_xfer_transfer_timer_callback
void auth_xfer_transfer_timer_callback(void *arg)
xfer transfer timeout callback, part of task_transfer
Definition: authzone.c:5784
sldns_str2wire_rdf_buf
int sldns_str2wire_rdf_buf(const char *str, uint8_t *rd, size_t *len, sldns_rdf_type rdftype)
Convert one rdf in rdata to wireformat and parse from string.
Definition: str2wire.c:937
local_zone::namelabs
int namelabs
number of labels in zone name
Definition: localzone.h:129
UB_STATS_RCODE_NUM
#define UB_STATS_RCODE_NUM
number of rcodes in stats
Definition: unbound.h:654
respip_action_cfg
static int respip_action_cfg(struct respip_set *set, const char *ipstr, const char *actnstr)
set action for the node specified by the netblock string
Definition: respip.c:180
pending::id
unsigned int id
the ID for the query.
Definition: outside_network.h:223
rrinternal_parse_unknown
static int rrinternal_parse_unknown(sldns_buffer *strbuf, char *token, size_t token_len, uint8_t *rr, size_t *rr_len, size_t *rr_cur_len, size_t pre_data_pos)
read unknown rr type format
Definition: str2wire.c:426
dnsc_nonce_cache_insert
static void dnsc_nonce_cache_insert(struct slabhash *cache, const uint8_t nonce[crypto_box_HALF_NONCEBYTES], const uint8_t magic_query[DNSCRYPT_MAGIC_HEADER_LEN], const uint8_t pk[crypto_box_PUBLICKEYBYTES], uint32_t hash)
Inserts a nonce, magic_query, pk tuple into the nonces_cache slabhash.
Definition: dnscrypt.c:179
acl_allow_setrd
@ acl_allow_setrd
allow full access for recursion queries and set RD flag regardless of request
Definition: acl_list.h:68
val_verify_DNSKEY_with_DS
enum sec_status val_verify_DNSKEY_with_DS(struct module_env *env, struct val_env *ve, struct ub_packed_rrset_key *dnskey_rrset, struct ub_packed_rrset_key *ds_rrset, uint8_t *sigalg, char **reason, struct module_qstate *qstate)
Verify DNSKEYs with DS rrset.
Definition: val_utils.c:483
config_view::local_zones_nodefault
struct config_strlist * local_zones_nodefault
local zones nodefault list
Definition: config_file.h:704
outnet_udp_cb
int outnet_udp_cb(struct comm_point *c, void *arg, int error, struct comm_reply *reply_info)
callback for incoming udp answers from the network
Definition: outside_network.c:540
UB_EV_READ
#define UB_EV_READ
event fd readable
Definition: unbound-event.h:69
neg_lru_remove
static void neg_lru_remove(struct val_neg_cache *neg, struct val_neg_data *data)
Remove data element from LRU list.
Definition: val_neg.c:163
fptr_whitelist_modenv_attach_sub
int fptr_whitelist_modenv_attach_sub(int(*fptr)(struct module_qstate *qstate, struct query_info *qinfo, uint16_t qflags, int prime, int valrec, struct module_qstate **newq))
Check function pointer whitelist for module_env attach_sub callback values.
Definition: fptr_wlist.c:354
do_ip_ratelimit_list
static void do_ip_ratelimit_list(RES *ssl, struct worker *worker, char *arg)
do the ip_ratelimit_list command
Definition: remote.c:2852
auth_zone::zone_is_slave
int zone_is_slave
zone is a slave zone (it has masters)
Definition: authzone.h:128
respip_set_create
struct respip_set * respip_set_create(void)
Create response IP set.
Definition: respip.c:57
timeval_smaller
static int timeval_smaller(const struct timeval *x, const struct timeval *y)
histogram compare of time values
Definition: mesh.c:117
module_qstate::client_info
struct respip_client_info * client_info
Attributes of clients that share the qstate that may affect IP-based actions.
Definition: module.h:658
tube_queue_item
int tube_queue_item(struct tube *tube, uint8_t *msg, size_t len)
Append data item to background list of writes.
Definition: tube.c:455
ub_signal_add
int ub_signal_add(struct ub_event *, struct timeval *)
Activate a signal event.
Definition: ub_event.c:415
sldns_wire2str_hex_scan
int sldns_wire2str_hex_scan(uint8_t **d, size_t *dl, char **s, size_t *sl)
Scan wireformat hex field to string, with user buffers.
Definition: wire2str.c:1248
config_file::out_ifs
char ** out_ifs
outgoing interface description strings (IP addresses)
Definition: config_file.h:205
dns64_insert_ignore_aaaa
static int dns64_insert_ignore_aaaa(struct dns64_env *dns64_env, char *str)
insert ignore_aaaa element into the tree
Definition: dns64.c:327
daemon::local_zones
struct local_zones * local_zones
local authority zones
Definition: daemon.h:119
ub_ctx_zone_add
int ub_ctx_zone_add(struct ub_ctx *ctx, const char *zone_name, const char *zone_type)
Add a new zone with the zonetype to the local authority info of the library.
Definition: libunbound.c:1285
local_zone_always_nodata
@ local_zone_always_nodata
answer with noerror/nodata, even when there is local data
Definition: localzone.h:96
reply_find_answer_rrset
struct ub_packed_rrset_key * reply_find_answer_rrset(struct query_info *qinfo, struct reply_info *rep)
Find answer rrset in reply, the one matching qinfo.
Definition: msgreply.c:746
ipsecmod.h
dtio_close_output
static void dtio_close_output(struct dt_io_thread *dtio)
close and stop the output file descriptor event
Definition: dtstream.c:599
val_env::skew_min
int32_t skew_min
clock skew min for signatures
Definition: validator.h:93
COMPARE_IT
#define COMPARE_IT(x, y)
tiny subroutine for msgreply_compare
Definition: msgreply.c:569
iter_lookup_parent_glue_from_cache
int iter_lookup_parent_glue_from_cache(struct module_env *env, struct delegpt *dp, struct regional *region, struct query_info *qinfo)
Add parent-side glue if that exists in the cache.
Definition: iter_utils.c:1187
ub_server_stats::qbit_TC
long long qbit_TC
number of queries with TC bit
Definition: unbound.h:707
UB_STATS_BUCKET_NUM
#define UB_STATS_BUCKET_NUM
number of histogram buckets
Definition: unbound.h:658
iter_forward_zone::dclass
uint16_t dclass
class.
Definition: iter_fwd.h:84
perfio::info
struct perfinfo * info
ptr back to perfinfo
Definition: perf.c:139
testlookup
static void testlookup(struct lruhash *table, testdata_type *ref[])
test adding a random element
Definition: unitlruhash.c:258
auth_zones::num_query_up
size_t num_query_up
number of queries upstream
Definition: authzone.h:82
generate_keytag_query
static int generate_keytag_query(struct module_qstate *qstate, int id, struct trust_anchor *ta)
Generate, send and detach key tag signaling query.
Definition: validator.c:444
change_child_ptr
static void change_child_ptr(rbnode_type *child, rbnode_type *old, rbnode_type *new)
Update parent pointer of a node 'child'.
Definition: rbtree.c:320
entry::increment_ecs_scope
uint8_t increment_ecs_scope
increment the ECS scope copied from the sourcemask by one
Definition: testpkts.h:212
entry::ixfr_soa_serial
uint32_t ixfr_soa_serial
match query serial with this value.
Definition: testpkts.h:196
resp_addr::node
struct addr_tree_node node
node in address tree
Definition: respip.h:35
config_get_option_list
int config_get_option_list(struct config_file *cfg, const char *opt, struct config_strlist **list)
Get an option and return strlist.
Definition: config_file.c:771
match_answer
static int match_answer(uint8_t *q, size_t qlen, uint8_t *p, size_t plen, int mttl)
match answer section of packet
Definition: testpkts.c:1232
checkconf
static void checkconf(const char *cfgfile, const char *opt, int final)
check config file
Definition: unbound-checkconf.c:864
iter_forward_zone::namelabs
int namelabs
number of labels in name
Definition: iter_fwd.h:74
ub_timer_del
int ub_timer_del(struct ub_event *ev)
Deactivate the timeout event.
Definition: ub_event_pluggable.c:619
config_collate_cat
char * config_collate_cat(struct config_strlist *list)
take a strlist_head list and return a malloc string.
Definition: config_file.c:802
trust_anchor
A trust anchor in the trust anchor store.
Definition: val_anchor.h:94
probe_answer_cb
void probe_answer_cb(void *arg, int rcode, struct sldns_buffer *buf, enum sec_status sec, char *errinf, int was_ratelimited)
callback for query answer to 5011 probe
edns_opt_copy_region
struct edns_option * edns_opt_copy_region(struct edns_option *list, struct regional *region)
Copy edns option list allocated to the new region.
Definition: msgreply.c:1143
key_entry_get_rrset
struct ub_packed_rrset_key * key_entry_get_rrset(struct key_entry_key *kkey, struct regional *region)
Obtain rrset from a key entry, allocated in region.
Definition: val_kentry.c:342
addr_mask
void addr_mask(struct sockaddr_storage *addr, socklen_t len, int net)
Make sure the sockaddr ends in zeroes.
Definition: net_help.c:677
config_stub::name
char * name
domain name (in text) of the stub apex domain
Definition: config_file.h:636
ringbuf::high
size_t high
high mark, items end here
Definition: delayer.c:70
dt_io_thread::cur_msg_len_done
size_t cur_msg_len_done
number of bytes of the length that have been written, for the current message length that precedes th...
Definition: dtstream.h:167
autotrust.h
sldns_bget_token
ssize_t sldns_bget_token(struct sldns_buffer *b, char *token, const char *delim, size_t limit)
returns a token/char from the buffer b.
Definition: parse.c:238
tube
A pipe.
Definition: tube.h:63
sldns_parse_rdf_token
static int sldns_parse_rdf_token(sldns_buffer *strbuf, char *token, size_t token_len, int *quoted, int *parens, size_t *pre_data_pos, const char *delimiters, sldns_rdf_type rdftype, size_t *token_strlen)
Parse one rdf token.
Definition: str2wire.c:541
shm_main_info::ptr_arr
struct ub_stats_info * ptr_arr
stats_info array, shared memory segment.
Definition: shm_main.h:56
fptr_whitelist_inplace_cb_reply_generic
int fptr_whitelist_inplace_cb_reply_generic(inplace_cb_reply_func_type *fptr, enum inplace_cb_list_type type)
Check function pointer whitelist for inplace_cb_reply, inplace_cb_reply_cache, inplace_cb_reply_local...
Definition: fptr_wlist.c:592
cfg_stub_find
struct config_stub * cfg_stub_find(struct config_stub ***pp, const char *nm)
Find stub in config list, also returns prevptr (for deletion).
Definition: config_file.c:1271
sldns_str2wire_period_buf
int sldns_str2wire_period_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_PERIOD from string to wireformat.
Definition: str2wire.c:1476
module_event_new
@ module_event_new
new query
Definition: module.h:555
win_svc.h
infra_data::lame_type_A
uint8_t lame_type_A
the host is lame (not authoritative) for A records
Definition: infra.h:97
listen_port::ftype
enum listen_type ftype
type of file descriptor, udp or tcp
Definition: listen_dnsport.h:111
set_cron_timer
static void set_cron_timer(void)
Set the timer for cron for the next wake up.
Definition: win_svc.c:577
mesh_area::ans_nodata
size_t ans_nodata
(extended stats) rcode nodata in replies
Definition: mesh.h:130
dnskey_algo_is_supported
int dnskey_algo_is_supported(struct ub_packed_rrset_key *dnskey_rrset, size_t dnskey_idx)
See if DNSKEY algorithm is supported.
Definition: val_sigcrypt.c:382
mesh_get_mem
size_t mesh_get_mem(struct mesh_area *mesh)
Calculate memory size in use by mesh and all queries inside it.
Definition: mesh.c:1770
rate_compfunc
int rate_compfunc(void *key1, void *key2)
compare two names, returns -1, 0, or +1
Definition: infra.c:121
auth_xfer::node
rbnode_type node
rbtree node, key is name and class
Definition: authzone.h:195
clean_point
static void clean_point(struct daemon_remote *rc, struct rc_state *s)
decrease active count and remove commpoint from busy list
Definition: remote.c:541
mesh_state_create
struct mesh_state * mesh_state_create(struct module_env *env, struct query_info *qinfo, struct respip_client_info *cinfo, uint16_t qflags, int prime, int valrec)
Create and initialize a new mesh state and its query state Does not put the mesh state into rbtrees a...
Definition: mesh.c:770
local_zone_always_deny
@ local_zone_always_deny
drop query, even when there is local data
Definition: localzone.h:98
ipsecmod_env
The global variable environment contents for the ipsecmod Shared between threads, this represents lon...
Definition: ipsecmod.h:53
nsec3_get_algo
static int nsec3_get_algo(struct ub_packed_rrset_key *rrset, int r)
return nsec3 RR algorithm
Definition: val_nsec3.c:145
neg_test
void neg_test(void)
unit test for negative cache functions
Definition: unitneg.c:532
infra_rate_max
int infra_rate_max(void *data, time_t now)
find the maximum rate stored, not too old.
Definition: infra.c:898
mesh_attach_sub
int mesh_attach_sub(struct module_qstate *qstate, struct query_info *qinfo, uint16_t qflags, int prime, int valrec, struct module_qstate **newq)
Attach subquery.
Definition: mesh.c:1047
edns_data::udp_size
uint16_t udp_size
UDP reassembly size.
Definition: msgparse.h:225
dns_cache_lookup
struct dns_msg * dns_cache_lookup(struct module_env *env, uint8_t *qname, size_t qnamelen, uint16_t qtype, uint16_t qclass, uint16_t flags, struct regional *region, struct regional *scratch, int no_partial)
Find cached message.
Definition: dns.c:801
comm_point_create_local
struct comm_point * comm_point_create_local(struct comm_base *base, int fd, size_t bufsize, comm_point_callback_type *callback, void *callback_arg)
Create commpoint to listen to a local domain file descriptor.
Definition: netevent.c:2943
tube_handle_signal
void tube_handle_signal(int fd, short events, void *arg)
for fptr wlist, winsock signal event callback function
sldns_str2wire_ipseckey_buf
int sldns_str2wire_ipseckey_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_IPSECKEY from string to wireformat.
Definition: str2wire.c:1850
iter_store_parentside_rrset
void iter_store_parentside_rrset(struct module_env *env, struct ub_packed_rrset_key *rrset)
Store parent-side rrset in separate rrset cache entries for later last-resort * lookups in case the c...
Definition: iter_utils.c:1067
anchors_test
void anchors_test(void)
unit test trust anchor storage functions
Definition: unitanchor.c:125
VAL_CLASS_NODATA
@ VAL_CLASS_NODATA
A NOERROR/NODATA response.
Definition: val_utils.h:71
mesh_area::histogram
struct timehist * histogram
histogram of time values
Definition: mesh.h:122
dt_io_thread_apply_cfg
int dt_io_thread_apply_cfg(struct dt_io_thread *dtio, struct config_file *cfg)
Apply config to the dtio thread.
Definition: dtstream.c:257
mesh_cb_func_type
void(* mesh_cb_func_type)(void *cb_arg, int rcode, struct sldns_buffer *, enum sec_status, char *why_bogus, int was_ratelimited)
Mesh result callback func.
Definition: mesh.h:240
dt_io_thread::ready_frame_sent
int ready_frame_sent
Set if the READY control frame has been sent.
Definition: dtstream.h:202
config_auth::rpz_action_override
char * rpz_action_override
Override RPZ action for this zone, regardless of zone content.
Definition: config_file.h:681
ub_ctx_add_ta_autr
int ub_ctx_add_ta_autr(struct ub_ctx *ctx, const char *fname)
Add trust anchor to the given context that is tracked with RFC5011 automated trust anchor maintenance...
Definition: libunbound.c:427
auth_master::port
int port
the port number (for urls)
Definition: authzone.h:449
ub_timer_del
int ub_timer_del(struct ub_event *ev)
Deactivate the timeout event.
Definition: ub_event.c:409
name_tree_init
void name_tree_init(rbtree_type *tree)
Init a name tree to be empty.
Definition: dnstree.c:74
auth_xfer
Authoritative zone transfer structure.
Definition: authzone.h:193
cert.h
tube_setup_bg_listen
int tube_setup_bg_listen(struct tube *tube, struct comm_base *base, tube_callback_type *cb, void *arg)
Start listening for information over the pipe.
Definition: tube.c:428
LDNS_RDF_TYPE_CLASS
@ LDNS_RDF_TYPE_CLASS
a class
Definition: rrdef.h:294
print_dp_details
static void print_dp_details(RES *ssl, struct worker *worker, struct delegpt *dp)
print details on a delegation point
Definition: cachedump.c:713
dns64_get_mem
size_t dns64_get_mem(struct module_env *env, int id)
Returns the amount of global memory that this module uses, not including per-query data.
Definition: dns64.c:1009
ta_key::type
uint16_t type
DNS type (host format) of the key, DS or DNSKEY.
Definition: val_anchor.h:87
slabhash_clear
void slabhash_clear(struct slabhash *sl)
Clear hash table.
Definition: slabhash.c:100
respip_inform_redirect
@ respip_inform_redirect
log query source and redirect
Definition: localzone.h:548
val_mark_insecure
void val_mark_insecure(struct reply_info *rep, uint8_t *kname, struct rrset_cache *r, struct module_env *env)
Mark all unchecked rrset entries below a NULL key entry as insecure.
Definition: val_utils.c:1031
LDNS_RDF_TYPE_ALG
@ LDNS_RDF_TYPE_ALG
a key algorithm
Definition: rrdef.h:298
prepend_is_duplicate
static int prepend_is_duplicate(struct ub_packed_rrset_key **sets, size_t to, struct ub_packed_rrset_key *dup)
check if prepend item is duplicate item
Definition: iterator.c:380
rrset_parse::dname_len
size_t dname_len
length of the dname uncompressed wireformat
Definition: msgparse.h:155
timehist_count
static size_t timehist_count(struct timehist *hist)
total number in histogram
Definition: timehist.c:189
get_max_iter
static size_t get_max_iter(struct val_env *ve, size_t bits)
Find max iteration count using config settings and key size.
Definition: val_nsec3.c:453
auth_zone_get_serial
int auth_zone_get_serial(struct auth_zone *z, uint32_t *serial)
find serial number of zone or false if none
Definition: authzone.c:1765
delegpt::nslist
struct delegpt_ns * nslist
the nameservers, names from the NS RRset rdata.
Definition: iter_delegpt.h:66
O_STR
#define O_STR(opt, str, var)
compare and print string option
Definition: config_file.c:845
respip_addr_info
Subset of resp_addr.node, used for inform-variant logging.
Definition: respip.c:31
nsec3_cached_hash::hash
uint8_t * hash
the hash result (not base32 encoded)
Definition: val_nsec3.h:240
tube::sr
int sr
pipe end to read from
Definition: tube.h:66
config_file::dlv_anchor_list
struct config_strlist * dlv_anchor_list
DLV anchor inline.
Definition: config_file.h:337
fake_pending::addr
struct sockaddr_storage addr
and to what address this is sent to.
Definition: replay.h:332
port_if::addrlen
socklen_t addrlen
length of addr field
Definition: outside_network.h:173
auth_master::http
int http
use HTTP for this master
Definition: authzone.h:440
fstrm_create_control_frame_ready
void * fstrm_create_control_frame_ready(char *contenttype, size_t *len)
This creates an FSTRM control frame of type READY.
Definition: dnstap_fstrm.c:95
log_ident_set
void log_ident_set(const char *id)
Set identity to print, default is 'unbound'.
Definition: log.c:180
compress_tree_newnode
static struct compress_tree_node * compress_tree_newnode(uint8_t *dname, int labs, size_t offset, struct regional *region)
Create node for domain name compression tree.
Definition: msgencode.c:178
sldns_str2wire_ilnp64_buf
int sldns_str2wire_ilnp64_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_ILNP64 from string to wireformat.
Definition: str2wire.c:1949
sldns_wire2str_rdf_scan
int sldns_wire2str_rdf_scan(uint8_t **d, size_t *dlen, char **s, size_t *slen, int rdftype, uint8_t *pkt, size_t pktlen, int *comprloop)
Scan wireformat rdf field to string, with user buffers.
Definition: wire2str.c:943
check_delegation_secure
static enum sec_status check_delegation_secure(struct reply_info *rep)
check if a delegation is secure
Definition: worker.c:422
processPrimeResponse
static int processPrimeResponse(struct module_qstate *qstate, int id)
This handles the response to a priming query.
Definition: iterator.c:3173
nsec3_hash_cmp
int nsec3_hash_cmp(const void *c1, const void *c2)
Rbtree for hash cache comparison function.
Definition: val_nsec3.c:496
dtio_output_cb
void dtio_output_cb(int fd, short bits, void *arg)
callback for the dnstap events, to write to the output
processValidate
static int processValidate(struct module_qstate *qstate, struct val_qstate *vq, struct val_env *ve, int id)
Process the VALIDATE stage, the init and findkey stages are finished, and the right keys are availabl...
Definition: validator.c:1824
modstack_init
void modstack_init(struct module_stack *stack)
Init a stack of modules.
Definition: modstack.c:92
config_file::msg_cache_slabs
size_t msg_cache_slabs
slabs in the message cache.
Definition: config_file.h:152
lruhash::space_max
size_t space_max
the amount of space the hash table is maximally allowed to use.
Definition: lruhash.h:180
ip_list::next
struct ip_list * next
next in list
Definition: unbound-anchor.c:164
quote_it
static void quote_it(FILE *out, char *str, size_t maxlen)
put quotes around string.
Definition: w_inst.c:162
anchor_read_file
static struct trust_anchor * anchor_read_file(struct val_anchors *anchors, sldns_buffer *buffer, const char *fname, int onlyone)
Read a file with trust anchors.
Definition: val_anchor.c:427
get_line
static int get_line(char **s, char **n)
get one line ( ) from a string, move next to after the , zero
Definition: testpkts.c:921
populate_action_info
static int populate_action_info(struct respip_action_info *actinfo, enum respip_action action, const struct resp_addr *raddr, const struct ub_packed_rrset_key *ATTR_UNUSED(rrset), int ATTR_UNUSED(tag), const struct respip_set *ATTR_UNUSED(ipset), int ATTR_UNUSED(action_only), struct regional *region, int rpz_used, int rpz_log, char *log_name, int rpz_cname_override)
Populate action info structure with the results of response-ip action processing, iff as the result o...
Definition: respip.c:833
ub_stop_bg
static void ub_stop_bg(struct ub_ctx *ctx)
stop the bg thread
Definition: libunbound.c:238
rc_state::next
struct rc_state * next
the next item in list
Definition: remote.h:67
REGIONAL_LARGE_OBJECT_SIZE
#define REGIONAL_LARGE_OBJECT_SIZE
Default size for large objects - allocated outside of chunks.
Definition: regional.c:62
replay_scenario_read
struct replay_scenario * replay_scenario_read(FILE *in, const char *name, int *lineno)
Read a replay scenario from the file.
Definition: replay.c:439
validate_positive_response
static void validate_positive_response(struct module_env *env, struct val_env *ve, struct query_info *qchase, struct reply_info *chase_reply, struct key_entry_key *kkey)
Given a "positive" response – a response that contains an answer to the question, and no CNAME chain,...
Definition: validator.c:784
skip_pkt_rrs
static int skip_pkt_rrs(sldns_buffer *pkt, int num)
skip RRs from packet
Definition: msgparse.c:1051
context_serialize_cancel
uint8_t * context_serialize_cancel(struct ctx_query *q, uint32_t *len)
Serialize a query cancellation.
Definition: context.c:375
ub_signal_del
int ub_signal_del(struct ub_event *ev)
Deactivate a signal event.
Definition: ub_event.c:421
connect_to_ip
static int connect_to_ip(struct ip_list *ip, struct ip_list *src)
connect to IP address
Definition: unbound-anchor.c:737
config_file::donotquery_localhost
int donotquery_localhost
use default localhost donotqueryaddr entries
Definition: config_file.h:242
slab_test_thr
structure to threaded test the lru hash table
Definition: unitslabhash.c:300
ub_random
long int ub_random(struct ub_randstate *state)
Generate next random number from the state passed along.
daemon
Structure holding worker list.
Definition: daemon.h:76
tcp_proxy::server_s
int server_s
the fd to listen for server answer
Definition: delayer.c:120
respip_clear
void respip_clear(struct module_qstate *qstate, int id)
response-ip cleanup query state
Definition: respip.c:1258
dname_lab_cmp
int dname_lab_cmp(uint8_t *d1, int labs1, uint8_t *d2, int labs2, int *mlabs)
Compare dnames, sorted not canonical, but by label.
Definition: dname.c:486
fptr_whitelist_inplace_cb_query
int fptr_whitelist_inplace_cb_query(inplace_cb_query_func_type *fptr)
Check function pointer whitelist for inplace_cb_query func values.
Definition: fptr_wlist.c:630
infra_lookup_nottl
struct lruhash_entry * infra_lookup_nottl(struct infra_cache *infra, struct sockaddr_storage *addr, socklen_t addrlen, uint8_t *name, size_t namelen, int wr)
lookup version that does not check host ttl (you check it)
Definition: infra.c:362
log_query_info
void log_query_info(enum verbosity_value v, const char *str, struct query_info *qinf)
Print string with neat domain name, type, class from query info.
Definition: msgreply.c:883
respip.h
MESH_MAX_SUBSUB
#define MESH_MAX_SUBSUB
Max number of references-to-references-to-references.
Definition: mesh.h:77
sldns_wire2str_edns_dhu_print
int sldns_wire2str_edns_dhu_print(char **str, size_t *str_len, uint8_t *option_data, size_t option_len)
Print EDNS DHU option data to string.
Definition: wire2str.c:1832
reply_info_encode
int reply_info_encode(struct query_info *qinfo, struct reply_info *rep, uint16_t id, uint16_t flags, struct sldns_buffer *buffer, time_t timenow, struct regional *region, uint16_t udpsize, int dnssec, int minimise)
Regenerate the wireformat from the stored msg reply.
Definition: msgencode.c:667
slabhash_status
void slabhash_status(struct slabhash *sl, const char *id, int extended)
Output debug info to the log as to state of the hash table.
Definition: slabhash.c:133
lruhash::lock
lock_quick_type lock
lock for exclusive access, to the lookup array
Definition: lruhash.h:149
config_file::log_replies
int log_replies
log replies with one line per reply
Definition: config_file.h:302
RED
#define RED
Node colour red.
Definition: rbtree.c:50
listen_type
listen_type
type of ports
Definition: listen_dnsport.h:83
val_clear
void val_clear(struct module_qstate *qstate, int id)
validator cleanup query state
Definition: validator.c:3245
delegpt_addr::addrlen
socklen_t addrlen
length of addr
Definition: iter_delegpt.h:143
canon_rr::rr_idx
size_t rr_idx
which RR in the rrset
Definition: val_sigcrypt.c:644
respip_view_conf_data_test
static void respip_view_conf_data_test(void)
Test per-view respip redirect w/ data directives.
Definition: unitmain.c:794
sldns_wire2str_b32_ext_scan
int sldns_wire2str_b32_ext_scan(uint8_t **d, size_t *dl, char **s, size_t *sl)
Scan wireformat b32_ext field to string, with user buffers.
Definition: wire2str.c:1198
rbnode_type::left
rbnode_type * left
left node (smaller items)
Definition: rbtree.h:59
lruhash_entry::data
void * data
data
Definition: lruhash.h:222
NSEC3_UNKNOWN_FLAGS
#define NSEC3_UNKNOWN_FLAGS
The unknown flags in the NSEC3 flags field.
Definition: val_nsec3.h:95
reply_info_parse
int reply_info_parse(struct sldns_buffer *pkt, struct alloc_cache *alloc, struct query_info *qinf, struct reply_info **rep, struct regional *region, struct edns_data *edns)
Parse query reply.
Definition: msgreply.c:461
rtt_update
void rtt_update(struct rtt_info *rtt, int ms)
Update the statistics with a new roundtrip estimate observation.
Definition: rtt.c:89
provide_file_10
static void provide_file_10(SSL *ssl, char *fname)
provide file in whole transfer
Definition: petal.c:367
nsec3_prove_wildcard
enum sec_status nsec3_prove_wildcard(struct module_env *env, struct val_env *ve, struct ub_packed_rrset_key **list, size_t num, struct query_info *qinfo, struct key_entry_key *kkey, uint8_t *wc)
Prove that a positive wildcard match was appropriate (no direct match RRset).
Definition: val_nsec3.c:1243
config_auth::fallback_enabled
int fallback_enabled
fallback to recursion to authorities if zone expired and other reasons perhaps (like,...
Definition: config_file.h:673
neg_find_nsec
static struct ub_packed_rrset_key * neg_find_nsec(struct val_neg_cache *neg_cache, uint8_t *qname, size_t qname_len, uint16_t qclass, struct rrset_cache *rrset_cache, time_t now, struct regional *region)
Get best NSEC record for qname.
Definition: val_neg.c:1210
insert_query
static int insert_query(struct query_info *qinfo, struct compress_tree_node **tree, sldns_buffer *buffer, struct regional *region)
store query section in wireformat buffer, return RETVAL
Definition: msgencode.c:597
rrstr_get_rr_content
int rrstr_get_rr_content(const char *str, uint8_t **nm, uint16_t *type, uint16_t *dclass, time_t *ttl, uint8_t *rr, size_t len, uint8_t **rdata, size_t *rdata_len)
Parses resource record string into wire format, also returning its field values.
Definition: localzone.c:233
respip_global_apply_cfg
int respip_global_apply_cfg(struct respip_set *set, struct config_file *cfg)
Apply response-ip config settings to the global (default) view.
Definition: respip.c:398
domain_limit_data::below
int below
ratelimit for names below this name, -1 if not set
Definition: infra.h:137
slabhash_lookup
struct lruhash_entry * slabhash_lookup(struct slabhash *sl, hashvalue_type hash, void *key, int wr)
Lookup an entry in the hashtable.
Definition: slabhash.c:122
key_cache
Key cache.
Definition: val_kcache.h:54
fake_pending::callback
comm_point_callback_type * callback
The callback function to call when answer arrives (or timeout)
Definition: replay.h:342
ipset_deinit
void ipset_deinit(struct module_env *env, int id)
Deinit the ipset module.
Definition: ipset.c:253
port_comm::num_outstanding
int num_outstanding
number of outstanding queries on this port
Definition: outside_network.h:209
usage
static void usage(void)
print program usage help
Definition: lock_verify.c:108
dns64_env::ignore_aaaa
rbtree_type ignore_aaaa
Tree of names for which AAAA is ignored.
Definition: dns64.c:135
libworker_fillup_fg
static void libworker_fillup_fg(struct ctx_query *q, int rcode, sldns_buffer *buf, enum sec_status s, char *why_bogus, int was_ratelimited)
fillup fg results
Definition: libworker.c:524
dtio_setup_on_base
static void dtio_setup_on_base(struct dt_io_thread *dtio)
perform the setup of the writer thread on the established event_base
Definition: dtstream.c:2018
ub_event_base_dispatch
int ub_event_base_dispatch(struct ub_event_base *base)
Run the event base.
Definition: ub_event.c:278
DNSSEC_LAME_DETECT_COUNT
#define DNSSEC_LAME_DETECT_COUNT
max number of queries for which to perform dnsseclameness detection, (rrsigs missing detection) after...
Definition: iterator.h:71
error_response
static int error_response(struct module_qstate *qstate, int id, int rcode)
Return an error.
Definition: ipset.c:34
pending::pc
struct port_comm * pc
comm point it was sent on (and reply must come back on).
Definition: outside_network.h:229
setup_qinfo_edns
static int setup_qinfo_edns(struct libworker *w, struct ctx_query *q, struct query_info *qinfo, struct edns_data *edns)
setup qinfo and edns
Definition: libworker.c:562
slabhash_lookup
struct lruhash_entry * slabhash_lookup(struct slabhash *table, hashvalue_type hash, void *key, int wr)
Lookup an entry in the hashtable.
Definition: slabhash.c:122
nsec3_no_type
static int nsec3_no_type(struct ub_packed_rrset_key *k, uint16_t t)
Check that an NSEC3 rrset does not have a type set.
Definition: val_neg.c:1134
val_next_unchecked
size_t val_next_unchecked(struct reply_info *rep, size_t skip)
Find next unchecked rrset position, return it for skip.
Definition: val_utils.c:1048
sldns_rr_dnskey_key_size_raw
size_t sldns_rr_dnskey_key_size_raw(const unsigned char *keydata, const size_t len, int alg)
get the length of the keydata in bits
Definition: keyraw.c:38
lruhash_entry::key
void * key
key
Definition: lruhash.h:220
neg_find_nsec3_ce
static struct val_neg_data * neg_find_nsec3_ce(struct val_neg_zone *zone, uint8_t *qname, size_t qname_len, int qlabs, sldns_buffer *buf, uint8_t *hashnc, size_t *nclen)
find nsec3 closest encloser in neg cache
Definition: val_neg.c:1266
ub_event_del
int ub_event_del(struct ub_event *)
Deactivate the event.
Definition: ub_event.c:393
packed_rrset_ttl_add
void packed_rrset_ttl_add(struct packed_rrset_data *data, time_t add)
Fixup TTLs in fixed data packed_rrset_data blob.
Definition: packed_rrset.c:219
forwards_next_root
int forwards_next_root(struct iter_forwards *fwd, uint16_t *qclass)
Find next root item in forwards lookup tree.
Definition: iter_fwd.c:397
delegpt_count_missing_targets
size_t delegpt_count_missing_targets(struct delegpt *dp)
Count number of missing targets.
Definition: iter_delegpt.c:326
comm_point::buffer
struct sldns_buffer * buffer
buffer pointer.
Definition: netevent.h:166
sldns_buffer_remaining_at
INLINE size_t sldns_buffer_remaining_at(sldns_buffer *buffer, size_t at)
returns the number of bytes remaining between the indicated position and the limit.
Definition: sbuffer.h:380
iter_qstate::timeout_count
int timeout_count
Count number of time-outs.
Definition: iterator.h:403
sldns_wire2str_rdf_scan
int sldns_wire2str_rdf_scan(uint8_t **data, size_t *data_len, char **str, size_t *str_len, int rdftype, uint8_t *pkt, size_t pktlen, int *comprloop)
Scan wireformat rdf field to string, with user buffers.
Definition: wire2str.c:943
forwards_lookup
struct delegpt * forwards_lookup(struct iter_forwards *fwd, uint8_t *qname, uint16_t qclass)
Find forward zone information For this qname/qclass find forward zone information,...
Definition: iter_fwd.c:356
priv_lookup_addr
static int priv_lookup_addr(struct iter_priv *priv, struct sockaddr_storage *addr, socklen_t addrlen)
See if an address is blocked.
Definition: iter_priv.c:174
LDNS_RDF_TYPE_ATMA
@ LDNS_RDF_TYPE_ATMA
ATMA.
Definition: rrdef.h:323
msg_del_servfail
static void msg_del_servfail(struct module_env *env, struct query_info *qinfo, uint32_t flags)
remove servfail msg cache entry
Definition: dns.c:132
delete_entry
void delete_entry(struct entry *list)
Delete linked list of entries.
Definition: testpkts.c:1711
entry::match_ednsdata_raw
uint8_t match_ednsdata_raw
match edns data field given in hex
Definition: testpkts.h:194
sldns_wirerr_get_ttl
uint32_t sldns_wirerr_get_ttl(uint8_t *rr, size_t len, size_t dname_len)
Get the ttl of the RR.
Definition: str2wire.c:812
hash_addr
static hashvalue_type hash_addr(struct sockaddr_storage *addr, socklen_t addrlen, int use_port)
calculate the hash value for a host key set use_port to a non-0 number to use the port in the hash ca...
Definition: infra.c:330
config_file::dnstap_identity
char * dnstap_identity
dnstap "identity", hostname is used if "".
Definition: config_file.h:505
val_nsec_proves_insecuredelegation
int val_nsec_proves_insecuredelegation(struct ub_packed_rrset_key *nsec, struct query_info *qinfo)
Determine if an nsec proves an insecure delegation towards the qname.
Definition: val_nsec.c:453
authextstrtoaddr
int authextstrtoaddr(char *str, struct sockaddr_storage *addr, socklen_t *addrlen, char **auth_name)
Convert address string, with "@port" appendix, to sockaddr.
Definition: net_help.c:423
infra_rtt_update
int infra_rtt_update(struct infra_cache *infra, struct sockaddr_storage *addr, socklen_t addrlen, uint8_t *nm, size_t nmlen, int qtype, int roundtrip, int orig_rtt, time_t timenow)
Update rtt information for the host.
Definition: infra.c:562
anchor_list_keytags
size_t anchor_list_keytags(struct trust_anchor *ta, uint16_t *list, size_t num)
Get a list of keytags for the trust anchor.
Definition: val_anchor.c:1288
ub_winsock_unregister_wsaevent
void ub_winsock_unregister_wsaevent(struct ub_event *ev)
Free a with a wsaevent associated event.
Definition: ub_event.c:427
apply_settings
static void apply_settings(struct daemon *daemon, struct config_file *cfg, int cmdline_verbose, int debug_mode)
set verbosity, check rlimits, cache settings
Definition: unbound.c:272
check_order_lock
static void check_order_lock(struct order_lock *lock)
Check ordering of one lock.
Definition: lock_verify.c:350
verify_and_update_anchor
static void verify_and_update_anchor(const char *root_anchor_file, BIO *xml, BIO *p7s, STACK_OF(X509) *cert, const char *p7signer)
Perform the verification and update of the trustanchor file.
Definition: unbound-anchor.c:1902
ub_result::was_ratelimited
int was_ratelimited
If the query or one of its subqueries was ratelimited.
Definition: unbound.h:211
waiting_tcp::addr
struct sockaddr_storage addr
remote address.
Definition: outside_network.h:281
timeval_subtract
static void timeval_subtract(struct timeval *d, const struct timeval *end, const struct timeval *start)
subtract timers and the values do not overflow or become negative
Definition: mesh.c:69
server_stats_querymiss
void server_stats_querymiss(struct ub_server_stats *stats, struct worker *worker)
add query if it missed the cache
Definition: stats.c:93
cachedb_qstate
Per query state for the cachedb module.
Definition: cachedb.h:64
config_file::dnscrypt_provider
char * dnscrypt_provider
provider name 2.dnscrypt-cert.example.com
Definition: config_file.h:562
tap_data::ev
struct ub_event * ev
the ub event
Definition: unbound-dnstap-socket.c:109
worker_cmd_stats
@ worker_cmd_stats
obtain statistics
Definition: worker.h:71
ub_ctx::rr_pipe
struct tube * rr_pipe
the result read pipe
Definition: context.h:74
ub_c_error_msg
void ub_c_error_msg(const char *fmt,...)
print error with file and line number
Definition: config_file.c:1630
config_file::log_identity
char * log_identity
log identity to report
Definition: config_file.h:310
iter_qstate::query_restart_count
int query_restart_count
the number of times this query has been restarted.
Definition: iterator.h:304
testadd_unlim
static void testadd_unlim(struct slabhash *table, testdata_type **ref)
test adding a random element (unlimited range)
Definition: unitslabhash.c:196
outnet_comm_point_for_http
struct comm_point * outnet_comm_point_for_http(struct outside_network *outnet, comm_point_callback_type *cb, void *cb_arg, struct sockaddr_storage *to_addr, socklen_t to_addrlen, int timeout, int ssl, char *host, char *path)
Create http commpoint suitable for communication to the destination.
Definition: outside_network.c:2405
mesh_state_cleanup
void mesh_state_cleanup(struct mesh_state *mstate)
Cleanup a mesh state and its query state.
Definition: mesh.c:861
log_rrset_key
void log_rrset_key(enum verbosity_value v, const char *str, struct ub_packed_rrset_key *rrset)
Print string with neat domain name, type, class from rrset.
Definition: packed_rrset.c:263
az_domain_add_rr
static int az_domain_add_rr(struct auth_data *node, uint16_t rr_type, uint32_t rr_ttl, uint8_t *rdata, size_t rdatalen, int *duplicate)
Add rr to node, ignores duplicate RRs, rdata points to buffer with rdatalen octets,...
Definition: authzone.c:1093
dnsc_find_cert
static const dnsccert * dnsc_find_cert(struct dnsc_env *dnscenv, struct sldns_buffer *buffer)
Find the cert matching a DNSCrypt query.
Definition: dnscrypt.c:655
service_init
static int service_init(int r, struct daemon **d, struct config_file **c)
Init service.
Definition: win_svc.c:304
iter_qstate::final_state
enum iter_state final_state
Final state for the iterator module.
Definition: iterator.h:239
val_neg_cache::lock
lock_basic_type lock
the big lock on the negative cache.
Definition: val_neg.h:70
auth_zones_cleanup
void auth_zones_cleanup(struct auth_zones *az)
Cleanup auth zones.
Definition: authzone.c:6674
outnet_tcp_cb
int outnet_tcp_cb(struct comm_point *c, void *arg, int error, struct comm_reply *reply_info)
callback for pending tcp connections
Definition: outside_network.c:460
lruhash_lookup
struct lruhash_entry * lruhash_lookup(struct lruhash *table, hashvalue_type hash, void *key, int wr)
Lookup an entry in the hashtable.
Definition: lruhash.c:356
cfg_uid
uid_t cfg_uid
from cfg username, after daemonize setup performed
Definition: config_file.c:74
config_file::del_holddown
unsigned int del_holddown
autotrust del holddown time, in seconds
Definition: config_file.h:381
outside_network::use_caps_for_id
int use_caps_for_id
use x20 bits to encode additional ID random bits
Definition: outside_network.h:85
auth_zone_write_rrset
static int auth_zone_write_rrset(struct auth_zone *z, struct auth_data *node, struct auth_rrset *r, FILE *out)
write rrset to file
Definition: authzone.c:1683
config_file::tagname
char ** tagname
tag list, array with tagname[i] is malloced string
Definition: config_file.h:429
timehist
Keep histogram of time values.
Definition: timehist.h:63
perfinfo::since
struct timeval since
when did this time slice start
Definition: perf.c:89
position_in_string
static int position_in_string(char *str, const char *sub)
Position in string.
Definition: autotrust.c:120
dt_io_thread::reconnect_timer
void * reconnect_timer
the timer event for connection retries
Definition: dtstream.h:181
config_auth::rpz_taglistlen
size_t rpz_taglistlen
length of the taglist (in bytes)
Definition: config_file.h:679
ub_event_base_dispatch
int ub_event_base_dispatch(struct ub_event_base *)
Run the event base.
Definition: ub_event.c:278
val_env::date_override
int32_t date_override
for debug testing a fixed validation date can be entered.
Definition: validator.h:90
anchor_store_str
struct trust_anchor * anchor_store_str(struct val_anchors *anchors, struct sldns_buffer *buffer, const char *str)
Store one string as trust anchor RR.
Definition: val_anchor.c:397
delegpt_addr::attempts
int attempts
number of attempts for this addr
Definition: iter_delegpt.h:145
keysets::expi
uint32_t expi
signature expiration
Definition: signit.c:55
config_file::so_sndbuf
size_t so_sndbuf
SO_SNDBUF size to set on port 53 UDP socket.
Definition: config_file.h:186
config_file::dnstap_tls_client_key_file
char * dnstap_tls_client_key_file
dnstap client key for client authentication
Definition: config_file.h:497
ds_get_keytag
uint16_t ds_get_keytag(struct ub_packed_rrset_key *ds_rrset, size_t ds_idx)
Get DS keytag, footprint value that matches the DNSKEY keytag it signs.
Definition: val_sigcrypt.c:228
del_local_rrset
static void del_local_rrset(struct local_data *d, uint16_t dtype)
find and remove type from list in domain struct
Definition: localzone.c:1950
local_rrset::next
struct local_rrset * next
next in list
Definition: localzone.h:182
outside_network::tcp_conns
struct pending_tcp ** tcp_conns
Array of tcp pending used for outgoing TCP connections.
Definition: outside_network.h:152
unitest_nsec_has_type_rdata
static int unitest_nsec_has_type_rdata(char *bitmap, size_t len, uint16_t type)
helper for unittest of NSEC routines
Definition: unitverify.c:370
neg_test
void neg_test(void)
unit test for negative cache functions
Definition: unitneg.c:532
print_sock_err
static void print_sock_err(const char *msg)
printout socket errno
Definition: unbound-anchor.c:726
auth_zones_answer
int auth_zones_answer(struct auth_zones *az, struct module_env *env, struct query_info *qinfo, struct edns_data *edns, struct comm_reply *repinfo, struct sldns_buffer *buf, struct regional *temp)
Answer query from auth zone.
Definition: authzone.c:3320
tcp_req_done_item::len
size_t len
length of the buffer
Definition: listen_dnsport.h:296
ub_server_stats::qbit_CD
long long qbit_CD
number of queries with CD bit
Definition: unbound.h:717
resp_addr::lock
lock_rw_type lock
lock on the node item
Definition: respip.h:37
addr_is_broadcast
int addr_is_broadcast(struct sockaddr_storage *addr, socklen_t addrlen)
See if sockaddr is 255.255.255.255.
Definition: net_help.c:759
nsec_closest_encloser
uint8_t * nsec_closest_encloser(uint8_t *qname, struct ub_packed_rrset_key *nsec)
Determine closest encloser of a query name and the NSEC that covers it (and thus disproved it).
Definition: val_nsec.c:475
verifytest_file
static void verifytest_file(const char *fname, const char *at_date)
verify from a file
Definition: unitverify.c:288
usage
static void usage(void)
Give checkconf usage, and exit (1).
Definition: unbound-checkconf.c:83
bin_init
void bin_init(struct lruhash_bin *array, size_t size)
init the hash bins for the table
Definition: lruhash.c:48
key_entry_data::ttl
time_t ttl
the TTL of this entry (absolute time)
Definition: val_kentry.h:78
name_tree_find
struct name_tree_node * name_tree_find(rbtree_type *tree, uint8_t *name, size_t len, int labs, uint16_t dclass)
Lookup exact match in name tree.
Definition: dnstree.c:166
stop_flush_info::want_to_exit_flush
int want_to_exit_flush
did we already want to exit this stop-flush event base
Definition: dtstream.c:1569
time_passes
static void time_passes(struct replay_runtime *runtime, struct replay_moment *mom)
pass time
Definition: fake_event.c:544
dt_io_thread::read_frame
struct dt_frame_read_buf read_frame
(partially) read frame
Definition: dtstream.h:206
MAX_PACKETLEN
#define MAX_PACKETLEN
max size of a packet
Definition: testpkts.c:37
dt_io_thread::io_list_iter
struct dt_io_list_item * io_list_iter
iterator point in the io_list, to pick from them in a round-robin fashion, instead of only from the f...
Definition: dtstream.h:126
iter_dec_attempts
void iter_dec_attempts(struct delegpt *dp, int d)
Remove query attempts from all available ips.
Definition: iter_utils.c:1284
inplace_cb_reply_call
int inplace_cb_reply_call(struct module_env *env, struct query_info *qinfo, struct module_qstate *qstate, struct reply_info *rep, int rcode, struct edns_data *edns, struct comm_reply *repinfo, struct regional *region)
Call the registered functions in the inplace_cb_reply linked list.
Definition: msgreply.c:1057
parse_dname
int parse_dname(const char *str, uint8_t **res, size_t *len, int *labs)
Form wireformat from text format domain name.
Definition: localzone.c:132
fstrm_create_control_frame_accept
void * fstrm_create_control_frame_accept(char *contenttype, size_t *len)
This creates an FSTRM control frame of type ACCEPT.
Definition: dnstap_fstrm.c:123
HTTPS_PORT
#define HTTPS_PORT
port number for https access
Definition: unbound-anchor.c:151
infra_get_host_rto
long long infra_get_host_rto(struct infra_cache *infra, struct sockaddr_storage *addr, socklen_t addrlen, uint8_t *nm, size_t nmlen, struct rtt_info *rtt, int *delay, time_t timenow, int *tA, int *tAAAA, int *tother)
Get additional (debug) info on timing.
Definition: infra.c:615
analyze_rdata
static void analyze_rdata(sldns_buffer *pkt, const sldns_rr_descriptor *desc, uint16_t rdlen)
analyze rdata in packet
Definition: pktview.c:88
lz_find_create_node
static int lz_find_create_node(struct local_zone *z, uint8_t *nm, size_t nmlen, int nmlabs, struct local_data **res)
find a node, create it if not and all its empty nonterminal parents
Definition: localzone.c:432
dt_io_thread::ip_str
char * ip_str
the ip address and port number (or NULL)
Definition: dtstream.h:211
worker_mem_report
static void worker_mem_report(struct worker *ATTR_UNUSED(worker), struct serviced_query *ATTR_UNUSED(cur_serv))
Report on memory usage by this thread and global.
Definition: worker.c:114
ub_timer_del
int ub_timer_del(struct ub_event *)
Deactivate the timeout event.
Definition: ub_event.c:409
ub_ctx_trustedkeys
int ub_ctx_trustedkeys(struct ub_ctx *ctx, const char *fname)
Add trust anchors to the given context.
Definition: libunbound.c:447
lz_inform_print
static void lz_inform_print(struct local_zone *z, struct query_info *qinfo, struct comm_reply *repinfo)
print log information for an inform zone query
Definition: localzone.c:1582
nsec3_covers
int nsec3_covers(uint8_t *zone, struct nsec3_cached_hash *hash, struct ub_packed_rrset_key *rrset, int rr, sldns_buffer *buf)
nsec3Covers Given a hash and a candidate NSEC3Record, determine if that NSEC3Record covers the hash.
Definition: val_nsec3.c:769
tap_data
tap callback variables
Definition: unbound-dnstap-socket.c:105
sig_record_reload
static int sig_record_reload
How many reload requests happened.
Definition: daemon.c:102
iter_qstate::qchase
struct query_info qchase
query name used for chasing the results.
Definition: iterator.h:272
wsvc_install
void wsvc_install(FILE *out, const char *rename)
Install service in servicecontrolmanager, setup registry.
Definition: w_inst.c:189
config_file::respip_actions
struct config_str2list * respip_actions
list of response-driven access control entries, linked list
Definition: config_file.h:425
compress_tree_node::left
struct compress_tree_node * left
left node in tree, all smaller to this
Definition: msgencode.c:79
test_threaded_table
static void test_threaded_table(struct slabhash *table)
test hash table access by multiple threads
Definition: unitslabhash.c:341
comm_reply::addrlen
socklen_t addrlen
length of address
Definition: netevent.h:119
strmodulevent
const char * strmodulevent(enum module_ev e)
Debug utility: module event to string.
Definition: module.c:60
P7SNAME
#define P7SNAME
path on HTTPS server to p7s file
Definition: unbound-anchor.c:147
forwards_delete_stub_hole
void forwards_delete_stub_hole(struct iter_forwards *fwd, uint16_t c, uint8_t *nm)
Remove stub hole, if one exists.
Definition: iter_fwd.c:507
bogus_del_kcache
static void bogus_del_kcache(struct lruhash_entry *e, void *arg)
callback to delete bogus keys
Definition: remote.c:1801
regional_log_stats
void regional_log_stats(struct regional *r)
Debug print regional statistics to log.
Definition: regional.c:217
fd_set_nonblock
int fd_set_nonblock(int s)
Set fd nonblocking.
Definition: net_help.c:121
respip_invalid
@ respip_invalid
type invalid
Definition: localzone.h:572
processInit
static int processInit(struct module_qstate *qstate, struct val_qstate *vq, struct val_env *ve, int id)
Process init state for validator.
Definition: validator.c:1483
internal_base::now
struct timeval now
timeval with current time
Definition: netevent.c:120
ub_result::qname
char * qname
The original question, name text string.
Definition: unbound.h:125
error_encode
void error_encode(struct sldns_buffer *pkt, int r, struct query_info *qinfo, uint16_t qid, uint16_t qflags, struct edns_data *edns)
Encode an error.
Definition: msgencode.c:910
log_query
void log_query(const char *format,...) ATTR_FORMAT(printf
Log query.
acl_list.h
infra_get_lame_rtt
int infra_get_lame_rtt(struct infra_cache *infra, struct sockaddr_storage *addr, socklen_t addrlen, uint8_t *name, size_t namelen, uint16_t qtype, int *lame, int *dnsseclame, int *reclame, int *rtt, time_t timenow)
Get Lameness information and average RTT if host is in the cache.
Definition: infra.c:672
dt_msg_entry
An entry in the dt_msg_queue.
Definition: dtstream.h:82
edns.h
add_rr_to_rrset
static int add_rr_to_rrset(struct rrset_parse *rrset, sldns_buffer *pkt, struct msg_parse *msg, struct regional *region, sldns_pkt_section section, uint16_t type)
Add rr (from packet here) to rrset, skips rr.
Definition: msgparse.c:749
mesh_area::num_reply_states
size_t num_reply_states
count of the number of mesh_states that have mesh_replies Because a state can send results to multipl...
Definition: mesh.h:98
config_file::harden_below_nxdomain
int harden_below_nxdomain
harden against queries that fall under known nxdomain names
Definition: config_file.h:256
rrset_array_lock
int rrset_array_lock(struct rrset_ref *ref, size_t count, time_t timenow)
Obtain readlock on a (sorted) list of rrset references.
Definition: rrset.c:307
setup_playback
static struct replay_scenario * setup_playback(const char *filename, int *pass_argc, char *pass_argv[])
read playback file
Definition: testbound.c:313
ratelimit_list_arg::infra
struct infra_cache * infra
the infra cache
Definition: remote.c:2785
rpz_action_to_string
const char * rpz_action_to_string(enum rpz_action a)
string for RPZ action enum
Definition: rpz.c:56
msg_parse::an_rrsets
size_t an_rrsets
count of RRsets per section.
Definition: msgparse.h:109
lock_ref::lock
struct order_lock * lock
the lock referenced
Definition: lock_verify.c:94
name_tree_compare
int name_tree_compare(const void *k1, const void *k2)
compare name tree nodes
Definition: dnstree.c:47
iter_qstate::ns_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 bei...
Definition: iterator.h:265
forwards_insert_data
static int forwards_insert_data(struct iter_forwards *fwd, uint16_t c, uint8_t *nm, size_t nmlen, int nmlabs, struct delegpt *dp)
insert info into forward structure
Definition: iter_fwd.c:109
DTIO_MESSAGES_PER_CALLBACK
#define DTIO_MESSAGES_PER_CALLBACK
number of messages to process in one output callback
Definition: dtstream.c:64
hints_lookup_stub
struct iter_hints_stub * hints_lookup_stub(struct iter_hints *hints, uint8_t *qname, uint16_t qclass, struct delegpt *dp)
Given a qname/qclass combination, and the delegation point from the cache for this qname/qclass,...
Definition: iter_hints.c:472
del_info::len
size_t len
length
Definition: remote.c:1603
PTR_CREATE
#define PTR_CREATE(offset)
create a compression pointer to the given offset.
Definition: msgparse.h:203
sldns_affix_token
static int sldns_affix_token(sldns_buffer *strbuf, char *token, size_t *token_len, int *quoted, int *parens, size_t *pre_data_pos, const char *delimiters, sldns_rdf_type rdftype, size_t *token_strlen)
Add space and one more rdf token onto the existing token string.
Definition: str2wire.c:597
outside_network::ip6_ifs
struct port_if * ip6_ifs
array of outgoing IP6 interfaces
Definition: outside_network.h:116
key_entry_data::algo
uint8_t * algo
list of algorithms signalled, ends with 0, or NULL
Definition: val_kentry.h:84
mesh_cb::next
struct mesh_cb * next
next in list
Definition: mesh.h:248
views_delete
void views_delete(struct views *v)
Delete views storage.
Definition: view.c:93
O_DEC
#define O_DEC(opt, str, var)
compare and print decimal option
Definition: config_file.c:834
rnd_test
static void rnd_test(void)
test randomness
Definition: unitmain.c:536
VERB_OPS
@ VERB_OPS
1 - operational information
Definition: log.h:53
rtt_compare
static int rtt_compare(const void *x, const void *y)
compare two rtts, return -1, 0 or 1
Definition: iter_utils.c:315
rate_data::timestamp
time_t timestamp[RATE_WINDOW]
what the timestamp is of the qps array members, counter is valid for that timestamp.
Definition: infra.h:182
val_anchors::autr
struct autr_global_data * autr
Autotrust global data, anchors sorted by next probe time.
Definition: val_anchor.h:73
auth_addr::next
struct auth_addr * next
next in list
Definition: authzone.h:424
macro_store_delete
void macro_store_delete(rbtree_type *store)
Delete variable storage.
Definition: replay.c:580
reply_find_final_cname_target
uint8_t * reply_find_final_cname_target(struct query_info *qinfo, struct reply_info *rep)
Find final cname target in reply, the one matching qinfo.
Definition: msgreply.c:725
serviced_query::serviced_query_TCP
@ serviced_query_TCP
TCP without EDNS sent.
Definition: outside_network.h:367
listen_create
struct listen_dnsport * listen_create(struct comm_base *base, struct listen_port *ports, size_t bufsize, int tcp_accept_count, int tcp_idle_timeout, struct tcl_list *tcp_conn_limit, void *sslctx, struct dt_env *dtenv, comm_point_callback_type *cb, void *cb_arg)
Create commpoints with for this thread for the shared ports.
Definition: listen_dnsport.c:1325
priv_create
struct iter_priv * priv_create(void)
Create priv structure.
Definition: iter_priv.c:55
config_file::acl_view
struct config_str2list * acl_view
list of aclname, view
Definition: config_file.h:421
val_classification
val_classification
Response classifications for the validator.
Definition: val_utils.h:61
ds_digest_size_supported
size_t ds_digest_size_supported(int algo)
Return size of DS digest according to its hash algorithm.
ringbuf::buf
uint8_t * buf
base of buffer
Definition: delayer.c:64
fptr_whitelist_serviced_query
int fptr_whitelist_serviced_query(comm_point_callback_type *fptr)
Check function pointer whitelist for serviced query callback values.
Definition: fptr_wlist.c:211
local_zones_print
void local_zones_print(struct local_zones *zones)
Debug helper.
Definition: localzone.c:1177
shm_main_info
The SHM info.
Definition: shm_main.h:53
daemon_get_shufport
static int daemon_get_shufport(struct daemon *daemon, int *shufport)
Obtain allowed port numbers, concatenate the list, and shuffle them (ready to be handed out to thread...
Definition: daemon.c:392
reclaim_space
void reclaim_space(struct lruhash *table, struct lruhash_entry **list)
Try to make space available by deleting old entries.
Definition: lruhash.c:182
sldns_wire2str_header_scan
int sldns_wire2str_header_scan(uint8_t **d, size_t *dlen, char **s, size_t *slen)
Scan wireformat packet header to string, with user buffers.
Definition: wire2str.c:663
outnet_udp_cb
int outnet_udp_cb(struct comm_point *c, void *arg, int error, struct comm_reply *reply_info)
callback for incoming udp answers from the network
Definition: outside_network.c:540
module_env::edns_known_options
struct edns_known_option * edns_known_options
Shared array of known edns options (size MAX_KNOWN_EDNS_OPTS).
Definition: module.h:520
auth_zones_find_zone
struct auth_zone * auth_zones_find_zone(struct auth_zones *az, uint8_t *name, size_t name_len, uint16_t dclass)
find the auth zone that is above the given name
Definition: authzone.c:486
daemon_remote_clear
void daemon_remote_clear(struct daemon_remote *rc)
remote control state to clear up.
Definition: remote.c:231
dynlibmod_env::dyn_env
void * dyn_env
Pointer to any data the dynamic library might want to keep.
Definition: dynlibmod.h:135
tap_socket::data
void * data
data element, (arg for the tap_socket struct)
Definition: unbound-dnstap-socket.c:151
config_create
struct config_file * config_create(void)
Create config file structure.
Definition: config_file.c:89
delegpt_copy
struct delegpt * delegpt_copy(struct delegpt *dp, struct regional *region)
Create a copy of a delegation point.
Definition: iter_delegpt.c:64
neg_delete_data
void neg_delete_data(struct val_neg_cache *neg, struct val_neg_data *el)
Delete a data element from the negative cache.
Definition: val_neg.c:226
q_ans_parse
static void q_ans_parse(struct q_ans *q, struct regional *region, struct query_info **qinfo, int *fallback, uint8_t **dp_nm, size_t *dp_nmlen)
parse q_ans structure for making query
Definition: unitauth.c:611
config_file::ip_transparent
int ip_transparent
IP_TRANSPARENT socket option requested on port 53 sockets.
Definition: config_file.h:190
adjust_ttl
static void adjust_ttl(struct val_env *ve, uint32_t unow, struct ub_packed_rrset_key *rrset, uint8_t *orig_p, uint8_t *expi_p, uint8_t *incep_p)
adjust rrset TTL for verified rrset, compare to original TTL and expi
Definition: val_sigcrypt.c:1327
tcp_send_list::len
size_t len
size of item
Definition: delayer.c:104
MINIMISE_STATE
@ MINIMISE_STATE
QNAME minimisation ongoing.
Definition: iterator.h:156
inplace_cb_delete
void inplace_cb_delete(struct module_env *env, enum inplace_cb_list_type type, int id)
Delete callback for specified type and module id.
Definition: module.c:157
dtio_mainfdcallback
void dtio_mainfdcallback(int fd, short ATTR_UNUSED(bits), void *arg)
callback for main listening file descriptor
Definition: unbound-dnstap-socket.c:1072
reply_find_answer_rrset
struct ub_packed_rrset_key * reply_find_answer_rrset(struct query_info *qinfo, struct reply_info *rep)
Find answer rrset in reply, the one matching qinfo.
Definition: msgreply.c:746
replay_moment::match
struct entry * match
The sent packet must match this.
Definition: replay.h:222
sldns_buffer_reserve
int sldns_buffer_reserve(sldns_buffer *buffer, size_t amount)
ensures BUFFER can contain at least AMOUNT more bytes.
Definition: sbuffer.c:93
autr_debug_print_tp
static void autr_debug_print_tp(struct trust_anchor *tp)
debug print a trust point
Definition: autotrust.c:2275
ip_list::addr
struct sockaddr_storage addr
address ready to connect to
Definition: unbound-anchor.c:168
addr_tree_insert
int addr_tree_insert(rbtree_type *tree, struct addr_tree_node *node, struct sockaddr_storage *addr, socklen_t addrlen, int net)
insert element into addr tree.
Definition: dnstree.c:96
S_NUMBER_NONZERO
#define S_NUMBER_NONZERO(str, var)
put integer_nonzero into variable
Definition: config_file.c:400
delegpt_addr::lame
uint8_t lame
if true, this address is dispreferred: it is a lame IP address
Definition: iter_delegpt.h:152
val_inform_super
void val_inform_super(struct module_qstate *qstate, int id, struct module_qstate *super)
inform validator super.
Definition: validator.c:3209
errinf_dname
void errinf_dname(struct module_qstate *qstate, const char *str, uint8_t *dname)
Append text to error info: str dname.
Definition: config_file.c:2488
rrinternal_parse_rdf
static int rrinternal_parse_rdf(sldns_buffer *strbuf, char *token, size_t token_len, uint8_t *rr, size_t rr_len, size_t *rr_cur_len, sldns_rdf_type rdftype, uint16_t rr_type, size_t r_cnt, size_t r_max, size_t dname_len, uint8_t *origin, size_t origin_len)
parse normal RR rdata element
Definition: str2wire.c:473
fake_temp_file
void fake_temp_file(const char *adj, const char *id, char *buf, size_t len)
Get filename to store temporary config stuff.
Definition: fake_event.c:111
LDNS_RR_TYPE_LOC
@ LDNS_RR_TYPE_LOC
LOC record RFC1876.
Definition: rrdef.h:141
listen_type_udp
@ listen_type_udp
udp type
Definition: listen_dnsport.h:85
mesh_list_remove
void mesh_list_remove(struct mesh_state *m, struct mesh_state **fp, struct mesh_state **lp)
Remove mesh state from a double linked list.
Definition: mesh.c:1806
sock_list_merge
void sock_list_merge(struct sock_list **list, struct regional *region, struct sock_list *add)
Merge socklist into another socket list.
Definition: net_help.c:823
ub_server_stats::hist
long long hist[UB_STATS_BUCKET_NUM]
histogram data exported to array if the array is the same size, no data is lost, and if all histogram...
Definition: unbound.h:746
rrset_cache_touch
void rrset_cache_touch(struct rrset_cache *r, struct ub_packed_rrset_key *key, hashvalue_type hash, rrset_id_type id)
Touch rrset, with given pointer and id.
Definition: rrset.c:94
worker::stats
struct ub_server_stats stats
per thread statistics
Definition: worker.h:119
adjust_file
static void adjust_file(char *file)
adjust filename
Definition: petal.c:344
donotquerylocalhostcheck
static void donotquerylocalhostcheck(struct config_file *cfg)
check do-not-query-localhost
Definition: unbound-checkconf.c:162
comm_point_delete
void comm_point_delete(struct comm_point *c)
Close and deallocate (free) the comm point.
Definition: fake_event.c:1341
ds_get_sigdata
static void ds_get_sigdata(struct ub_packed_rrset_key *k, size_t idx, uint8_t **digest, size_t *len)
Return pointer to the digest in a DS RR.
Definition: val_sigcrypt.c:250
qinfo_query_encode
void qinfo_query_encode(struct sldns_buffer *pkt, struct query_info *qinfo)
Encode query packet.
Definition: msgencode.c:890
regional::first_size
size_t first_size
initial chunk size
Definition: regional.h:72
ub_ctx::alloc_list
struct alloc_cache * alloc_list
List of alloc-cache-id points per threadnum for notinuse threads.
Definition: context.h:107
auth_zone_create
struct auth_zone * auth_zone_create(struct auth_zones *az, uint8_t *nm, size_t nmlen, uint16_t dclass)
create an auth zone.
Definition: authzone.c:411
edns_opt_compare
int edns_opt_compare(struct edns_option *p, struct edns_option *q)
Compare an edns option.
Definition: msgreply.c:1173
dynlibmod_env::func_init
func_init_t func_init
Module init function.
Definition: dynlibmod.h:120
chunkline_is_comment_line_or_empty
static int chunkline_is_comment_line_or_empty(sldns_buffer *buf)
see if a chunkline is a comment line (or empty line)
Definition: authzone.c:4199
delegpt_find_ns
struct delegpt_ns * delegpt_find_ns(struct delegpt *dp, uint8_t *name, size_t namelen)
Find NS record in name list of delegation point.
Definition: iter_delegpt.c:132
trust_anchor::numDNSKEY
size_t numDNSKEY
number of DNSKEYs in the keylist
Definition: val_anchor.h:116
auth_zones::num_query_down
size_t num_query_down
number of queries downstream
Definition: authzone.h:84
dtio_reconnect_del
static void dtio_reconnect_del(struct dt_io_thread *dtio)
remove dtio reconnect timer
Definition: dtstream.c:529
regional_test
void regional_test(void)
unit test for regional allocator functions
Definition: unitregional.c:243
needs_validation
static int needs_validation(struct module_qstate *qstate, int ret_rc, struct dns_msg *ret_msg)
Check to see if a given response needs to go through the validation process.
Definition: validator.c:296
serviced_query::last_sent_time
struct timeval last_sent_time
time last UDP was sent
Definition: outside_network.h:382
testpkts.h
mesh_state::replies_sent
uint8_t replies_sent
true if replies have been sent out (at end for alignment)
Definition: mesh.h:199
respip_init
int respip_init(struct module_env *env, int id)
response-ip init
Definition: respip.c:550
dname_pkt_hash
hashvalue_type dname_pkt_hash(sldns_buffer *pkt, uint8_t *dname, hashvalue_type h)
Hash dname, label by label, lowercasing, into hashvalue.
Definition: dname.c:311
authzone_query_test
static void authzone_query_test(void)
Test authzone query from zone.
Definition: unitauth.c:885
count_reply_packets
static int count_reply_packets(struct entry *entry)
number of replies in entry
Definition: fake_event.c:311
morechecks
static void morechecks(struct config_file *cfg)
check configuration for errors
Definition: unbound-checkconf.c:560
reply_addr2str
void reply_addr2str(struct comm_reply *reply, char *dest, int maxlen)
Convert reply->addr to string.
Definition: pythonmod_utils.c:169
cron_thread
static ub_thread_type cron_thread
the cron thread
Definition: win_svc.c:74
write_unsigned_root
static void write_unsigned_root(const char *root_anchor_file)
write unsigned root anchor file, a 5011 revoked tp
Definition: unbound-anchor.c:1838
mesh_send_reply
static void mesh_send_reply(struct mesh_state *m, int rcode, struct reply_info *rep, struct mesh_reply *r, struct sldns_buffer *r_buffer, struct mesh_reply *prev, struct sldns_buffer *prev_buffer)
Send reply to mesh reply entry.
Definition: mesh.c:1186
replay_scenario_delete
void replay_scenario_delete(struct replay_scenario *scen)
Delete scenario.
Definition: replay.c:508
sec_status_unchecked
@ sec_status_unchecked
UNCHECKED means that object has yet to be validated.
Definition: packed_rrset.h:178
iter_fill_rtt
static int iter_fill_rtt(struct iter_env *iter_env, struct module_env *env, uint8_t *name, size_t namelen, uint16_t qtype, time_t now, struct delegpt *dp, int *best_rtt, struct sock_list *blacklist, size_t *num_suitable_results)
lookup RTT information, and also store fastest rtt (if any)
Definition: iter_utils.c:283
msgencode.h
delegpt_add_unused_targets
void delegpt_add_unused_targets(struct delegpt *dp)
Add all usable targets to the result list.
Definition: iter_delegpt.c:304
find_NS
static struct ub_packed_rrset_key * find_NS(struct reply_info *rep, size_t from, size_t to)
find NS rrset in given list
Definition: iter_delegpt.c:338
check_table
static void check_table(struct lruhash *table)
check integrity of hash table
Definition: unitlruhash.c:277
sldns_str2wire_int8_buf
int sldns_str2wire_int8_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_INT8 from string to wireformat.
Definition: str2wire.c:1019
pythonmod_env::dict
PyObject * dict
Python dictionary.
Definition: pythonmod.c:97
replay_moment::repevt_autotrust_check
@ repevt_autotrust_check
check autotrust key file
Definition: replay.h:206
netblockstrtoaddr
int netblockstrtoaddr(const char *ip, int port, struct sockaddr_storage *addr, socklen_t *addrlen, int *net)
Convert ip netblock (ip/netsize) string and port to sockaddr.
Definition: net_help.c:285
do_flush_stats
static void do_flush_stats(RES *ssl, struct worker *worker)
flush statistics
Definition: remote.c:1588
respip_test
static void respip_test(void)
respip unit tests
Definition: unitmain.c:834
outside_network::pending
rbtree_type * pending
pending udp answers.
Definition: outside_network.h:126
replay_runtime::now
struct replay_moment * now
Current moment.
Definition: replay.h:274
MAX_LINE_LEN
#define MAX_LINE_LEN
maximum line length for lines in the replay file.
Definition: testbound.c:64
dtio_open_output_local
static int dtio_open_output_local(struct dt_io_thread *dtio)
open the output file descriptor for af_local
Definition: dtstream.c:1849
xfr_serial_means_update
static int xfr_serial_means_update(struct auth_xfer *xfr, uint32_t serial)
see if the serial means the zone has to be updated, i.e.
Definition: authzone.c:3504
UB_STATS_OPCODE_NUM
#define UB_STATS_OPCODE_NUM
number of opcodes in stats
Definition: unbound.h:656
fake_pending::zone
uint8_t * zone
zone name, uncompressed wire format (as used when sent)
Definition: replay.h:336
outbound_entry::prev
struct outbound_entry * prev
prev in list
Definition: outbound_list.h:65
replay_moment::elapse
struct timeval elapse
the amount of time that passes
Definition: replay.h:225
daemon_start_others
static void daemon_start_others(struct daemon *daemon)
Fork and init the other threads.
Definition: daemon.c:530
autr_probe_timer
time_t autr_probe_timer(struct module_env *env)
Process probe timer.
Definition: autotrust.c:2426
local_zones_add_zone
struct local_zone * local_zones_add_zone(struct local_zones *zones, uint8_t *name, size_t len, int labs, uint16_t dclass, enum localzone_type tp)
Add a new zone.
Definition: localzone.c:1835
packed_rrset_encode
static int packed_rrset_encode(struct ub_packed_rrset_key *key, sldns_buffer *pkt, uint16_t *num_rrs, time_t timenow, struct regional *region, int do_data, int do_sig, struct compress_tree_node **tree, sldns_pkt_section s, uint16_t qtype, int dnssec, size_t rr_offset)
store rrset in buffer in wireformat, return RETVAL_*
Definition: msgencode.c:449
local_zone_static
@ local_zone_static
answer nxdomain or nodata
Definition: localzone.h:73
add_trustanchor_frm_str
static struct autr_ta * add_trustanchor_frm_str(struct val_anchors *anchors, char *str, struct trust_anchor **tp, uint8_t *origin, size_t origin_len, uint8_t **prev, size_t *prev_len, int *skip)
Add new trust anchor from a string in file.
Definition: autotrust.c:472
ring_delete
static void ring_delete(struct ringbuf *r)
delete ring buffer
Definition: delayer.c:216
pending::cb_arg
void * cb_arg
callback user argument
Definition: outside_network.h:235
local_data_find_tag_datas
int local_data_find_tag_datas(const struct query_info *qinfo, struct config_strlist *list, struct ub_packed_rrset_key *r, struct regional *temp)
Find local data tag string match for the given type (in qinfo) in the list.
Definition: localzone.c:1248
process_prime_response
static void process_prime_response(struct module_qstate *qstate, struct val_qstate *vq, int id, int rcode, struct dns_msg *msg, struct sock_list *origin)
Process prime response Sets the key entry in the state.
Definition: validator.c:3047
packed_rrset_list
list of packed rrsets
Definition: packed_rrset.h:276
context_serial_getcmd
enum ub_ctx_cmd context_serial_getcmd(uint8_t *p, uint32_t len)
Obtain command code from serialized buffer.
Definition: context.c:411
create_udp_sock
int create_udp_sock(int family, int socktype, struct sockaddr *addr, socklen_t addrlen, int v6only, int *inuse, int *noproto, int rcv, int snd, int listen, int *reuseport, int transparent, int freebind, int use_systemd, int dscp)
Create and bind nonblocking UDP socket.
Definition: listen_dnsport.c:179
config_view
View config options.
Definition: config_file.h:694
forwards_delete_zone
void forwards_delete_zone(struct iter_forwards *fwd, uint16_t c, uint8_t *nm)
Remove zone from forward structure.
Definition: iter_fwd.c:486
dname_canonical_compare
int dname_canonical_compare(uint8_t *d1, uint8_t *d2)
Canonical dname compare.
Definition: dname.c:864
can_have_last_resort
static int can_have_last_resort(struct module_env *env, uint8_t *nm, size_t nmlen, uint16_t qclass, struct delegpt **retdp)
see if last resort is possible - does config allow queries to parent
Definition: iterator.c:590
dname_test_count_labels
static void dname_test_count_labels(void)
test dname_count_labels
Definition: unitdname.c:132
sldns_wire2str_rcode_buf
int sldns_wire2str_rcode_buf(int rcode, char *str, size_t len)
Convert wire RR rcode to a string, 'NOERROR', 'NXDOMAIN'.
Definition: wire2str.c:299
dns64_env::prefix_net
int prefix_net
This is the CIDR length of the prefix.
Definition: dns64.c:130
comm_timer
Structure only for making timeout events.
Definition: netevent.h:321
deldata
static void deldata(struct slabhash_testdata *d)
delete data
Definition: slabhash.c:189
ext_callback
static void ext_callback(void *mydata, int err, struct ub_result *result)
extended bg result callback, this function is ub_callback_t
Definition: asynclook.c:267
reply_info::ns_numrrsets
size_t ns_numrrsets
Count of authority section RRsets.
Definition: msgreply.h:179
strip_end_white
static void strip_end_white(char *p)
strip whitespace from end of string
Definition: replay.c:129
lru_pop
static void lru_pop(struct addrtree *tree, struct addrnode *node)
Remove specified node from LRU list.
Definition: addrtree.c:163
verbose
void verbose(enum verbosity_value level, const char *format,...)
implementation of verbose
Definition: log.c:356
perfinfo::numsent
size_t numsent
number of queries sent out in that time
Definition: perf.c:93
ipsecmod_inform_super
void ipsecmod_inform_super(struct module_qstate *qstate, int id, struct module_qstate *super)
Subordinate query done, inform this super request of its conclusion.
ub_ctx_print_local_zones
int ub_ctx_print_local_zones(struct ub_ctx *ctx)
Debug routine.
Definition: libunbound.c:1274
LDNS_RDF_TYPE_UNKNOWN
@ LDNS_RDF_TYPE_UNKNOWN
unknown types
Definition: rrdef.h:300
sldns_buffer_init_frm_data
void sldns_buffer_init_frm_data(sldns_buffer *buffer, void *data, size_t size)
Setup a buffer with the data pointed to.
Definition: sbuffer.c:65
local_zones_answer
int local_zones_answer(struct local_zones *zones, struct module_env *env, struct query_info *qinfo, struct edns_data *edns, struct sldns_buffer *buf, struct regional *temp, struct comm_reply *repinfo, uint8_t *taglist, size_t taglen, uint8_t *tagactions, size_t tagactionssize, struct config_strlist **tag_datas, size_t tag_datas_size, char **tagname, int num_tags, struct view *view)
Answer authoritatively for local zones.
Definition: localzone.c:1652
make_tcp_accept
static int make_tcp_accept(char *ip)
setup tcp accept socket on IP string
Definition: unbound-dnstap-socket.c:264
comm_signal_create
struct comm_signal * comm_signal_create(struct comm_base *base, void(*callback)(int, void *), void *cb_arg)
Create a signal handler.
Definition: fake_event.c:973
libworker::is_bg
int is_bg
is this the bg worker?
Definition: libworker.h:75
ring_create
static struct ringbuf * ring_create(size_t sz)
create new ring buffer
Definition: delayer.c:202
local_zone::lock
lock_rw_type lock
lock on the data in the structure For the node, parent, name, namelen, namelabs, dclass,...
Definition: localzone.h:138
config_parser_state::chroot
const char * chroot
the current chroot dir (or NULL if none)
Definition: config_file.h:1211
dt_io_thread::check_nb_connect
int check_nb_connect
check for nonblocking connect errors on fd
Definition: dtstream.h:145
sldns_str2wire_tsigtime_buf
int sldns_str2wire_tsigtime_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_TSIGTIME from string to wireformat.
Definition: str2wire.c:1458
randomize_and_send_udp
static int randomize_and_send_udp(struct pending *pend, sldns_buffer *packet, int timeout)
with a fd available, randomize and send UDP
Definition: outside_network.c:1191
main
int main(int argc, char **argv)
main program for streamtcp
Definition: unbound-dnstap-socket.c:1264
key_entry_delkeyfunc
void key_entry_delkeyfunc(void *key, void *userarg)
function for lruhash operation
delegpt_add_addr_mlc
int delegpt_add_addr_mlc(struct delegpt *dp, struct sockaddr_storage *addr, socklen_t addrlen, uint8_t bogus, uint8_t lame, char *tls_auth_name)
add an address to a malloced delegation point.
Definition: iter_delegpt.c:609
mesh_log_list
void mesh_log_list(struct mesh_area *mesh)
Print all the states in the mesh to the log.
Definition: mesh.c:1705
cfg_strlist_find
struct config_strlist * cfg_strlist_find(struct config_strlist *head, const char *item)
Find string in strlist.
Definition: config_file.c:1690
infra_dp_ratelimit
int infra_dp_ratelimit
ratelimit, unless overridden by domain_limits, 0 is off
Definition: infra.c:64
dump_rrset
static int dump_rrset(RES *ssl, struct ub_packed_rrset_key *k, struct packed_rrset_data *d, time_t now)
dump rrset key and data info
Definition: cachedump.c:76
main
int main(int argc, char **argv)
anchor update main
Definition: anchor-update.c:135
do_zones_remove
static void do_zones_remove(RES *ssl, struct local_zones *zones)
Do the local_zones_remove command.
Definition: remote.c:1282
test_short_table
static void test_short_table(struct slabhash *table)
test hashtable using short sequence
Definition: unitslabhash.c:83
SENTINEL_KEYTAG_LEN
#define SENTINEL_KEYTAG_LEN
Root key sentinal keytag length.
Definition: validator.h:75
config_auth::rpz_log_name
char * rpz_log_name
Display this name in the log when RPZ policy is applied.
Definition: config_file.h:685
dname_pkt_hash
hashvalue_type dname_pkt_hash(struct sldns_buffer *pkt, uint8_t *dname, hashvalue_type h)
Hash dname, label by label, lowercasing, into hashvalue.
Definition: dname.c:311
autr_tp_create
static struct trust_anchor * autr_tp_create(struct val_anchors *anchors, uint8_t *own, size_t own_len, uint16_t dc)
create tp
Definition: autotrust.c:332
delegpt::has_parent_side_NS
uint8_t has_parent_side_NS
if true, the parent-side NS record has been applied: its names have been added and their addresses ca...
Definition: iter_delegpt.h:81
rrinternal_get_owner
static int rrinternal_get_owner(sldns_buffer *strbuf, uint8_t *rr, size_t *len, size_t *dname_len, uint8_t *origin, size_t origin_len, uint8_t *prev, size_t prev_len, char *token, size_t token_len)
read owner name
Definition: str2wire.c:186
packed_rrset_find_rr
int packed_rrset_find_rr(struct packed_rrset_data *d, uint8_t *rdata, size_t len, size_t *index)
Find RR index in packed rrset Raw comparison, does not canonicalize RDATA.
Definition: packed_rrset.c:392
key_cache_delete
void key_cache_delete(struct key_cache *kcache)
Delete the key cache.
Definition: val_kcache.c:74
read_header
static int read_header(FILE *in)
read header entry.
Definition: lock_verify.c:117
worker::rndstate
struct ub_randstate * rndstate
random() table for this worker.
Definition: worker.h:113
ub_server_stats::num_query_dnscrypt_replay
long long num_query_dnscrypt_replay
number of queries which are replays
Definition: unbound.h:770
pkt_hash_rrset
hashvalue_type pkt_hash_rrset(struct sldns_buffer *pkt, uint8_t *dname, uint16_t type, uint16_t dclass, uint32_t rrset_flags)
Calculate hash value for rrset in packet.
Definition: msgparse.c:167
outside_network::infra
struct infra_cache * infra
host cache, pointer but not owned by outnet.
Definition: outside_network.h:130
key_entry_sizefunc
size_t key_entry_sizefunc(void *key, void *data)
function for lruhash operation
Definition: val_kentry.c:52
tube_write_msg
int tube_write_msg(struct tube *tube, uint8_t *buf, uint32_t len, int nonblock)
Write length bytes followed by message.
Definition: tube.c:285
ctx_query::cancelled
int cancelled
was this query cancelled (for bg worker)
Definition: context.h:156
nsec_get_next
static int nsec_get_next(struct ub_packed_rrset_key *nsec, uint8_t **nm, size_t *ln)
Get next owner name from nsec record.
Definition: val_nsec.c:120
infra_lookup_nottl
struct lruhash_entry * infra_lookup_nottl(struct infra_cache *infra, struct sockaddr_storage *addr, socklen_t addrlen, uint8_t *name, size_t namelen, int wr)
Plain find infra data function (used by the the other functions)
Definition: infra.c:362
INFRA_HOST_STARTSIZE
#define INFRA_HOST_STARTSIZE
infra host cache default hash lookup size
Definition: infra.h:188
mesh_area::forever_last
struct mesh_state * forever_last
last entry in run forever list
Definition: mesh.h:142
tap_socket::ip
char * ip
IP, if this is a TCP socket.
Definition: unbound-dnstap-socket.c:155
ub_server_stats::qEDNS_DO
long long qEDNS_DO
number of queries with EDNS with DO flag
Definition: unbound.h:721
qinfo_query_encode
void qinfo_query_encode(sldns_buffer *pkt, struct query_info *qinfo)
Encode query packet.
Definition: msgencode.c:890
ctx_query
The queries outstanding for the libunbound resolver.
Definition: context.h:148
nsec3_has_type
int nsec3_has_type(struct ub_packed_rrset_key *rrset, int r, uint16_t type)
see if NSEC3 RR contains given type
Definition: val_nsec3.c:283
unit_show_feature
void unit_show_feature(const char *feature)
we are testing this functionality
Definition: unitmain.c:847
val_verify_new_DNSKEYs_with_ta
struct key_entry_key * val_verify_new_DNSKEYs_with_ta(struct regional *region, struct module_env *env, struct val_env *ve, struct ub_packed_rrset_key *dnskey_rrset, struct ub_packed_rrset_key *ta_ds_rrset, struct ub_packed_rrset_key *ta_dnskey_rrset, int downprot, char **reason, struct module_qstate *qstate)
Verify rrset with trust anchor: DS and DNSKEY rrset.
Definition: val_utils.c:696
val_nsec_check_dlv
int val_nsec_check_dlv(struct query_info *qinfo, struct reply_info *rep, uint8_t **nm, size_t *nm_len)
Determine the DLV result, what to do with NSEC DLV reply.
Definition: val_nsec.c:568
module_restart_next
@ module_restart_next
module is waiting for another module; that other is restarted
Definition: module.h:541
libworker_fg_done_cb
void libworker_fg_done_cb(void *arg, int rcode, sldns_buffer *buf, enum sec_status s, char *why_bogus, int was_ratelimited)
mesh callback with fg results
Definition: libworker.c:550
ub_event_add
int ub_event_add(struct ub_event *, struct timeval *)
Activate the event.
Definition: ub_event.c:387
LDNS_RR_CLASS_IN
@ LDNS_RR_CLASS_IN
the Internet
Definition: rrdef.h:52
log_thread_get
int log_thread_get(void)
Get the thread id from logging system.
Definition: log.c:172
rtt.h
ub_resolve
int ub_resolve(struct ub_ctx *ctx, const char *name, int rrtype, int rrclass, struct ub_result **result)
Perform resolution and validation of the target name.
Definition: libunbound.c:680
comm_reply::c
struct comm_point * c
the comm_point with fd to send reply on to.
Definition: netevent.h:115
respip_get_funcblock
struct module_func_block * respip_get_funcblock(void)
Get the response-ip function block.
Definition: respip.c:1281
nsecbitmap_has_type_rdata
int nsecbitmap_has_type_rdata(uint8_t *bitmap, size_t len, uint16_t type)
nsec typemap check, takes an NSEC-type bitmap as argument, checks for type.
Definition: val_nsec.c:61
new_cname_override
static struct ub_packed_rrset_key * new_cname_override(struct regional *region, uint8_t *ct, size_t ctlen)
new rrset containing CNAME override, does not yet contain a dname
Definition: rpz.c:337
reply_info::prefetch_ttl
time_t prefetch_ttl
TTL for prefetch.
Definition: msgreply.h:157
main
int main(int argc, char *argv[])
main program for perf
Definition: perf.c:581
rrstr_get_rr_content
int rrstr_get_rr_content(const char *str, uint8_t **nm, uint16_t *type, uint16_t *dclass, time_t *ttl, uint8_t *rr, size_t len, uint8_t **rdata, size_t *rdata_len)
Parses resource record string into wire format, also returning its field values.
Definition: localzone.c:233
mesh_reply::edns
struct edns_data edns
edns data from query
Definition: mesh.h:222
local_zone_create
static struct local_zone * local_zone_create(uint8_t *nm, size_t len, int labs, enum localzone_type t, uint16_t dclass)
create a new localzone
Definition: localzone.c:146
respip_always_nxdomain
@ respip_always_nxdomain
answer with 'no such domain' response
Definition: localzone.h:554
iter_state
iter_state
State of the iterator for a query.
Definition: iterator.h:170
internal_signal
Internal signal structure, to store signal event in.
Definition: netevent.c:144
dnsc_shared_secrets_cache_key
static uint32_t dnsc_shared_secrets_cache_key(uint8_t *key, uint8_t esversion, uint8_t *pk, uint8_t *sk)
Generate a key suitable to find shared secret in slabhash.
Definition: dnscrypt.c:86
NO_VERBOSE
@ NO_VERBOSE
0 - no verbose messages
Definition: log.h:51
auth_zones_can_fallback
int auth_zones_can_fallback(struct auth_zones *az, uint8_t *nm, size_t nmlen, uint16_t dclass)
see if the auth zone for the name can fallback
Definition: authzone.c:3390
dt_io_thread::upstream_is_unix
int upstream_is_unix
If the log server is connected to over unix domain sockets, eg.
Definition: dtstream.h:190
NUM_UDP_PER_SELECT
#define NUM_UDP_PER_SELECT
number of UDP reads to perform per read indication from select
Definition: netevent.c:95
daemon::rc_ports
struct listen_port * rc_ports
listening ports for remote control
Definition: daemon.h:95
dns64_deinit
void dns64_deinit(struct module_env *env, int id)
dns64 deinit
Definition: dns64.c:431
respip_inform_print
void respip_inform_print(struct respip_action_info *respip_actinfo, uint8_t *qname, uint16_t qtype, uint16_t qclass, struct local_rrset *local_alias, struct comm_reply *repinfo)
print log information for a query subject to an inform or inform-deny response-ip action.
Definition: respip.c:1305
delegpt_add_target
int delegpt_add_target(struct delegpt *dp, struct regional *region, uint8_t *name, size_t namelen, struct sockaddr_storage *addr, socklen_t addrlen, uint8_t bogus, uint8_t lame, int *additions)
Add target address to the delegation point.
Definition: iter_delegpt.c:162
get_queries_ratelimit
static size_t get_queries_ratelimit(struct worker *worker, int reset)
get number of ratelimited queries from iterator
Definition: stats.c:204
ub_ctx_create_nopipe
static struct ub_ctx * ub_ctx_create_nopipe(void)
create context functionality, but no pipes
Definition: libunbound.c:86
mesh_state_add_cb
int mesh_state_add_cb(struct mesh_state *s, struct edns_data *edns, struct sldns_buffer *buf, mesh_cb_func_type cb, void *cb_arg, uint16_t qid, uint16_t qflags)
Create new callback structure and attach it to a mesh state.
Definition: mesh.c:1447
fptr_whitelist_mod_inform_super
int fptr_whitelist_mod_inform_super(void(*fptr)(struct module_qstate *qstate, int id, struct module_qstate *super))
Check function pointer whitelist for module inform_super call values.
Definition: fptr_wlist.c:474
follow_cname_chain
static int follow_cname_chain(struct auth_zone *z, uint16_t qtype, struct regional *region, struct dns_msg *msg, struct packed_rrset_data *d)
follow cname chain and add more data to the answer section
Definition: authzone.c:2930
delete_entry
void delete_entry(struct entry *list)
Delete linked list of entries.
Definition: testpkts.c:1711
str_addr_is_localhost
static int str_addr_is_localhost(const char *a)
true if addr is a localhost address, 127.0.0.1 or ::1 (with maybe "@port" after it)
Definition: unbound-checkconf.c:153
fptr_whitelist_modenv_detach_subs
int fptr_whitelist_modenv_detach_subs(void(*fptr)(struct module_qstate *qstate))
Check function pointer whitelist for module_env detach_subs callback values.
Definition: fptr_wlist.c:346
sldns_mktime_from_utc
time_t sldns_mktime_from_utc(const struct tm *tm)
Convert TM to seconds since epoch (midnight, January 1st, 1970).
Definition: parseutil.c:72
cachedb.h
MAX_TTL
time_t MAX_TTL
MAX TTL default for messages and rrsets.
Definition: msgreply.c:59
ext_check_result
static void ext_check_result(const char *desc, int err, struct ub_result *result)
check result structure for the 'correct' answer
Definition: asynclook.c:194
infra_arg
structure for argument data for dump infra host
Definition: remote.c:2431
fptr_whitelist_hash_delkeyfunc
int fptr_whitelist_hash_delkeyfunc(lruhash_delkeyfunc_type fptr)
Check function pointer whitelist for lruhash delkeyfunc callback values.
Definition: fptr_wlist.c:286
replay_runtime::sig_cb_arg
void * sig_cb_arg
signal handler user arg
Definition: replay.h:312
edns_opt_list_compare
int edns_opt_list_compare(struct edns_option *p, struct edns_option *q)
Compare edns option lists, also the order and contents of edns-options.
Definition: msgreply.c:1188
replay.h
name_tree_node::parent
struct name_tree_node * parent
parent in tree
Definition: dnstree.h:59
config_file::verbosity
int verbosity
verbosity level as specified in the config file
Definition: config_file.h:70
ub_winsock_unregister_wsaevent
void ub_winsock_unregister_wsaevent(struct ub_event *ev)
Free a with a wsaevent associated event.
Definition: ub_event.c:427
ub_ctx::event_worker
struct libworker * event_worker
libworker for event based interface
Definition: context.h:126
TCP_QUERY_TIMEOUT
#define TCP_QUERY_TIMEOUT
The TCP writing query timeout in milliseconds.
Definition: netevent.c:88
QUERYTARGETS_STATE
@ QUERYTARGETS_STATE
Each time a delegation point changes for a given query or a query times out and/or wakes up,...
Definition: iterator.h:195
algo_needs_num_missing
size_t algo_needs_num_missing(struct algo_needs *n)
See how many algorithms are missing (not bogus or secure, but not processed)
Definition: val_sigcrypt.c:466
keysets
Key settings.
Definition: signit.c:51
ub_ctx::superalloc
struct alloc_cache superalloc
shared caches, and so on
Definition: context.h:110
parse_get_cname_target
static int parse_get_cname_target(struct rrset_parse *rrset, uint8_t **sname, size_t *snamelen, sldns_buffer *pkt)
Get target name of a CNAME.
Definition: iter_scrub.c:187
UDP_AUTH_QUERY_TIMEOUT
#define UDP_AUTH_QUERY_TIMEOUT
timeout in milliseconds for UDP queries to auth servers.
Definition: net_help.h:78
fptr_whitelist_modenv_add_sub
int fptr_whitelist_modenv_add_sub(int(*fptr)(struct module_qstate *qstate, struct query_info *qinfo, uint16_t qflags, int prime, int valrec, struct module_qstate **newq, struct mesh_state **sub))
Check function pointer whitelist for module_env add_sub callback values.
Definition: fptr_wlist.c:363
slab_test_thr::num
int num
thread num, first entry.
Definition: unitslabhash.c:302
ub_process
int ub_process(struct ub_ctx *ctx)
Call this routine to continue processing results from the validating resolver (when the fd becomes re...
Definition: libunbound.c:602
pretty_rdata
static void pretty_rdata(char *q, char *cstr, char *tstr, int t, const char *sec, char *data, size_t len)
pretty line of RR data for results
Definition: unbound-host.c:265
internal_timer
Internal timer structure, to store timer event in.
Definition: netevent.c:130
module_qstate
Module state, per query.
Definition: module.h:596
module_list_avail
const char ** module_list_avail(void)
The list of module names.
Definition: modstack.c:138
rbtree_search
rbnode_type * rbtree_search(rbtree_type *rbtree, const void *key)
Find key in tree.
Definition: rbtree.c:281
auth_data_cmp
int auth_data_cmp(const void *z1, const void *z2)
compare auth_data for sorted rbtree
Definition: authzone.c:324
config_del_strbytelist
void config_del_strbytelist(struct config_strbytelist *p)
delete stringbytelist
Definition: config_file.c:1408
rpz_action_to_respip_action
enum respip_action rpz_action_to_respip_action(enum rpz_action a)
Classify respip action for RPZ action.
Definition: rpz.c:223
timeval_add
static void timeval_add(struct timeval *d, const struct timeval *add)
add timers and the values do not overflow or become negative
Definition: mesh.c:84
iter_forwards::tree
rbtree_type * tree
Zones are stored in this tree.
Definition: iter_fwd.h:60
anchor_has_keytag
int anchor_has_keytag(struct val_anchors *anchors, uint8_t *name, int namelabs, size_t namelen, uint16_t dclass, uint16_t keytag)
Check if there is a trust anchor for given zone with this keytag.
Definition: val_anchor.c:1314
iter_qstate::pside_glue
struct ub_packed_rrset_key * pside_glue
the parent-side-glue element (NULL if none, its first match)
Definition: iterator.h:342
config_get_option
int config_get_option(struct config_file *cfg, const char *opt, void(*func)(char *, void *), void *arg)
Call print routine for the given option.
Definition: config_file.c:894
query_entry_delete
void query_entry_delete(void *q, void *arg)
delete msgreply_entry key structure
auth_zones_delete
void auth_zones_delete(struct auth_zones *az)
Delete auth zones structure.
Definition: authzone.c:2124
autr_write_file
void autr_write_file(struct module_env *env, struct trust_anchor *tp)
Write autotrust file.
Definition: autotrust.c:1173
sldns_buffer_write_u32
INLINE void sldns_buffer_write_u32(sldns_buffer *buffer, uint32_t data)
writes the given 4 byte integer at the current position in the buffer
Definition: sbuffer.h:574
LDNS_RR_TYPE_NXT
@ LDNS_RR_TYPE_NXT
2535typecode
Definition: rrdef.h:143
key_entry_create_rrset
struct key_entry_key * key_entry_create_rrset(struct regional *region, uint8_t *name, size_t namelen, uint16_t dclass, struct ub_packed_rrset_key *rrset, uint8_t *sigalg, time_t now)
Create a key entry from an rrset, in the given region.
Definition: val_kentry.c:296
verify_p7sig
static int verify_p7sig(BIO *data, BIO *p7s, STACK_OF(X509) *trust, const char *p7signer)
verify a PKCS7 signature, false on failure
Definition: unbound-anchor.c:1760
parse.h
dtio_reconnect_enable
static void dtio_reconnect_enable(struct dt_io_thread *dtio)
start reconnection attempts
Definition: dtstream.c:496
verbose_key
static void verbose_key(struct autr_ta *ta, enum verbosity_value level, const char *format,...) ATTR_FORMAT(printf
Debug routine to print pretty key information.
Definition: autotrust.c:140
port_if
Outgoing interface.
Definition: outside_network.h:169
context_deserialize_new_query
struct ctx_query * context_deserialize_new_query(struct ub_ctx *ctx, uint8_t *p, uint32_t len)
Deserialize a new_query buffer.
Definition: context.c:245
timehist_setup
struct timehist * timehist_setup(void)
Setup a histogram, default.
Definition: timehist.c:84
nsec3_has_optout
int nsec3_has_optout(struct ub_packed_rrset_key *rrset, int r)
return if nsec3 RR has the optout flag
Definition: val_nsec3.c:133
mesh_state_make_unique
void mesh_state_make_unique(struct mesh_state *mstate)
Make a mesh state unique.
Definition: mesh.c:855
ub_event_vmt::del_signal
int(* del_signal)(struct ub_event *)
Deactivate a signal event (not called by libunbound).
Definition: unbound-event.h:149
key_entry_key::entry
struct lruhash_entry entry
lru hash entry
Definition: val_kentry.h:57
dname_test
void dname_test(void)
unit test dname handling functions
Definition: unitdname.c:861
inplace_cb_lists_delete
void inplace_cb_lists_delete(struct module_env *env)
Delete all the inplace callback linked lists.
do_certupdate
static int do_certupdate(const char *root_anchor_file, const char *root_cert_file, const char *urlname, const char *xmlname, const char *p7sname, const char *p7signer, const char *res_conf, const char *root_hints, const char *debugconf, const char *srcaddr, int ip4only, int ip6only, int port, int use_sni)
perform actual certupdate work
Definition: unbound-anchor.c:1931
worker_handle_reply
int worker_handle_reply(struct comm_point *c, void *arg, int error, struct comm_reply *reply_info)
process incoming replies from the network
Definition: worker.c:239
wsvc_command_option
void wsvc_command_option(const char *wopt, const char *cfgfile, int v, int c)
Handle commandline service for windows.
Definition: win_svc.c:498
dns_msg_ansadd
int dns_msg_ansadd(struct dns_msg *msg, struct regional *region, struct ub_packed_rrset_key *rrset, time_t now)
Add rrset to authority section in unpacked dns_msg message.
Definition: dns.c:451
infra_data
Host information encompasses host capabilities and retransmission timeouts.
Definition: infra.h:75
module_env::kill_sub
void(* kill_sub)(struct module_qstate *newq)
Kill newly attached sub.
Definition: module.h:445
ub_openssl_lock_delete
void ub_openssl_lock_delete(void)
De-init the allocated openssl locks.
Definition: net_help.c:1355
edns_opt_copy_alloc
struct edns_option * edns_opt_copy_alloc(struct edns_option *list)
Copy edns option list allocated with malloc.
Definition: msgreply.c:1217
auth_zone_write_file
int auth_zone_write_file(struct auth_zone *z, const char *fname)
Write auth zone data to file, in zonefile format.
Definition: authzone.c:1724
config_strbytelist::str
char * str
first string
Definition: config_file.h:762
specific_cases
static void specific_cases(void)
test specific cases
Definition: unitregional.c:202
module_env::alloc
struct alloc_cache * alloc
allocation service
Definition: module.h:477
auth_zones_startprobesequence
int auth_zones_startprobesequence(struct auth_zones *az, struct module_env *env, uint8_t *nm, size_t nmlen, uint16_t dclass)
for the zone and if not already going, starts the probe sequence.
Definition: authzone.c:3593
config_file::tls_ciphersuites
char * tls_ciphersuites
TLS chiphersuites (TLSv1.3)
Definition: config_file.h:130
tcp_proxy::timeout
struct timeval timeout
timeout on this entry
Definition: delayer.c:127
ecs_whitelist::upstream
rbtree_type upstream
Tree of the address spans that are whitelisted.
Definition: subnet-whitelist.h:61
listen_sslctx_setup_2
void listen_sslctx_setup_2(void *ctxt)
Further setup of listening SSL context, after keys loaded.
Definition: net_help.c:952
auth_probe::cp
struct comm_point * cp
the SOA probe udp event.
Definition: authzone.h:342
timeval_subtract
static void timeval_subtract(struct timeval *d, const struct timeval *end, const struct timeval *start)
subtract timers and the values do not overflow or become negative
Definition: remote.c:113
compile_time_root_prime
static struct delegpt * compile_time_root_prime(int do_ip4, int do_ip6)
obtain compiletime provided root hints
Definition: iter_hints.c:115
write_compressed_dname
static int write_compressed_dname(sldns_buffer *pkt, uint8_t *dname, int labs, struct compress_tree_node *p)
compress a domain name
Definition: msgencode.c:252
LDNS_RDF_TYPE_TYPE
@ LDNS_RDF_TYPE_TYPE
a RR type
Definition: rrdef.h:292
autr_assemble
static int autr_assemble(struct trust_anchor *tp)
Assemble the trust anchors into DS and DNSKEY packed rrsets.
Definition: autotrust.c:742
dns64_qstate::started_no_cache_store
int started_no_cache_store
If the dns64 module started with no_cache bool set in the qstate, a message to tell it to not modify ...
Definition: dns64.c:95
fptr_whitelist_modenv_send_query
int fptr_whitelist_modenv_send_query(struct outbound_entry *(*fptr)(struct query_info *qinfo, uint16_t flags, int dnssec, int want_dnssec, int nocaps, struct sockaddr_storage *addr, socklen_t addrlen, uint8_t *zone, size_t zonelen, int ssl_upstream, char *tls_auth_name, struct module_qstate *q))
Check function pointer whitelist for module_env send_query callback values.
Definition: fptr_wlist.c:334
slabhash::size
size_t size
the size of the array - must be power of 2
Definition: slabhash.h:59
lruhash_insert_or_retrieve
struct lruhash_entry * lruhash_insert_or_retrieve(struct lruhash *table, hashvalue_type hash, struct lruhash_entry *entry, void *data, void *cb_arg)
Insert a new element into the hashtable, or retrieve the corresponding element of it exits.
Definition: lruhash.c:576
auth_zone::data
rbtree_type data
auth data for this zone rbtree of struct auth_data
Definition: authzone.h:118
usage
static void usage(void)
usage
Definition: anchor-update.c:50
auth_transfer::timer
struct comm_timer * timer
timeout for the transfer.
Definition: authzone.h:418
context_query_delete
void context_query_delete(struct ctx_query *q)
delete context query
Definition: context.c:113
XMLNAME
#define XMLNAME
path on HTTPS server to xml file
Definition: unbound-anchor.c:145
remote_control_callback
int remote_control_callback(struct comm_point *, void *, int, struct comm_reply *)
handle remote control data callbacks
rbnode_type::right
rbnode_type * right
right node (larger items)
Definition: rbtree.h:61
ds_digest_match_dnskey
int ds_digest_match_dnskey(struct module_env *env, struct ub_packed_rrset_key *dnskey_rrset, size_t dnskey_idx, struct ub_packed_rrset_key *ds_rrset, size_t ds_idx)
Check if dnskey matches a DS digest Does not check dnskey-keyid footprint, just the digest.
Definition: val_sigcrypt.c:314
regional_log_stats
void regional_log_stats(struct regional *r)
Debug print regional statistics to log.
Definition: regional.c:217
val_dsset_isusable
int val_dsset_isusable(struct ub_packed_rrset_key *ds_rrset)
Determine if DS rrset is usable for validator or not.
Definition: val_utils.c:724
pending_delete
void pending_delete(struct outside_network *outnet, struct pending *p)
Delete pending answer.
Definition: outside_network.c:1001
subdomain_dname
static int subdomain_dname(uint8_t *q, size_t qlen, uint8_t *p, size_t plen)
see if domain names are subdomain q of p
Definition: testpkts.c:1364
config_file::stubs
struct config_stub * stubs
the stub definitions, linked list
Definition: config_file.h:210
sldns_buffer_read_u32
INLINE uint32_t sldns_buffer_read_u32(sldns_buffer *buffer)
returns the 4-byte integer value at the current position in the buffer
Definition: sbuffer.h:690
az_empty_nonterminal
static int az_empty_nonterminal(struct auth_zone *z, struct query_info *qinfo, struct auth_data *node)
See if the query goes to empty nonterminal (that has no auth_data, but there are nodes underneath.
Definition: authzone.c:2365
infra_arg::ssl_failed
int ssl_failed
ssl failure? stop writing and skip the rest.
Definition: remote.c:2440
DONOT_MINIMISE_STATE
@ DONOT_MINIMISE_STATE
Send out full QNAME + original QTYPE.
Definition: iterator.h:164
sldns_calc_keytag_raw
uint16_t sldns_calc_keytag_raw(uint8_t *key, size_t keysize)
Calculates keytag of DNSSEC key, operates on wireformat rdata.
Definition: keyraw.c:106
ipstrtoaddr
int ipstrtoaddr(const char *ip, int port, struct sockaddr_storage *addr, socklen_t *addrlen)
Convert ip address string and port to sockaddr.
Definition: net_help.c:247
ssl_read_buf
static int ssl_read_buf(RES *ssl, sldns_buffer *buf)
read a line from ssl into buffer
Definition: cachedump.c:305
decommission_pending_tcp
static void decommission_pending_tcp(struct outside_network *outnet, struct pending_tcp *pend)
decommission a tcp buffer, closes commpoint and frees waiting_tcp entry
Definition: outside_network.c:441
config_file::val_date_override
int32_t val_date_override
if not 0, this value is the validation date for RRSIGs
Definition: config_file.h:346
daemon::need_to_exit
int need_to_exit
do we need to exit unbound (or is it only a reload?)
Definition: daemon.h:105
val_neg_zone::nsec3_salt
uint8_t * nsec3_salt
nsec3 salt in use
Definition: val_neg.h:117
sigdate_error
static void sigdate_error(const char *str, int32_t expi, int32_t incep, int32_t now)
pretty print rrsig error with dates
Definition: val_sigcrypt.c:1204
respip_set_delete
void respip_set_delete(struct respip_set *set)
This prototype is defined in in respip.h, but we want to avoid unnecessary dependencies.
Definition: respip.c:84
reply_info_answer_encode
int reply_info_answer_encode(struct query_info *qinf, struct reply_info *rep, uint16_t id, uint16_t qflags, struct sldns_buffer *dest, time_t timenow, int cached, struct regional *region, uint16_t udpsize, struct edns_data *edns, int dnssec, int secure)
Generate answer from reply_info.
Definition: msgencode.c:838
sldns_str2wire_int16_buf
int sldns_str2wire_int16_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_INT16 from string to wireformat.
Definition: str2wire.c:1032
listen_dnsport.h
pending_tcp_query
struct waiting_tcp * pending_tcp_query(struct serviced_query *sq, struct sldns_buffer *packet, int timeout, comm_point_callback_type *callback, void *callback_arg)
Send TCP query.
Definition: outside_network.c:1319
rrset_trust_validated
@ rrset_trust_validated
DNSSEC(rfc4034) validated with trusted keys.
Definition: packed_rrset.h:166
hints_apply_cfg
int hints_apply_cfg(struct iter_hints *hints, struct config_file *cfg)
Process hints config.
Definition: iter_hints.c:431
answer_callback_from_entry
static void answer_callback_from_entry(struct replay_runtime *runtime, struct entry *entry, struct fake_pending *pend)
Perform range entry on pending message.
Definition: fake_event.c:365
socketpair
#define socketpair(f, t, p, sv)
no socketpair() available, like on Minix 3.1.7, use pipe
Definition: tube.c:54
bin_delete
void bin_delete(struct lruhash *table, struct lruhash_bin *bin)
delete the hash bin and entries inside it
Definition: lruhash.c:98
RTT_MIN_TIMEOUT
int RTT_MIN_TIMEOUT
min retransmit timeout value, in milliseconds
Definition: rtt.c:47
rpz_action_to_string
const char * rpz_action_to_string(enum rpz_action a)
String for RPZ action enum.
Definition: rpz.c:56
ub_ctx_cmd
ub_ctx_cmd
Command codes for libunbound pipe.
Definition: context.h:216
mesh_walk_supers
void mesh_walk_supers(struct mesh_area *mesh, struct mesh_state *mstate)
Call inform_super for the super query states that are interested in the results from this query state...
Definition: mesh.c:1408
delegpt_count_addr
void delegpt_count_addr(struct delegpt *dp, size_t *numaddr, size_t *numres, size_t *numavail)
count addresses, and number in result and available lists, for logging
Definition: iter_delegpt.c:240
infra_adjust
struct infra_cache * infra_adjust(struct infra_cache *infra, struct config_file *cfg)
Adjust infra cache to use updated configuration settings.
Definition: infra.c:294
codeline::calls
uint64_t calls
number allocations and frees
Definition: memstats.c:64
STRMAX
#define STRMAX
max length of strings: filenames and function names.
Definition: lock_verify.c:162
xml_data::ctag
BIO * ctag
the current anchor: KeyTag
Definition: unbound-anchor.c:1210
ipsecmod-whitelist.h
ub_get_event_sys
void ub_get_event_sys(struct ub_event_base *, const char **n, const char **s, const char **m)
Return the name, system and method for the pluggable event base.
Definition: ub_event.c:167
compress_rdata
static int compress_rdata(sldns_buffer *pkt, uint8_t *rdata, size_t todolen, struct regional *region, struct compress_tree_node **tree, const sldns_rr_descriptor *desc)
compress domain names in rdata, return RETVAL_*
Definition: msgencode.c:367
autr_tp_remove
static void autr_tp_remove(struct module_env *env, struct trust_anchor *tp, struct ub_packed_rrset_key *dnskey_rrset)
Revoke and Delete a trust point.
Definition: autotrust.c:2089
regional::large_list
char * large_list
first large object, cast to char** to obtain next ptr
Definition: regional.h:68
anchors_create
struct val_anchors * anchors_create(void)
Create trust anchor storage.
Definition: val_anchor.c:76
config_file::stat_cumulative
int stat_cumulative
if false, statistics values are reset after printing them
Definition: config_file.h:75
acl_find_or_create
static struct acl_addr * acl_find_or_create(struct acl_list *acl, const char *str)
find or create node (NULL on parse or error)
Definition: acl_list.c:134
context_serialize_new_query
uint8_t * context_serialize_new_query(struct ctx_query *q, uint32_t *len)
Serialize a context query that questions data.
Definition: context.c:222
ub_ctx_data_remove
int ub_ctx_data_remove(struct ub_ctx *ctx, const char *data)
Remove localdata from the library local authority info.
Definition: libunbound.c:1362
optarg
char * optarg
getopt global, in case header files fail to declare it.
checkrlimits
static void checkrlimits(struct config_file *cfg)
check file descriptor count
Definition: unbound.c:174
main_tap_data::base
struct ub_event_base * base
the event base (to loopexit)
Definition: unbound-dnstap-socket.c:99
BLACK
#define BLACK
Node colour black.
Definition: rbtree.c:48
rbtree_delete_fixup
static void rbtree_delete_fixup(rbtree_type *rbtree, rbnode_type *child, rbnode_type *child_parent)
Fixup node colours when delete happened.
Definition: rbtree.c:406
chaos_trustanchor
static void chaos_trustanchor(sldns_buffer *pkt, struct edns_data *edns, struct worker *w, struct comm_reply *repinfo)
Create CH class trustanchor answer.
Definition: worker.c:868
RESPONSE_TYPE_REFERRAL
@ RESPONSE_TYPE_REFERRAL
'delegation' means that the response is a delegation.
Definition: iter_resptype.h:66
local_zones_print
void local_zones_print(struct local_zones *zones)
Debug helper.
Definition: localzone.c:1177
worker_restart_timer
static void worker_restart_timer(struct worker *worker)
restart statistics timer for worker, if enabled
Definition: worker.c:1658
pending_tcp::id
uint16_t id
the ID for the query; checked in reply
Definition: outside_network.h:259
get_qname_len
static size_t get_qname_len(uint8_t *pkt, size_t pktlen)
get qtype from packet
Definition: testpkts.c:722
dt_msg_entry::len
size_t len
the length to send.
Definition: dtstream.h:88
nsec3_hash_test_entry
static void nsec3_hash_test_entry(struct entry *e, rbtree_type *ct, struct alloc_cache *alloc, struct regional *region, sldns_buffer *buf)
Test hash algo - NSEC3 hash it and compare result.
Definition: unitverify.c:419
sldns_wire2str_type_print
int sldns_wire2str_type_print(char **str, size_t *str_len, uint16_t rrtype)
Print host format rr type to string.
Definition: wire2str.c:890
acl_list_tag_action_cfg
static int acl_list_tag_action_cfg(struct acl_list *acl, struct config_file *cfg, const char *str, const char *tag, const char *action)
apply acl_tag_action string
Definition: acl_list.c:194
rc_state::shake_state
enum rc_state::@0 shake_state
in the handshake part
rtt_unclamped
int rtt_unclamped(const struct rtt_info *rtt)
Get unclamped timeout to use for server selection.
Definition: rtt.c:78
ub_server_stats::qtype_big
long long qtype_big
bigger qtype values not in array
Definition: unbound.h:687
validate_nodata_response
static void validate_nodata_response(struct module_env *env, struct val_env *ve, struct query_info *qchase, struct reply_info *chase_reply, struct key_entry_key *kkey)
Validate a NOERROR/NODATA signed response – a response that has a NOERROR Rcode but no ANSWER section...
Definition: validator.c:888
signal_handling_record
static void signal_handling_record(void)
Signal handling during the time when netevent is disabled.
Definition: daemon.c:156
mesh_delete_all
void mesh_delete_all(struct mesh_area *mesh)
Delete all mesh states from the mesh.
Definition: mesh.c:304
is_terminal
static int is_terminal(struct local_data *d)
returns true if the node is terminal so no deeper domain names exist
Definition: localzone.c:1916
comm_point::comm_udp
@ comm_udp
UDP socket - handle datagrams.
Definition: netevent.h:227
print_edns_opts
static int print_edns_opts(char **s, size_t *sl, uint8_t *rdata, size_t rdatalen)
print the edns options to string
Definition: wire2str.c:1987
createResponse
int createResponse(struct module_qstate *qstate, sldns_buffer *pkt)
Create response according to the ldns packet content.
Definition: pythonmod_utils.c:111
ub_winsock_register_wsaevent
struct ub_event * ub_winsock_register_wsaevent(struct ub_event_base *base, void *wsaevent, void(*cb)(int, short, void *), void *arg)
Create a new ub_event associated with the wsaevent for the event base.
Definition: ub_event_pluggable.c:532
config_delauth
void config_delauth(struct config_auth *p)
Delete an auth item.
Definition: config_file.c:1323
mesh_area::qbuf_bak
struct sldns_buffer * qbuf_bak
backup of query if other operations recurse and need the network buffers
Definition: mesh.h:136
SERVE_EXPIRED_TTL
time_t SERVE_EXPIRED_TTL
Time to serve records after expiration.
Definition: msgreply.c:67
fake_front_query
static void fake_front_query(struct replay_runtime *runtime, struct replay_moment *todo)
Create commpoint (as return address) for a fake incoming query.
Definition: fake_event.c:447
subnetmod_get_funcblock
struct module_func_block * subnetmod_get_funcblock(void)
Get the module function block.
donotq_lookup
int donotq_lookup(struct iter_donotq *donotq, struct sockaddr_storage *addr, socklen_t addrlen)
See if an address is blocked.
Definition: iter_donotq.c:142
addzone
static struct auth_zone * addzone(struct auth_zones *az, const char *name, char *fname)
Add zone from file for testing.
Definition: unitauth.c:521
sldns_file_parse_state::lineno
int lineno
line number information
Definition: str2wire.h:231
dname_test_query_dname_compare
static void dname_test_query_dname_compare(void)
test query_dname_compare
Definition: unitdname.c:102
neg_closest_zone_parent
static struct val_neg_zone * neg_closest_zone_parent(struct val_neg_cache *neg, uint8_t *nm, size_t nm_len, int labs, uint16_t qclass)
Find closest existing parent zone of the given name.
Definition: val_neg.c:370
wsvc_cron_cb
void wsvc_cron_cb(void *arg)
windows cron timer callback handler
Definition: win_svc.c:594
dt_io_thread::tls_server_name
char * tls_server_name
is the TLS upstream authenticated by name, if nonNULL, we use the same cert bundle as used by other T...
Definition: dtstream.h:214
internal_signal::next
struct internal_signal * next
next in signal list
Definition: netevent.c:148
iter_msg_has_dnssec
int iter_msg_has_dnssec(struct dns_msg *msg)
See if a message contains DNSSEC.
Definition: iter_utils.c:843
do_keypres
static void do_keypres(struct module_env *env, struct autr_ta *anchor, int *c)
Event: KeyPres.
Definition: autotrust.c:1773
az_nsec3_find_cover
static struct auth_data * az_nsec3_find_cover(struct auth_zone *z, uint8_t *nm, size_t nmlen, int algo, size_t iter, uint8_t *salt, size_t saltlen)
Find cover for hashed(nm, nmlen) (or NULL)
Definition: authzone.c:2707
auth_zone_del
static void auth_zone_del(rbnode_type *n, void *ATTR_UNUSED(arg))
helper traverse to delete zones
Definition: authzone.c:2110
fill_nsec3_iter
static int fill_nsec3_iter(struct val_env *ve, char *s, int c)
fill up nsec3 key iterations config entry
Definition: validator.c:74
key_entry_data::rrset_data
struct packed_rrset_data * rrset_data
the key rrdata.
Definition: val_kentry.h:80
BOGUS_KEY_TTL
#define BOGUS_KEY_TTL
TTL for bogus key entries.
Definition: validator.h:65
readup_str
static int readup_str(char **str, FILE *in)
read a string from file, false on error
Definition: lock_verify.c:164
ub_ctx_data_add
int ub_ctx_data_add(struct ub_ctx *ctx, const char *data)
Add localdata to the library local authority info.
Definition: libunbound.c:1352
config_file::ssl_port
int ssl_port
port on which to provide ssl service
Definition: config_file.h:116
comm_timer_disable
void comm_timer_disable(struct comm_timer *timer)
disable timer.
Definition: fake_event.c:1508
tube_remove_bg_write
void tube_remove_bg_write(struct tube *tube)
Remove bg write setup from event base.
Definition: tube.c:126
caps_strip_reply
void caps_strip_reply(struct reply_info *rep)
Remove unused bits from the reply if possible.
Definition: iter_utils.c:1025
cfg_condense_ports
int cfg_condense_ports(struct config_file *cfg, int **avail)
Get a condensed list of ports returned.
Definition: config_file.c:1601
resp_addr_get_action
enum respip_action resp_addr_get_action(const struct resp_addr *addr)
returns respip action for the specified node in the respip address returns respip_none for NULL input...
Definition: respip.c:1287
edns_opt_compare
int edns_opt_compare(struct edns_option *p, struct edns_option *q)
Compare an edns option.
Definition: msgreply.c:1173
tap_socket_delev
static void tap_socket_delev(struct tap_socket *s)
del the tap event
Definition: unbound-dnstap-socket.c:161
outnet_serviced_query_stop
void outnet_serviced_query_stop(struct serviced_query *sq, void *cb_arg)
Remove service query callback.
Definition: outside_network.c:2177
lookup
static void lookup(struct ub_ctx *ctx, const char *nm, const char *qt, const char *qc)
perform host lookup
Definition: unbound-host.c:385
new_local_rrset
static struct local_rrset * new_local_rrset(struct regional *region, struct local_data *node, uint16_t rrtype, uint16_t rrclass)
new local_rrset
Definition: localzone.c:321
S_STRLIST_UNIQ
#define S_STRLIST_UNIQ(str, var)
put string into strlist if not present yet
Definition: config_file.c:427
config_read
int config_read(struct config_file *config, const char *filename, const char *chroot)
Read the config file from the specified filename.
Definition: config_file.c:1182
packed_rr_to_string
int packed_rr_to_string(struct ub_packed_rrset_key *rrset, size_t i, time_t now, char *dest, size_t dest_len)
Convert RR from RRset to string.
Definition: packed_rrset.c:271
rpz_insert_qname_trigger
static void rpz_insert_qname_trigger(struct rpz *r, uint8_t *dname, size_t dnamelen, enum rpz_action a, uint16_t rrtype, uint16_t rrclass, uint32_t ttl, uint8_t *rdata, size_t rdata_len, uint8_t *rr, size_t rr_len)
Insert RR into RPZ's local-zone.
Definition: rpz.c:469
config_file::dnscrypt
int dnscrypt
DNSCrypt.
Definition: config_file.h:558
serviced_get_mem
size_t serviced_get_mem(struct serviced_query *sq)
Get memory size in use by serviced query while it is servicing callbacks.
Definition: outside_network.c:2536
sldns_rr_descript
const sldns_rr_descriptor * sldns_rr_descript(uint16_t type)
returns the resource record descriptor for the given rr type.
Definition: rrdef.c:631
select_id
static int select_id(struct outside_network *outnet, struct pending *pend, sldns_buffer *packet)
Select random ID.
Definition: outside_network.c:1089
sldns_struct_rr_descriptor::_name
const char * _name
Textual name of the RR type.
Definition: rrdef.h:454
rrset_trust_ans_AA
@ rrset_trust_ans_AA
The authoritative data included in the answer section of an authoritative reply.
Definition: packed_rrset.h:160
comm_point::comm_ssl_shake_read
@ comm_ssl_shake_read
ssl initial handshake wants to read
Definition: netevent.h:198
INET_SIZE
#define INET_SIZE
byte size of ip4 address
Definition: net_help.h:88
config_file::tls_additional_port
struct config_strlist * tls_additional_port
additional tls ports
Definition: config_file.h:124
print_option
static void print_option(struct config_file *cfg, const char *opt, int final)
Print given option to stdout.
Definition: unbound-checkconf.c:105
net_help.h
auth_zone_read_zonefile
int auth_zone_read_zonefile(struct auth_zone *z, struct config_file *cfg)
read auth zone from zonefile.
Definition: authzone.c:1562
trust_anchor::keylist
struct ta_key * keylist
List of DS or DNSKEY rrs that form the trust anchor.
Definition: val_anchor.h:110
tube_res_list::next
struct tube_res_list * next
next in list
Definition: tube.h:117
addr_tree_lookup
struct addr_tree_node * addr_tree_lookup(rbtree_type *tree, struct sockaddr_storage *addr, socklen_t addrlen)
Lookup closest encloser in addr tree.
Definition: dnstree.c:210
infra_ratelimit_dec
void infra_ratelimit_dec(struct infra_cache *infra, uint8_t *name, size_t namelen, time_t timenow)
Decrement the query rate counter for a delegation point.
Definition: infra.c:958
tcp_req_info_delete
void tcp_req_info_delete(struct tcp_req_info *req)
Delete tcp request structure.
Definition: listen_dnsport.c:1611
ub_ctx_hosts
int ub_ctx_hosts(struct ub_ctx *ctx, const char *fname)
Read list of hosts from the filename given.
Definition: libunbound.c:1158
delegpt::bogus
int bogus
if true, the NS RRset was bogus.
Definition: iter_delegpt.h:76
view::lock
lock_rw_type lock
lock on the data in the structure For the node and name you need to also hold the views_tree lock to ...
Definition: view.h:83
hints_add_stub
int hints_add_stub(struct iter_hints *hints, uint16_t c, struct delegpt *dp, int noprime)
Add stub to hints structure.
Definition: iter_hints.c:527
nsec_verify_rrset
static int nsec_verify_rrset(struct module_env *env, struct val_env *ve, struct ub_packed_rrset_key *nsec, struct key_entry_key *kkey, char **reason, struct module_qstate *qstate)
check security status from cache or verify rrset, returns true if secure
Definition: val_nsec.c:177
IO_TIMEOUT
#define IO_TIMEOUT
number of msec timeout on io ports
Definition: perf.c:145
anchor_store_new_rr
static struct trust_anchor * anchor_store_new_rr(struct val_anchors *anchors, uint8_t *rr, size_t rl, size_t dl)
Add new RR.
Definition: val_anchor.c:357
config_file::identity
char * identity
identity, hostname is returned if "".
Definition: config_file.h:319
serviced_query::want_dnssec
int want_dnssec
We want signatures, or else the answer is likely useless.
Definition: outside_network.h:338
ub_event::vmt
struct ub_event_vmt * vmt
Virtual Method Table for ub_event.
Definition: unbound-event.h:170
tap_data::is_bidirectional
int is_bidirectional
are we bi-directional (if false, uni-directional)
Definition: unbound-dnstap-socket.c:125
val_neg_zone::nsec3_saltlen
size_t nsec3_saltlen
length of salt in bytes
Definition: val_neg.h:119
tube_read_msg
int tube_read_msg(struct tube *tube, uint8_t **buf, uint32_t *len, int nonblock)
Read length bytes followed by message.
Definition: tube.c:331
search_cycle
static void search_cycle(struct lock_ref *visit, int level, struct lock_ref *from)
recursive function to depth first search for cycles.
Definition: lock_verify.c:326
echo_cmdline
static void echo_cmdline(int argc, char *argv[])
pretty print commandline for unbound in this test
Definition: testbound.c:145
LDNS_RR_TYPE_SINK
@ LDNS_RR_TYPE_SINK
dnsind-kitchen-sink-02.txt
Definition: rrdef.h:163
python_inplace_cb_reply_generic
int python_inplace_cb_reply_generic(struct query_info *qinfo, struct module_qstate *qstate, struct reply_info *rep, int rcode, struct edns_data *edns, struct edns_option **opt_list_out, struct comm_reply *repinfo, struct regional *region, int id, void *python_callback)
Declared here for fptr_wlist access.
auth_xfer_transfer_http_callback
int auth_xfer_transfer_http_callback(struct comm_point *c, void *arg, int err, struct comm_reply *repinfo)
callback for task_transfer http connections
Definition: authzone.c:5907
acl_get_control
enum acl_access acl_get_control(struct acl_addr *acl)
Lookup access control status for acl structure.
Definition: acl_list.c:470
ub_ctx_resolvconf
int ub_ctx_resolvconf(struct ub_ctx *ctx, const char *fname)
Read list of nameservers to use from the filename given.
Definition: libunbound.c:1072
construct_reply_info_base
struct reply_info * construct_reply_info_base(struct regional *region, uint16_t flags, size_t qd, time_t ttl, time_t prettl, time_t expttl, size_t an, size_t ns, size_t ar, size_t total, enum sec_status sec)
constructor for replyinfo
Definition: msgreply.c:93
cachedb_init
int cachedb_init(struct module_env *env, int id)
Init the cachedb module.
replay_var_compare
int replay_var_compare(const void *a, const void *b)
compare two replay_vars
Definition: replay.c:556
key_entry_create_bad
struct key_entry_key * key_entry_create_bad(struct regional *region, uint8_t *name, size_t namelen, uint16_t dclass, time_t ttl, time_t now)
Create a bad entry, in the given region.
Definition: val_kentry.c:324
apply_respip_action
static int apply_respip_action(struct worker *worker, const struct query_info *qinfo, struct respip_client_info *cinfo, struct reply_info *rep, struct comm_reply *repinfo, struct ub_packed_rrset_key **alias_rrset, struct reply_info **encode_repp, struct auth_zones *az)
Apply, if applicable, a response IP action to a cached answer.
Definition: worker.c:574
ub_ctx_create_ub_event
struct ub_ctx * ub_ctx_create_ub_event(struct ub_event_base *ueb)
Create a resolving and validation context.
Definition: libunbound.c:197
algo_needs::num
size_t num
the number of entries in the array that are unfulfilled
Definition: val_sigcrypt.h:71
dname_query_hash
hashvalue_type dname_query_hash(uint8_t *dname, hashvalue_type h)
Hash dname, label by label, lowercasing, into hashvalue.
Definition: dname.c:287
worker::comsig
struct comm_signal * comsig
the signal handler
Definition: worker.h:102
tube::cmd_len
uint32_t cmd_len
size of current read command, may be partially read
Definition: tube.h:79
sldns_buffer_write
INLINE void sldns_buffer_write(sldns_buffer *buffer, const void *data, size_t count)
writes count bytes of data to the current position of the buffer
Definition: sbuffer.h:463
daemon_remote::worker
struct worker * worker
the worker for this remote control
Definition: remote.h:91
rr_parse::outside_packet
int outside_packet
true if ttl_data is not part of the packet, but elsewhere in mem.
Definition: msgparse.h:190
dynlibmod_deinit
void dynlibmod_deinit(struct module_env *env, int id)
dynlib module deinit
Definition: dynlibmod.c:166
entry::next
struct entry * next
next in list
Definition: testpkts.h:220
rrinternal_get_delims
static const char * rrinternal_get_delims(sldns_rdf_type rdftype, size_t r_cnt, size_t r_max)
find delimiters for type
Definition: str2wire.c:340
entry::copy_query
uint8_t copy_query
copy the query nametypeclass from query into the answer
Definition: testpkts.h:207
ub_cancel
int ub_cancel(struct ub_ctx *ctx, int async_id)
Cancel an async query in progress.
Definition: libunbound.c:829
fake_commpoint::type_tcp_out
int type_tcp_out
if this is a tcp outgoing type of commpoint
Definition: fake_event.c:79
auth_answer_encode
static void auth_answer_encode(struct query_info *qinfo, struct module_env *env, struct edns_data *edns, struct comm_reply *repinfo, sldns_buffer *buf, struct regional *temp, struct dns_msg *msg)
encode auth answer
Definition: authzone.c:3277
NETEVENT_TIMEOUT
#define NETEVENT_TIMEOUT
to pass timeout happened to callback function
Definition: netevent.h:85
xml_data::cdigest
BIO * cdigest
the current anchor: Digest
Definition: unbound-anchor.c:1216
hashvalue_type
uint32_t hashvalue_type
the type of a hash value
Definition: lruhash.h:119
internal_base::slow_accept
struct ub_event * slow_accept
the event used for slow_accept timeouts
Definition: netevent.c:122
internal_signal::ev
struct ub_event * ev
ub_event event type
Definition: netevent.c:146
port_if::out
struct port_comm ** out
array of the commpoints currently in use.
Definition: outside_network.h:189
acl_list_get_mem
size_t acl_list_get_mem(struct acl_list *acl)
Get memory used by acl structure.
Definition: acl_list.c:485
infra_find_ratedata
static struct lruhash_entry * infra_find_ratedata(struct infra_cache *infra, uint8_t *name, size_t namelen, int wr)
find data item in array, for write access, caller unlocks
Definition: infra.c:800
rtt_init
void rtt_init(struct rtt_info *rtt)
Initialize RTT estimators.
Definition: rtt.c:62
bin_overflow_remove
void bin_overflow_remove(struct lruhash_bin *bin, struct lruhash_entry *entry)
Remove entry from bin overflow chain.
Definition: lruhash.c:167
LDNS_RR_TYPE_IPSECKEY
@ LDNS_RR_TYPE_IPSECKEY
IPsec Key.
Definition: rrdef.h:173
server_stats_compile
void server_stats_compile(struct worker *worker, struct ub_stats_info *s, int reset)
Compile stats into structure for this thread worker.
Definition: stats.c:254
shared_secret_cache_key::key
uint8_t key[DNSCRYPT_SHARED_SECRET_KEY_LENGTH]
the hash table key
Definition: dnscrypt.c:58
ub_server_stats::qbit_RD
long long qbit_RD
number of queries with RD bit
Definition: unbound.h:709
view::name
char * name
view name.
Definition: view.h:72
msg_add_rrset_an
static int msg_add_rrset_an(struct auth_zone *z, struct regional *region, struct dns_msg *msg, struct auth_data *node, struct auth_rrset *rrset)
add rrset to answer section (no auth, add rrsets yet)
Definition: authzone.c:219
shared_secret_cache_key
Definition: dnscrypt.c:56
reply_info_parse
int reply_info_parse(sldns_buffer *pkt, struct alloc_cache *alloc, struct query_info *qinf, struct reply_info **rep, struct regional *region, struct edns_data *edns)
Parse query reply.
Definition: msgreply.c:461
val_verify_DNSKEY_with_TA
enum sec_status val_verify_DNSKEY_with_TA(struct module_env *env, struct val_env *ve, struct ub_packed_rrset_key *dnskey_rrset, struct ub_packed_rrset_key *ta_ds, struct ub_packed_rrset_key *ta_dnskey, uint8_t *sigalg, char **reason, struct module_qstate *qstate)
Verify DNSKEYs with DS and DNSKEY rrset.
Definition: val_utils.c:585
replay_range_delete
static void replay_range_delete(struct replay_range *rng)
delete range
Definition: replay.c:119
auth_xfer_cmp
int auth_xfer_cmp(const void *z1, const void *z2)
compare auth_xfer for sorted rbtree
Definition: authzone.c:334
dt_io_thread_stop
void dt_io_thread_stop(struct dt_io_thread *dtio)
Stop the io thread.
Definition: dtstream.c:2084
rrset_parse::type
uint16_t type
type, host order.
Definition: msgparse.h:157
dtio_cur_msg_free
static void dtio_cur_msg_free(struct dt_io_thread *dtio)
delete the current message in the dtio, and reset counters
Definition: dtstream.c:554
tap_socket_delete
static void tap_socket_delete(struct tap_socket *s)
delete tap socket
Definition: unbound-dnstap-socket.c:180
cfg_convert_timeval
time_t cfg_convert_timeval(const char *str)
Convert 14digit to time value.
Definition: config_file.c:1808
delegpt_add_target_mlc
int delegpt_add_target_mlc(struct delegpt *dp, uint8_t *name, size_t namelen, struct sockaddr_storage *addr, socklen_t addrlen, uint8_t bogus, uint8_t lame)
Add target address to the delegation point.
Definition: iter_delegpt.c:649
sldns_str2wire_atma_buf
int sldns_str2wire_atma_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_ATMA from string to wireformat.
Definition: str2wire.c:1819
ub_random_max
long int ub_random_max(struct ub_randstate *state, long int x)
Generate random number between 0 and x-1.
fwd_add_stub_hole
static int fwd_add_stub_hole(struct iter_forwards *fwd, uint16_t c, uint8_t *nm)
insert a stub hole (if necessary) for stub name
Definition: iter_fwd.c:289
tap_data::ssl_handshake_done
int ssl_handshake_done
is the ssl handshake done
Definition: unbound-dnstap-socket.c:113
sldns_buffer_set_at
INLINE void sldns_buffer_set_at(sldns_buffer *buffer, size_t at, int c, size_t count)
set the given byte to the buffer at the specified position
Definition: sbuffer.h:449
random.h
ctx_query::node
struct rbnode_type node
node in rbtree, must be first entry, key is ptr to the querynum
Definition: context.h:150
ecs_whitelist
ecs_whitelist structure
Definition: subnet-whitelist.h:53
tcl_list_delete
void tcl_list_delete(struct tcl_list *tcl)
Delete TCP connection limit structure.
Definition: tcp_conn_limit.c:76
config_file::caps_whitelist
struct config_strlist * caps_whitelist
0x20 whitelist, domains that do not use capsforid
Definition: config_file.h:264
reply_packet::reply_from_hex
struct sldns_buffer * reply_from_hex
or reply pkt in hex if not parsable
Definition: testpkts.h:159
tcp_req_info::cp
struct comm_point * cp
the TCP comm point for this.
Definition: listen_dnsport.h:248
daemon_open_shared_ports
int daemon_open_shared_ports(struct daemon *daemon)
Open shared listening ports (if needed).
Definition: daemon.c:297
acl_addr::tag_actions_size
size_t tag_actions_size
size of the tag_actions_array
Definition: acl_list.h:100
rrinternal_get_ttl
static int rrinternal_get_ttl(sldns_buffer *strbuf, char *token, size_t token_len, int *not_there, uint32_t *ttl, uint32_t default_ttl)
read ttl
Definition: str2wire.c:247
edns_opt_list_find
struct edns_option * edns_opt_list_find(struct edns_option *list, uint16_t code)
Find edns option in edns list.
Definition: msgreply.c:1251
ub_result::answer_len
int answer_len
length of the answer packet in octets.
Definition: unbound.h:160
sldns_buffer_read_u8
INLINE uint8_t sldns_buffer_read_u8(sldns_buffer *buffer)
returns the byte value at the current position in the buffer
Definition: sbuffer.h:638
query_info_entrysetup
struct msgreply_entry * query_info_entrysetup(struct query_info *q, struct reply_info *r, hashvalue_type h)
Setup query info entry.
Definition: msgreply.c:639
report_status
static void report_status(DWORD state, DWORD exitcode, DWORD wait)
Report current service status to service control manager.
Definition: win_svc.c:84
sock_list::len
socklen_t len
length of addr
Definition: module.h:578
find_att
static const XML_Char * find_att(const XML_Char **atts, const XML_Char *name)
XML fetch value of particular attribute(by name) or NULL if not present.
Definition: unbound-anchor.c:1285
dtio_reconnect_timeout_cb
void dtio_reconnect_timeout_cb(int ATTR_UNUSED(fd), short ATTR_UNUSED(bits), void *arg)
callback for the dnstap reconnect, to start reconnecting to output
Definition: dtstream.c:477
cachedb_get_mem
size_t cachedb_get_mem(struct module_env *env, int id)
return memory estimate for cachedb module
sldns_rr_classes
sldns_lookup_table * sldns_rr_classes
lookuptable for rr classes
Definition: rrdef.c:28
config_auth::rpz_log
int rpz_log
Log when this RPZ policy is applied.
Definition: config_file.h:683
val_nsec_prove_nodata_dsreply
enum sec_status val_nsec_prove_nodata_dsreply(struct module_env *env, struct val_env *ve, struct query_info *qinfo, struct reply_info *rep, struct key_entry_key *kkey, time_t *proof_ttl, char **reason, struct module_qstate *qstate)
Check DS absence.
Definition: val_nsec.c:198
ringbuf
The ring buffer.
Definition: delayer.c:62
config_file::control_key_file
char * control_key_file
private key file for unbound-control
Definition: config_file.h:446
dtio_add_output_event_write
static int dtio_add_output_event_write(struct dt_io_thread *dtio)
add output event for read and write
Definition: dtstream.c:1164
iter_deinit
void iter_deinit(struct module_env *env, int id)
iterator deinit
Definition: iterator.c:112
log_init
void void log_init(const char *filename, int use_syslog, const char *chrootdir)
call this to initialize logging services.
Definition: log.c:86
ub_server_stats::shared_secret_cache_count
long long shared_secret_cache_count
number of dnscrypt shared secret cache entries
Definition: unbound.h:768
query_dname_compare
int query_dname_compare(uint8_t *d1, uint8_t *d2)
Compare query dnames (uncompressed storage).
sldns_buffer_read_at
INLINE void sldns_buffer_read_at(sldns_buffer *buffer, size_t at, void *data, size_t count)
copies count bytes of data at the given position to the given data-array
Definition: sbuffer.h:600
optind
int optind
getopt global, in case header files fail to declare it.
comm_base_create_event
struct comm_base * comm_base_create_event(struct ub_event_base *base)
Create comm base that uses the given ub_event_base (underlying pluggable event mechanism pointer).
Definition: netevent.c:186
tcp_req_info_clear
void tcp_req_info_clear(struct tcp_req_info *req)
Clear tcp request structure.
Definition: listen_dnsport.c:1621
sldns_wire2str_edns_nsid_print
int sldns_wire2str_edns_nsid_print(char **s, size_t *sl, uint8_t *data, size_t len)
Print EDNS NSID option data to string.
Definition: wire2str.c:1797
anchor_read_bind_file
static int anchor_read_bind_file(struct val_anchors *anchors, sldns_buffer *buffer, const char *fname)
Read a BIND9 like file with trust anchors in named.conf format.
Definition: val_anchor.c:734
LDNS_RDF_TYPE_NSEC
@ LDNS_RDF_TYPE_NSEC
nsec type codes
Definition: rrdef.h:290
tap_data::frame
uint8_t * frame
data of the frame
Definition: unbound-dnstap-socket.c:127
nsecbitmap_has_type_rdata
int nsecbitmap_has_type_rdata(uint8_t *bitmap, size_t len, uint16_t type)
nsec typemap check, takes an NSEC-type bitmap as argument, checks for type.
Definition: val_nsec.c:61
xfr_start_transfer
static void xfr_start_transfer(struct auth_xfer *xfr, struct module_env *env, struct auth_master *master)
start transfer task by this worker , xfr is locked.
Definition: authzone.c:5974
rrset_canonical
static int rrset_canonical(struct regional *region, sldns_buffer *buf, struct ub_packed_rrset_key *k, uint8_t *sig, size_t siglen, struct rbtree_type **sortree, sldns_pkt_section section, struct module_qstate *qstate)
Create canonical form of rrset in the scratch buffer.
Definition: val_sigcrypt.c:1133
val_env::skew_max
int32_t skew_max
clock skew max for signatures
Definition: validator.h:96
addr_is_ip4mapped
int addr_is_ip4mapped(struct sockaddr_storage *addr, socklen_t addrlen)
See if sockaddr is an ipv6 mapped ipv4 address, "::ffff:0.0.0.0".
Definition: net_help.c:746
module_wait_reply
@ module_wait_reply
waiting for reply to outgoing network query
Definition: module.h:537
sum_subtree_inuse
static int sum_subtree_inuse(struct val_neg_zone *zone, struct val_neg_data *data)
sum up number of items inuse in subtree
Definition: unitneg.c:365
dname_remove_labels
void dname_remove_labels(uint8_t **dname, size_t *len, int n)
Snip off first N labels from a dname, returning the parent zone.
Definition: dname.c:742
module_env::attach_sub
int(* attach_sub)(struct module_qstate *qstate, struct query_info *qinfo, uint16_t qflags, int prime, int valrec, struct module_qstate **newq)
Attach subquery.
Definition: module.h:403
ub_server_stats::num_query_dnscrypt_secret_missed_cache
long long num_query_dnscrypt_secret_missed_cache
number of queries which did not have a shared secret in cache
Definition: unbound.h:766
ub_server_stats::key_cache_count
long long key_cache_count
number of key cache entries
Definition: unbound.h:755
config_str3list::str
char * str
first string
Definition: config_file.h:747
MAX_LINE_LEN
#define MAX_LINE_LEN
max length of lines in file
Definition: replay.c:56
tube.h
num_wait
static int num_wait
global variable to see how many queries we have left
Definition: asynclook.c:94
sldns_enum_algorithm
sldns_enum_algorithm
Algorithms used in dns.
Definition: rrdef.h:364
local_zone_inform
@ local_zone_inform
log client address, but no block (transparent)
Definition: localzone.h:84
config_file::dnstap_tls
int dnstap_tls
dnstap TLS enable
Definition: config_file.h:491
respip_inform_print
void respip_inform_print(struct respip_action_info *respip_actinfo, uint8_t *qname, uint16_t qtype, uint16_t qclass, struct local_rrset *local_alias, struct comm_reply *repinfo)
print log information for a query subject to an inform or inform-deny response-ip action.
Definition: respip.c:1305
sldns_wire2str_loc_scan
int sldns_wire2str_loc_scan(uint8_t **data, size_t *data_len, char **str, size_t *str_len)
Scan wireformat LOC field to string, with user buffers.
Definition: wire2str.c:1384
mesh_state_delete
void mesh_state_delete(struct module_qstate *qstate)
Delete mesh state, cleanup and also rbtrees and so on.
Definition: mesh.c:907
sldns_str_print
int sldns_str_print(char **str, size_t *slen, const char *format,...) ATTR_FORMAT(printf
Print to string, move string along for next content.
tube_delete
void tube_delete(struct tube *tube)
Delete and destroy a pipe.
Definition: tube.c:88
lock_ref::line
int line
line number
Definition: lock_verify.c:98
respip_transparent
@ respip_transparent
gives response data (if any), else nodata answer.
Definition: localzone.h:568
local_zone_inform_redirect
@ local_zone_inform_redirect
log client address, and direct
Definition: localzone.h:88
auth_xfer_new
static struct auth_xfer * auth_xfer_new(struct auth_zone *z)
malloc the xfer and tasks
Definition: authzone.c:6700
dname_lab_startswith
int dname_lab_startswith(uint8_t *label, char *prefix, char **endptr)
Check if labels starts with given prefix.
Definition: dname.c:569
iter_scrub_ds
void iter_scrub_ds(struct dns_msg *msg, struct ub_packed_rrset_key *ns, uint8_t *z)
Remove DS records that are inappropriate before they are cached.
Definition: iter_utils.c:1243
forwards_get_mem
size_t forwards_get_mem(struct iter_forwards *fwd)
Get memory in use by forward storage.
Definition: iter_fwd.c:447
slabhash_delete
void slabhash_delete(struct slabhash *table)
Delete hash table.
Definition: slabhash.c:87
lru_cleanup
static void lru_cleanup(struct addrtree *tree)
If a limit is set remove old nodes while above that limit.
Definition: addrtree.c:242
daemon::ports
struct listen_port ** ports
array of listening ports, opened.
Definition: daemon.h:87
w_inst.h
dt_io_thread::event_added_is_write
int event_added_is_write
event added is a write event
Definition: dtstream.h:143
pushintosuper
static void pushintosuper(struct alloc_cache *alloc, alloc_special_type *mem)
push mem and some more items to the super
Definition: alloc.c:254
val_state_to_string
const char * val_state_to_string(enum val_state state)
Get validator state as a string.
Definition: validator.c:3280
sldns_wire2str_dname
char * sldns_wire2str_dname(uint8_t *dname, size_t dname_len)
Conver wire dname to a string.
Definition: wire2str.c:231
mesh_state
A mesh query state Unique per qname, qtype, qclass (from the qstate).
Definition: mesh.h:167
outgoing_ssl_fd
void * outgoing_ssl_fd(void *sslctx, int fd)
connect a new fd and wrap it in a BIO in SSL
Definition: net_help.c:1227
worker::env
struct module_env env
module environment passed to modules, changed for this thread
Definition: worker.h:124
hints_create
struct iter_hints * hints_create(void)
Create hints.
Definition: iter_hints.c:54
config_file.h
packed_rrset::d
struct packed_rrset_data * d
ttl, count and rdatas (and rrsig)
Definition: packed_rrset.h:270
val_neg_getmsg
struct dns_msg * val_neg_getmsg(struct val_neg_cache *neg, struct query_info *qinfo, struct regional *region, struct rrset_cache *rrset_cache, struct sldns_buffer *buf, time_t now, int addsoa, uint8_t *topname, struct config_file *cfg)
For the given query, try to get a reply out of the negative cache.
Definition: val_neg.c:1479
daemon_apply_cfg
void daemon_apply_cfg(struct daemon *daemon, struct config_file *cfg)
Apply config settings.
Definition: daemon.c:816
find_add_ds
static void find_add_ds(struct module_env *env, struct regional *region, struct dns_msg *msg, struct delegpt *dp, time_t now)
find and add DS or NSEC to delegation msg
Definition: dns.c:375
dname_test_count_size_labels
static void dname_test_count_size_labels(void)
test dname_count_size_labels
Definition: unitdname.c:145
rpz_action_to_respip_action
enum respip_action rpz_action_to_respip_action(enum rpz_action a)
Classify respip action for RPZ action.
Definition: rpz.c:223
proxy_list_clear
static void proxy_list_clear(struct proxy *p)
clear proxy list
Definition: delayer.c:881
ext_test
static int ext_test(struct ub_ctx *ctx, int argc, char **argv)
perform extended threaded test
Definition: asynclook.c:359
config_file::tls_session_ticket_keys
struct config_strlist_head tls_session_ticket_keys
secret key used to encrypt and decrypt TLS session ticket
Definition: config_file.h:126
setup_domain_limits
static int setup_domain_limits(struct infra_cache *infra, struct config_file *cfg)
setup domain limits tree (0 on failure)
Definition: infra.c:222
rbtree_find_less_equal
int rbtree_find_less_equal(rbtree_type *rbtree, const void *key, rbnode_type **result)
Find, but match does not have to be exact.
Definition: rbtree.c:511
acl_addr_lookup
struct acl_addr * acl_addr_lookup(struct acl_list *acl, struct sockaddr_storage *addr, socklen_t addrlen)
Lookup address to see its acl structure.
Definition: acl_list.c:477
rrset_update_sec_status
void rrset_update_sec_status(struct rrset_cache *r, struct ub_packed_rrset_key *rrset, time_t now)
Update security status of an rrset.
Definition: rrset.c:366
auth_xfer_set_expired
static void auth_xfer_set_expired(struct auth_xfer *xfr, struct module_env *env, int expired)
set a zone expired
Definition: authzone.c:3612
init_zsk_to_ksk
static int init_zsk_to_ksk(struct module_env *env, struct trust_anchor *tp, int *changed)
if ZSK init then trust KSKs
Definition: autotrust.c:1849
tcl_list_create
struct tcl_list * tcl_list_create(void)
Create TCP connection limit structure.
Definition: tcp_conn_limit.c:51
find_in_subsub
static int find_in_subsub(struct mesh_state *m, struct mesh_state *tofind, size_t *c)
helper recursive rbtree find routine
Definition: mesh.c:946
nsec3_cached_hash::nsec3
struct ub_packed_rrset_key * nsec3
where are the parameters for conversion, in this rrset data
Definition: val_nsec3.h:232
config_delstubs
void config_delstubs(struct config_stub *p)
Delete items in config stub list.
Definition: config_file.c:1360
auth_xfer::lease_time
time_t lease_time
zone lease start time (start+expiry is expiration time).
Definition: authzone.h:271
alloc_setup_special
static void alloc_setup_special(alloc_special_type *t)
setup new special type
Definition: alloc.c:55
module_qstate::is_drop
int is_drop
whether the reply should be dropped
Definition: module.h:665
get_cname_target
void get_cname_target(struct ub_packed_rrset_key *rrset, uint8_t **dname, size_t *dname_len)
Utility procedure to extract CNAME target name from its rdata.
Definition: packed_rrset.c:196
replay_moment::autotrust_id
char * autotrust_id
the autotrust file id to check
Definition: replay.h:238
sldns_str2wire_type_buf
int sldns_str2wire_type_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_TYPE from string to wireformat.
Definition: str2wire.c:1340
context_deserialize_new_query
struct ctx_query * context_deserialize_new_query(struct ub_ctx *ctx, uint8_t *p, uint32_t len)
Deserialize a new_query buffer.
Definition: context.c:245
iter_dp_is_useless
int iter_dp_is_useless(struct query_info *qinfo, uint16_t qflags, struct delegpt *dp)
See if delegation is useful or offers immediately no targets for further recursion.
Definition: iter_utils.c:741
getbit
static int getbit(const addrkey_t *addr, addrlen_t addrlen, addrlen_t n)
Get N'th bit from address.
Definition: addrtree.c:302
config_file::deny_any
int deny_any
deny queries of type ANY with an empty answer
Definition: config_file.h:282
UNKNOWN_SERVER_NICENESS
int UNKNOWN_SERVER_NICENESS
how nice is a server without further information, in msec Equals rtt initial timeout value.
Definition: iterator.c:73
tcp_req_info::num_open_req
int num_open_req
number of outstanding requests
Definition: listen_dnsport.h:266
rrset_cache
The rrset cache Thin wrapper around hashtable, like a typedef.
Definition: rrset.h:56
sldns_file_parse_state
wire parse state for parsing files
Definition: str2wire.h:218
val_neg_dlvlookup
int val_neg_dlvlookup(struct val_neg_cache *neg, uint8_t *qname, size_t len, uint16_t qclass, struct rrset_cache *rrset_cache, time_t now)
Perform a DLV style lookup During the lookup, we could find out that data has expired.
Definition: val_neg.c:968
pkt_dname_len
size_t pkt_dname_len(struct sldns_buffer *pkt)
Determine correct, compressed, dname present in packet.
Definition: dname.c:183
dns_msg_authadd
int dns_msg_authadd(struct dns_msg *msg, struct regional *region, struct ub_packed_rrset_key *rrset, time_t now)
Add rrset to authority section in unpacked dns_msg message.
Definition: dns.c:440
iter_qstate::dsns_point_len
size_t dsns_point_len
length of the dname in dsns_point
Definition: iterator.h:347
LDNS_RR_TYPE_A
@ LDNS_RR_TYPE_A
a host address
Definition: rrdef.h:85
ecs_edns_back_parsed
int ecs_edns_back_parsed(struct module_qstate *qstate, int id, void *cbargs)
Check whether response from server contains ECS record, if so, skip cache store.
fill_canon
static int fill_canon(struct ub_result *res, uint8_t *s)
insert canonname
Definition: libworker.c:430
wsvc_command_option
void wsvc_command_option(const char *wopt, const char *cfgfile, int v, int c)
Handle commandline service for windows.
Definition: win_svc.c:498
key_entry_copy
struct key_entry_key * key_entry_copy(struct key_entry_key *kkey)
Copy a key entry, malloced.
Definition: val_kentry.c:155
example_com_queries
static struct q_ans example_com_queries[]
queries for example.com: zone, query, flags, answer.
Definition: unitauth.c:146
config_lookup_uid
void config_lookup_uid(struct config_file *cfg)
Find username, sets cfg_uid and cfg_gid.
Definition: config_file.c:2048
handle_query
void handle_query(uint8_t *inbuf, ssize_t inlen, struct entry *entries, int *count, enum transport_type transport, void(*sendfunc)(uint8_t *, size_t, void *), void *userdata, FILE *verbose_out)
Parses data buffer to a query, finds the correct answer and calls the given function for every packet...
Definition: testpkts.c:1629
timehist_quartile
double timehist_quartile(struct timehist *hist, double q)
Find time value for given quartile, such as 0.25, 0.50, 0.75.
Definition: timehist.c:198
config_file::private_domain
struct config_strlist * private_domain
allow domain (and subdomains) to use private address space
Definition: config_file.h:268
mesh_state::prev
struct mesh_state * prev
previous in linked list for reply states
Definition: mesh.h:189
xfr_find_soa
static int xfr_find_soa(struct auth_zone *z, struct auth_xfer *xfr)
Find auth_zone SOA and populate the values in xfr(soa values).
Definition: authzone.c:1783
ctx_query::cb
ub_callback_type cb
for async query, the callback function of type ub_callback_type
Definition: context.h:159
setup_tcp_handler
static void setup_tcp_handler(struct comm_point *c, int fd, int cur, int max)
Use a new tcp handler for new query fd, set to read query.
Definition: netevent.c:739
iter_qstate::store_parent_NS
struct delegpt * store_parent_NS
The query must store NS records from referrals as parentside RRs Enabled once it hits resolution prob...
Definition: iterator.h:330
auth_xfer::lock
lock_basic_type lock
lock on this structure, and on the workernum elements of the tasks.
Definition: authzone.h:204
init_events
static void init_events(struct trust_anchor *tp)
init events to zero
Definition: autotrust.c:1513
rate_key::name
uint8_t * name
domain name in uncompressed wireformat
Definition: infra.h:147
mesh_state_remove_reply
void mesh_state_remove_reply(struct mesh_area *mesh, struct mesh_state *m, struct comm_point *cp)
Remove mesh reply entry from the reply entry list.
Definition: mesh.c:1817
rtt_timeout
int rtt_timeout(const struct rtt_info *rtt)
Get timeout to use for sending a UDP packet.
Definition: rtt.c:72
MSG_GENERIC_SUCCESS
#define MSG_GENERIC_SUCCESS
from gen_msg.h - success message record for windows message log
Definition: win_svc.h:55
LDNS_RDF_TYPE_TSIGERROR
@ LDNS_RDF_TYPE_TSIGERROR
TSIG extended 16bit error value.
Definition: rrdef.h:353
tap_socket_list_delete
static void tap_socket_list_delete(struct tap_socket_list *list)
delete the list
Definition: unbound-dnstap-socket.c:384
sldns_buffer_new
sldns_buffer * sldns_buffer_new(size_t capacity)
creates a new buffer with the specified capacity.
Definition: sbuffer.c:19
tube_create
struct tube * tube_create(void)
Create a pipe.
Definition: tube.c:57
mesh_list_insert
void mesh_list_insert(struct mesh_state *m, struct mesh_state **fp, struct mesh_state **lp)
Insert mesh state into a double linked list.
Definition: mesh.c:1794
mesh_area::ans_expired
size_t ans_expired
stats, number of expired replies sent
Definition: mesh.h:116
outside_network::do_udp
int do_udp
if udp is done
Definition: outside_network.h:104
delegpt_from_message
struct delegpt * delegpt_from_message(struct dns_msg *msg, struct regional *regional)
Create new delegation point from a dns message.
Definition: iter_delegpt.c:349
context_query_delete
void context_query_delete(struct ctx_query *q)
delete context query
Definition: context.c:113
unit_show_func
void unit_show_func(const char *file, const char *func)
we are now testing this function
Definition: unitmain.c:842
dt_msg_queue_pop
static int dt_msg_queue_pop(struct dt_msg_queue *mq, void **buf, size_t *len)
pick a message from the queue, the routine locks and unlocks, returns true if there is a message
Definition: dtstream.c:410
acl_allow_snoop
@ acl_allow_snoop
allow full access for all queries, recursion and cache snooping
Definition: acl_list.h:66
donotq_get_mem
size_t donotq_get_mem(struct iter_donotq *donotq)
Get memory used by donotqueryaddresses structure.
Definition: iter_donotq.c:149
iter_server_selection
struct delegpt_addr * iter_server_selection(struct iter_env *iter_env, struct module_env *env, struct delegpt *dp, uint8_t *name, size_t namelen, uint16_t qtype, int *dnssec_lame, int *chase_to_rd, int open_target, struct sock_list *blacklist, time_t prefetch)
Select a valid, nice target to send query to.
Definition: iter_utils.c:549
ds_digest_match_dnskey
int ds_digest_match_dnskey(struct module_env *env, struct ub_packed_rrset_key *dnskey_rrset, size_t dnskey_idx, struct ub_packed_rrset_key *ds_rrset, size_t ds_idx)
Check if dnskey matches a DS digest Does not check dnskey-keyid footprint, just the digest.
Definition: val_sigcrypt.c:314
comm_base_set_slow_accept_handlers
void comm_base_set_slow_accept_handlers(struct comm_base *b, void(*stop_accept)(void *), void(*start_accept)(void *), void *arg)
Set the slow_accept mode handlers.
Definition: netevent.c:260
macro_lookup
char * macro_lookup(rbtree_type *store, char *name)
Look up a macro value.
Definition: replay.c:893
setup_if
static int setup_if(struct port_if *pif, const char *addrstr, int *avail, int numavail, size_t numfd)
setup an outgoing interface, ready address
Definition: outside_network.c:711
ub_ctx::rrpipe_lock
lock_basic_type rrpipe_lock
mutex on result read pipe
Definition: context.h:72
UB_EV_SIGNAL
#define UB_EV_SIGNAL
event signal
Definition: unbound-event.h:73
analyze
static void analyze(sldns_buffer *pkt)
analyse pkt
Definition: pktview.c:154
val_qstate::trust_anchor_name
uint8_t * trust_anchor_name
trust anchor name
Definition: validator.h:193
dname_str
void dname_str(uint8_t *dname, char *str)
Debug helper.
Definition: dname.c:639
LOG_TAG_QUERYREPLY
int LOG_TAG_QUERYREPLY
log tag queries with name instead of 'info' for filtering
Definition: net_help.c:77
SERVE_EXPIRED_REPLY_TTL
time_t SERVE_EXPIRED_REPLY_TTL
TTL to use for expired records.
Definition: msgreply.c:69
compare_1982
static int compare_1982(uint32_t a, uint32_t b)
RFC 1982 comparison, uses unsigned integers, and tries to avoid compiler optimization (eg.
Definition: val_sigcrypt.c:1232
local_zones_zone_answer
int local_zones_zone_answer(struct local_zone *z, struct module_env *env, struct query_info *qinfo, struct edns_data *edns, struct comm_reply *repinfo, sldns_buffer *buf, struct regional *temp, struct local_data *ld, enum localzone_type lz_type)
Answer using the local zone only (not local data used).
Definition: localzone.c:1518
cfg_strlist_append
int cfg_strlist_append(struct config_strlist_head *list, char *item)
Append text at end of list.
Definition: config_file.c:1650
LDNS_RR_TYPE_NAPTR
@ LDNS_RR_TYPE_NAPTR
RFC2915.
Definition: rrdef.h:153
sldns_buffer_read_u16
INLINE uint16_t sldns_buffer_read_u16(sldns_buffer *buffer)
returns the 2-byte integer value at the current position in the buffer
Definition: sbuffer.h:664
ipset_qstate
Definition: ipset.h:49
alloc_cache::last_id
uint64_t last_id
last id number possible
Definition: alloc.h:86
priv_get_mem
size_t priv_get_mem(struct iter_priv *priv)
Get memory used by priv structure.
Definition: iter_priv.c:204
worker_sighandler
void worker_sighandler(int sig, void *arg)
Worker signal handler function.
Definition: worker.c:1625
UB_LIBCMD_QUIT
@ UB_LIBCMD_QUIT
QUIT.
Definition: context.h:218
alloc_get_id
uint64_t alloc_get_id(struct alloc_cache *alloc)
Set ID number of special type to a fresh new ID number.
Definition: alloc.c:195
LDNS_RR_TYPE_MINFO
@ LDNS_RR_TYPE_MINFO
mailbox or mail list information
Definition: rrdef.h:111
reply_info_alloc_rrset_keys
int reply_info_alloc_rrset_keys(struct reply_info *rep, struct alloc_cache *alloc, struct regional *region)
Allocate (special) rrset keys.
Definition: msgreply.c:144
RTT_MAX_TIMEOUT
#define RTT_MAX_TIMEOUT
max retransmit timeout value, in milliseconds
Definition: rtt.h:61
stats.h
count_modules
static int count_modules(const char *s)
count number of modules (words) in the string
Definition: modstack.c:72
ip_rate_key::addr
struct sockaddr_storage addr
client ip information
Definition: infra.h:162
BIT_TC
#define BIT_TC
TC flag.
Definition: net_help.h:67
val_neg_addreferral
void val_neg_addreferral(struct val_neg_cache *neg, struct reply_info *rep, uint8_t *zone_name)
Insert NSECs from this referral into the negative cache for reference.
Definition: val_neg.c:1070
tube_remove_bg_listen
void tube_remove_bg_listen(struct tube *tube)
Remove bg listen setup from event base.
Definition: tube.c:116
sldns_str2wire_apl_buf
int sldns_str2wire_apl_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_APL from string to wireformat.
Definition: str2wire.c:1118
val_neg_zone::count
int count
the number of elements, including this one and the ones whose parents (-parents) include this one,...
Definition: val_neg.h:110
strlen_after_chroot
static size_t strlen_after_chroot(const char *fname, struct config_file *cfg, int use_chdir)
Calculate string length of full pathname in original filesys.
Definition: config_file.c:2074
cachedb_clear
void cachedb_clear(struct module_qstate *qstate, int id)
clear the cachedb query-specific contents out of qstate
sldns_get_errorstr_parse
const char * sldns_get_errorstr_parse(int e)
Get reference to a constant string for the (parse) error.
Definition: str2wire.c:840
fake_pending::serviced
int serviced
if this is a serviced query
Definition: replay.h:356
subnetmod_deinit
void subnetmod_deinit(struct module_env *env, int id)
subnet module deinit
anchors_create
struct val_anchors * anchors_create(void)
Create trust anchor storage.
Definition: val_anchor.c:76
ub_server_stats::qbit_QR
long long qbit_QR
number of queries with QR bit
Definition: unbound.h:703
udp_sockport
static int udp_sockport(struct sockaddr_storage *addr, socklen_t addrlen, int pfxlen, int port, int *inuse, struct ub_randstate *rnd, int dscp)
Try to open a UDP socket for outgoing communication.
Definition: outside_network.c:1060
authextstrtoaddr
int authextstrtoaddr(char *str, struct sockaddr_storage *addr, socklen_t *addrlen, char **auth_name)
Convert address string, with "@port" appendix, to sockaddr.
Definition: net_help.c:423
parse_arg_name
static int parse_arg_name(RES *ssl, char *str, uint8_t **res, size_t *len, int *labs)
parse commandline argument domain name
Definition: remote.c:1129
sldns_str2wire_str_buf
int sldns_str2wire_str_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_STR from string to wireformat.
Definition: str2wire.c:1093
dname_is_wild
int dname_is_wild(uint8_t *dname)
Return true if the label is a wildcard, *.example.com.
Definition: dname.c:769
auth_master::next
struct auth_master * next
next master in list
Definition: authzone.h:434
daemon_remote_open_accept
int daemon_remote_open_accept(struct daemon_remote *rc, struct listen_port *ports, struct worker *worker)
Setup comm points for accepting remote control connections.
Definition: remote.c:414
hints_lookup_stub
struct iter_hints_stub * hints_lookup_stub(struct iter_hints *hints, uint8_t *qname, uint16_t qclass, struct delegpt *cache_dp)
Given a qname/qclass combination, and the delegation point from the cache for this qname/qclass,...
Definition: iter_hints.c:472
tcp_proxy::client_s
int client_s
the fd to listen for client query
Definition: delayer.c:118
config_file::domain_insecure
struct config_strlist * domain_insecure
insecure domain list
Definition: config_file.h:339
iter_donotq
Iterator donotqueryaddresses structure.
Definition: iter_donotq.h:53
tcp_req_info::open_req_list
struct tcp_req_open_item * open_req_list
list of outstanding requests
Definition: listen_dnsport.h:268
bin_find_entry
struct lruhash_entry * bin_find_entry(struct lruhash *table, struct lruhash_bin *bin, hashvalue_type hash, void *key)
Find entry in hash bin.
Definition: lruhash.c:218
sldns_str2wire_eui64_buf
int sldns_str2wire_eui64_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_EUI64 from string to wireformat.
Definition: str2wire.c:1992
cachedb_inform_super
void cachedb_inform_super(struct module_qstate *qstate, int id, struct module_qstate *super)
Subordinate query done, inform this super request of its conclusion.
comm_point::timeout
struct timeval * timeout
timeout (NULL if it does not).
Definition: netevent.h:163
val_neg_getmsg
struct dns_msg * val_neg_getmsg(struct val_neg_cache *neg, struct query_info *qinfo, struct regional *region, struct rrset_cache *rrset_cache, sldns_buffer *buf, time_t now, int addsoa, uint8_t *topname, struct config_file *cfg)
For the given query, try to get a reply out of the negative cache.
Definition: val_neg.c:1479
EDNS_ADVERTISED_SIZE
uint16_t EDNS_ADVERTISED_SIZE
default value for EDNS ADVERTISED size
Definition: net_help.c:68
config_file::ifs
char ** ifs
interface description strings (IP addresses)
Definition: config_file.h:199
ub_resolve
int ub_resolve(struct ub_ctx *ctx, const char *name, int rrtype, int rrclass, struct ub_result **result)
Perform resolution and validation of the target name.
Definition: libunbound.c:680
xfr_create_ixfr_packet
static void xfr_create_ixfr_packet(struct auth_xfer *xfr, sldns_buffer *buf, uint16_t id, struct auth_master *master)
create IXFR/AXFR packet for xfr
Definition: authzone.c:3977
lruhash::markdelfunc
lruhash_markdelfunc_type markdelfunc
how to mark a key pending deletion
Definition: lruhash.h:159
main_tap_data::acceptlist
struct tap_socket_list * acceptlist
the list of accept sockets
Definition: unbound-dnstap-socket.c:101
rbtree_last
rbnode_type * rbtree_last(rbtree_type *rbtree)
Returns last (largest) node in the tree.
Definition: rbtree.c:558
fptr_whitelist_hash_sizefunc
int fptr_whitelist_hash_sizefunc(lruhash_sizefunc_type fptr)
Check function pointer whitelist for lruhash sizefunc callback values.
Definition: fptr_wlist.c:249
tcp_req_info::read_again
int read_again
read again
Definition: listen_dnsport.h:264
rtt_unclamped
int rtt_unclamped(const struct rtt_info *rtt)
Get unclamped timeout to use for server selection.
Definition: rtt.c:78
val_blacklist
void val_blacklist(struct sock_list **blacklist, struct regional *region, struct sock_list *origin, int cross)
Add existing list to blacklist.
Definition: val_utils.c:1088
az_generate_answer_nonexistnode
static int az_generate_answer_nonexistnode(struct auth_zone *z, struct query_info *qinfo, struct regional *region, struct dns_msg *msg, struct auth_data *ce, struct auth_rrset *rrset, struct auth_data *node)
Generate answer without an existing-node that we can use.
Definition: authzone.c:3156
cfgfiles
static struct config_strlist * cfgfiles
config files (removed at exit)
Definition: testbound.c:66
dt_io_thread::ssl_brief_write
int ssl_brief_write
true if SSL_read is waiting for a write event.
Definition: dtstream.h:156
config_delauth
void config_delauth(struct config_auth *p)
Delete an auth item.
Definition: config_file.c:1323
config_file::acl_tag_datas
struct config_str3list * acl_tag_datas
list of aclname, tagname, redirectdata
Definition: config_file.h:419
xml_data::date
time_t date
current date to use during the parse
Definition: unbound-anchor.c:1199
module_qstate::qinfo
struct query_info qinfo
which query is being answered: name, type, class
Definition: module.h:598
donotq_lookup
int donotq_lookup(struct iter_donotq *donotq, struct sockaddr_storage *addr, socklen_t addrlen)
See if an address is blocked.
Definition: iter_donotq.c:142
dtio_add_output_event_read
static int dtio_add_output_event_read(struct dt_io_thread *dtio)
add the output file descriptor event for listening, read only
Definition: dtstream.c:1140
scrub_normalize
static int scrub_normalize(sldns_buffer *pkt, struct msg_parse *msg, struct query_info *qinfo, struct regional *region)
This routine normalizes a response.
Definition: iter_scrub.c:361
reply_packet::reply_len
size_t reply_len
length of reply pkt
Definition: testpkts.h:155
iter_msg_has_dnssec
int iter_msg_has_dnssec(struct dns_msg *msg)
See if a message contains DNSSEC.
Definition: iter_utils.c:843
ta_key::next
struct ta_key * next
next in list
Definition: val_anchor.h:81
anchor_cmp
int anchor_cmp(const void *k1, const void *k2)
compare two trust anchors
Definition: val_anchor.c:60
auth_transfer
The transfer task.
Definition: authzone.h:357
invalidateQueryInCache
void invalidateQueryInCache(struct module_qstate *qstate, struct query_info *qinfo)
Invalidate the message associated with query_info stored in message cache.
Definition: pythonmod_utils.c:75
infra_rate_max
int infra_rate_max(void *data, time_t now)
find the maximum rate stored, not too old.
Definition: infra.c:898
unit_assert
#define unit_assert(x)
test bool x, exits on failure, increases testcount.
Definition: unitmain.h:51
iter_env::num_queries_ratelimited
size_t num_queries_ratelimited
number of queries that have been ratelimited
Definition: iterator.h:141
cfg_condense_ports
int cfg_condense_ports(struct config_file *cfg, int **avail)
Get a condensed list of ports returned.
Definition: config_file.c:1601
cfg_ptr_reverse
char * cfg_ptr_reverse(char *str)
Convert a ptr shorthand into a full reverse-notation PTR record.
Definition: config_file.c:2239
comm_point_create_local
struct comm_point * comm_point_create_local(struct comm_base *base, int fd, size_t bufsize, comm_point_callback_type *callback, void *callback_arg)
Create commpoint to listen to a local domain file descriptor.
Definition: netevent.c:2943
hints_get_mem
size_t hints_get_mem(struct iter_hints *hints)
Get memory in use by hints.
Definition: iter_hints.c:514
val_neg_zone::labs
int labs
labels in name
Definition: val_neg.h:102
read_chunked_zero_terminate
static char * read_chunked_zero_terminate(SSL *ssl, size_t *len)
read chunked data and zero terminate; len is without zero
Definition: unbound-anchor.c:1070
parse_create_repinfo
static int parse_create_repinfo(struct msg_parse *msg, struct reply_info **rep, struct regional *region)
allocate replyinfo, return 0 on error
Definition: msgreply.c:132
dt_frame_read_buf::buf
void * buf
Buffer containing frame, except length counter(s).
Definition: dtstream.h:96
sldns_wire2str_ilnp64_scan
int sldns_wire2str_ilnp64_scan(uint8_t **data, size_t *data_len, char **str, size_t *str_len)
Scan wireformat ILNP64 field to string, with user buffers.
Definition: wire2str.c:1653
config_deldblstrlist
void config_deldblstrlist(struct config_str2list *p)
Delete items in config double string list.
Definition: config_file.c:1296
auth_zone_find
struct auth_zone * auth_zone_find(struct auth_zones *az, uint8_t *nm, size_t nmlen, uint16_t dclass)
find an auth zone by name (exact match by name or NULL returned)
Definition: authzone.c:444
sldns_wire2str_rr_unknown_buf
int sldns_wire2str_rr_unknown_buf(uint8_t *d, size_t dlen, char *s, size_t slen)
3597 printout of an RR in unknown rr format.
Definition: wire2str.c:273
service_status_handle
static SERVICE_STATUS_HANDLE service_status_handle
global service status handle
Definition: win_svc.c:60
infra_rate_find_second
static int * infra_rate_find_second(void *data, time_t t)
find the second and return its rate counter, if none, remove oldest
Definition: infra.c:879
inplace_cb_query_response_call
int inplace_cb_query_response_call(struct module_env *env, struct module_qstate *qstate, struct dns_msg *response)
Call the registered functions in the inplace_cb_query_response linked list.
Definition: msgreply.c:1130
check_fwd
static void check_fwd(struct config_file *cfg)
check forwards
Definition: unbound-checkconf.c:830
comm_point_listen_for_rw
void comm_point_listen_for_rw(struct comm_point *c, int rd, int wr)
Stop listening and start listening again for reading or writing.
Definition: netevent.c:3249
config_del_strbytelist
void config_del_strbytelist(struct config_strbytelist *list)
delete stringbytelist
Definition: config_file.c:1408
mesh_serve_expired_callback
void mesh_serve_expired_callback(void *arg)
Callback for when the serve expired client timer has run out.
Definition: mesh.c:1881
listen_start_accept
void listen_start_accept(struct listen_dnsport *listen)
start accept handlers for TCP (was stopped before)
Definition: listen_dnsport.c:1584
iter_qstate::query_for_pside_glue
int query_for_pside_glue
The query is for parent-side glue(A or AAAA) for a nameserver.
Definition: iterator.h:340
setup_tls_list
static void setup_tls_list(struct main_tap_data *maindata, struct config_strlist_head *tls_list, char *server_key, char *server_cert, char *verifypem)
setup tls accept sockets
Definition: unbound-dnstap-socket.c:1185
error
void static void error(const char *msg,...) ATTR_NORETURN
print error and exit
Definition: testpkts.c:52
sldns_fp2wire_rr_buf
int sldns_fp2wire_rr_buf(FILE *in, uint8_t *rr, size_t *len, size_t *dname_len, struct sldns_file_parse_state *parse_state)
Read one RR from zonefile with buffer for the data.
Definition: str2wire.c:861
ub_rrset_sizefunc
size_t ub_rrset_sizefunc(void *key, void *data)
Calculate memory size of rrset entry.
Definition: packed_rrset.c:70
key_entry_isbad
int key_entry_isbad(struct key_entry_key *kkey)
See if this entry is bad.
Definition: val_kentry.c:234
tcl_close_connection
void tcl_close_connection(struct tcl_addr *tcl)
Decrement TCP connection count if found.
Definition: tcp_conn_limit.c:171
tube_poll
int tube_poll(struct tube *tube)
See if data is ready for reading on the tube without blocking.
Definition: tube.c:411
tube_close_read
void tube_close_read(struct tube *tube)
Close read part of the pipe.
Definition: tube.c:100
log_cert
void log_cert(unsigned level, const char *str, void *cert)
Log certificate details verbosity, string, of X509 cert.
match_noloc_section
static int match_noloc_section(char **q, char **nq, char **p, char **np, uint16_t num)
match two RR sections without ordering
Definition: testpkts.c:940
mesh_state_ref
Rbtree reference to a mesh_state.
Definition: mesh.h:206
rrset_get_sig_algo
static int rrset_get_sig_algo(struct ub_packed_rrset_key *k, size_t sig_idx)
Get signature signing algorithm value.
Definition: val_sigcrypt.c:126
ub_ctx_print_local_zones
int ub_ctx_print_local_zones(struct ub_ctx *ctx)
Debug routine.
Definition: libunbound.c:1274
do_datas_add
static void do_datas_add(RES *ssl, struct local_zones *zones)
Do the local_datas command.
Definition: remote.c:1321
sldns_str2wire_int32_buf
int sldns_str2wire_int32_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_INT32 from string to wireformat.
Definition: str2wire.c:1045
alloc_special_type
struct ub_packed_rrset_key alloc_special_type
The special type, packed rrset.
Definition: alloc.h:56
auth_xfer_find
struct auth_xfer * auth_xfer_find(struct auth_zones *az, uint8_t *nm, size_t nmlen, uint16_t dclass)
find an xfer zone by name (exact match by name or NULL returned)
Definition: authzone.c:457
check_auth_name_for_ssl
int check_auth_name_for_ssl(char *auth_name)
check if authname SSL functionality is available, false if not
Definition: net_help.c:1249
serviced_query::serviced_query_UDP_EDNS
@ serviced_query_UDP_EDNS
UDP with EDNS sent.
Definition: outside_network.h:361
modstack_desetup
void modstack_desetup(struct module_stack *stack, struct module_env *env)
Desetup the modules, deinit, delete.
Definition: modstack.c:248
log_ident_set
void log_ident_set(const char *id)
Set identity to print, default is 'unbound'.
Definition: log.c:180
val_neg_zone_take_inuse
void val_neg_zone_take_inuse(struct val_neg_zone *zone)
take a zone into use.
Definition: val_neg.c:518
autotrust_check
static void autotrust_check(struct replay_runtime *runtime, struct replay_moment *mom)
check autotrust file contents
Definition: fake_event.c:578
libworker_handle_control_cmd
void libworker_handle_control_cmd(struct tube *ATTR_UNUSED(tube), uint8_t *msg, size_t len, int err, void *arg)
handle control command coming into server
Definition: libworker.c:319
sock_list_insert
void sock_list_insert(struct sock_list **list, struct sockaddr_storage *addr, socklen_t len, struct regional *region)
Insert new socket list item.
Definition: net_help.c:782
sldns_str2wire_rr_buf
int sldns_str2wire_rr_buf(const char *str, uint8_t *rr, size_t *len, size_t *dname_len, uint32_t default_ttl, uint8_t *origin, size_t origin_len, uint8_t *prev, size_t prev_len)
Convert text RR to wireformat, with user buffer.
Definition: str2wire.c:782
alloc_special_release
void alloc_special_release(struct alloc_cache *alloc, alloc_special_type *mem)
Return special_type back to pool.
Definition: alloc.c:279
comm_timer::callback
void(* callback)(void *)
callback function, takes user arg only
Definition: netevent.h:326
tcp_req_info_get_stream_buffer_size
size_t tcp_req_info_get_stream_buffer_size(void)
get the size of currently used tcp stream wait buffers (in bytes)
Definition: listen_dnsport.c:1957
sldns_buffer_read_u16_at
INLINE uint16_t sldns_buffer_read_u16_at(sldns_buffer *buffer, size_t at)
returns the 2-byte integer value at the given position in the buffer
Definition: sbuffer.h:652
dns_msg::qinfo
struct query_info qinfo
query info
Definition: dns.h:63
outside_network::tcp_mss
int tcp_mss
maximum segment size of tcp socket
Definition: outside_network.h:142
sum_zone_subtree_inuse
static int sum_zone_subtree_inuse(struct val_neg_cache *neg, struct val_neg_zone *zone)
sum up number of items inuse in subtree
Definition: unitneg.c:380
comm_base_exit
void comm_base_exit(struct comm_base *b)
Exit from dispatch loop.
Definition: fake_event.c:963
msg_parse::hashtable
struct rrset_parse * hashtable[PARSE_TABLE_SIZE]
Hash table array used during parsing to lookup rrset types.
Definition: msgparse.h:130
listen_list
Single linked list to store event points.
Definition: listen_dnsport.h:73
errinf_to_str_servfail
char * errinf_to_str_servfail(struct module_qstate *qstate)
Create error info in string.
Definition: config_file.c:2449
tcp_req_info_pop_done
static struct tcp_req_done_item * tcp_req_info_pop_done(struct tcp_req_info *req)
remove first item from list of pending results
Definition: listen_dnsport.c:1722
addrtree::sizefunc
size_t(* sizefunc)(void *)
External function returning size of elem.
Definition: addrtree.h:84
delegpt_addr::sel_rtt
int sel_rtt
rtt stored here in the selection algorithm
Definition: iter_delegpt.h:147
tap_socket_list::next
struct tap_socket_list * next
next in list
Definition: unbound-dnstap-socket.c:135
msgreply.h
val_init
int val_init(struct module_env *env, int id)
validator init
Definition: validator.c:168
lruhash_setmarkdel
void lruhash_setmarkdel(struct lruhash *table, lruhash_markdelfunc_type md)
Set the markdelfunction (or NULL)
Definition: lruhash.c:516
dtio_del_output_event
static void dtio_del_output_event(struct dt_io_thread *dtio)
del the output file descriptor event for listening
Definition: dtstream.c:578
FSTRM_CONTROL_FIELD_TYPE_CONTENT_TYPE
#define FSTRM_CONTROL_FIELD_TYPE_CONTENT_TYPE
the constant that denotes the control field type that is the string for the content type of the strea...
Definition: dnstap_fstrm.h:111
lruhash_markdelfunc_type
void(* lruhash_markdelfunc_type)(void *)
mark a key as pending to be deleted (and not to be used by anyone).
Definition: lruhash.h:142
tube::listen_arg
void * listen_arg
listen callback user arg
Definition: tube.h:75
msg_cache_lookup
struct msgreply_entry * msg_cache_lookup(struct module_env *env, uint8_t *qname, size_t qnamelen, uint16_t qtype, uint16_t qclass, uint16_t flags, time_t now, int wr)
lookup message in message cache the returned nonNULL entry is locked and has to be unlocked by the ca...
Definition: dns.c:240
addrtree::max_node_count
uint32_t max_node_count
Maximum number of allowed nodes, will be enforced by LRU list.
Definition: addrtree.h:72
change_rrsig_rrset
static struct rrset_parse * change_rrsig_rrset(struct rrset_parse *sigset, struct msg_parse *msg, sldns_buffer *pkt, uint16_t datatype, uint32_t rrset_flags, int hasother, sldns_pkt_section section, struct regional *region)
change an rrsig rrset for use as data rrset
Definition: msgparse.c:390
rtt_init
void rtt_init(struct rtt_info *rtt)
Initialize RTT estimators.
Definition: rtt.c:62
reply_info_answer_encode
int reply_info_answer_encode(struct query_info *qinf, struct reply_info *rep, uint16_t id, uint16_t qflags, sldns_buffer *pkt, time_t timenow, int cached, struct regional *region, uint16_t udpsize, struct edns_data *edns, int dnssec, int secure)
Generate answer from reply_info.
Definition: msgencode.c:838
rrset_cache_create
struct rrset_cache * rrset_cache_create(struct config_file *cfg, struct alloc_cache *alloc)
Create rrset cache.
Definition: rrset.c:59
mesh_state::sub_set
rbtree_type sub_set
set of substates (that this state needs to continue) contains struct mesh_state_ref*
Definition: mesh.h:184
sldns_wire2str_period_scan
int sldns_wire2str_period_scan(uint8_t **data, size_t *data_len, char **str, size_t *str_len)
Scan wireformat period field to string, with user buffers.
Definition: wire2str.c:1057
UB_READFILE
@ UB_READFILE
error reading from file (resolv.conf)
Definition: context.h:203
reply_all_rrsets_secure
int reply_all_rrsets_secure(struct reply_info *rep)
Check security status of all RRs in the message.
Definition: msgreply.c:915
MAX_LINE
#define MAX_LINE
max line length
Definition: testpkts.c:39
dname_setup_bufs
static void dname_setup_bufs(sldns_buffer *loopbuf, sldns_buffer *boundbuf)
setup looped dname and out-of-bounds dname ptr
Definition: unitdname.c:836
name_tree_node::node
rbnode_type node
rbtree node, key is this struct : dclass and name
Definition: dnstree.h:57
sldns_buffer_printf
int sldns_buffer_printf(sldns_buffer *buffer, const char *format,...) ATTR_FORMAT(printf
prints to the buffer, increasing the capacity if required using buffer_reserve().
acl_list::tree
rbtree_type tree
Tree of the addresses that are allowed/blocked.
Definition: acl_list.h:81
set_trustanchor_state
static void set_trustanchor_state(struct module_env *env, struct autr_ta *ta, int *changed, autr_state_type s)
Set the state for this trust anchor.
Definition: autotrust.c:1708
assemble_iterate_count
static size_t assemble_iterate_count(int iter(struct autr_ta **, uint8_t **, size_t *, size_t *), struct autr_ta *list)
number of elements in iterator list
Definition: autotrust.c:605
perfsend
static void perfsend(struct perfinfo *info, size_t n, struct timeval *now)
send new query for io
Definition: perf.c:279
dns_alloc_msg
struct dns_msg * dns_alloc_msg(struct sldns_buffer *pkt, struct msg_parse *msg, struct regional *regional)
Allocate dns_msg from parsed msg, in regional.
Definition: iter_utils.c:622
dtio_write_more_of_data
static int dtio_write_more_of_data(struct dt_io_thread *dtio)
write more of the data frame.
Definition: dtstream.c:848
auth_zone::rpz_az_next
struct auth_zone * rpz_az_next
next auth zone containing RPZ data, or NULL
Definition: authzone.h:143
module_state_initial
@ module_state_initial
initial state - new query
Definition: module.h:535
attach_edns_record
void attach_edns_record(struct sldns_buffer *pkt, struct edns_data *edns)
Attach EDNS record to buffer.
Definition: msgencode.c:802
ub_process
int ub_process(struct ub_ctx *ctx)
Call this routine to continue processing results from the validating resolver (when the fd becomes re...
Definition: libunbound.c:602
sldns_str2wire_dname_buf
int sldns_str2wire_dname_buf(const char *str, uint8_t *buf, size_t *len)
Convert text string into dname wireformat, mallocless, with user buffer.
Definition: str2wire.c:139
sldns_wire2str_pkt_scan
int sldns_wire2str_pkt_scan(uint8_t **data, size_t *data_len, char **str, size_t *str_len)
Scan wireformat packet to a string representation with user buffer It appends every RR with default c...
Definition: wire2str.c:367
forwards_insert
static int forwards_insert(struct iter_forwards *fwd, uint16_t c, struct delegpt *dp)
insert new info into forward structure given dp
Definition: iter_fwd.c:142
addr_tree_node::addrlen
socklen_t addrlen
length of addr
Definition: dnstree.h:85
config_print_func
void config_print_func(char *line, void *arg)
function to print to a file, use as func with config_get_option.
Definition: config_file.c:748
tcl_list_delete
void tcl_list_delete(struct tcl_list *tcl)
Delete TCP connection limit structure.
Definition: tcp_conn_limit.c:76
read_malloc_stat
static void read_malloc_stat(char *line, rbtree_type *tree)
read up the malloc stats
Definition: memstats.c:128
respip_sockaddr_find_or_create
struct resp_addr * respip_sockaddr_find_or_create(struct respip_set *set, struct sockaddr_storage *addr, socklen_t addrlen, int net, int create, const char *ipstr)
Find resp_addr in tree, create and add to tree if it does not exist.
Definition: respip.c:103
dt_frame_read_buf::buf_count
size_t buf_count
Number of bytes written to buffer.
Definition: dtstream.h:98
config_file::use_caps_bits_for_id
int use_caps_bits_for_id
use 0x20 bits in query as random ID bits
Definition: config_file.h:262
comm_point_drop_reply
void comm_point_drop_reply(struct comm_reply *repinfo)
Drop reply.
Definition: fake_event.c:1020
msg_parse::nscount
uint16_t nscount
count of RRs, host format
Definition: msgparse.h:105
do_root_update_work
static int do_root_update_work(const char *root_anchor_file, const char *root_cert_file, const char *urlname, const char *xmlname, const char *p7sname, const char *p7signer, const char *res_conf, const char *root_hints, const char *debugconf, const char *srcaddr, int ip4only, int ip6only, int force, int res_conf_fallback, int port, int use_sni)
perform the unbound-anchor work
Definition: unbound-anchor.c:2237
ub_ctx_set_fwd
int ub_ctx_set_fwd(struct ub_ctx *ctx, const char *addr)
Set machine to forward DNS queries to, the caching resolver to use.
Definition: libunbound.c:907
setup_fd
static int setup_fd(char *addr, int port)
setup listening TCP
Definition: petal.c:270
config_file::do_tcp_keepalive
int do_tcp_keepalive
do edns tcp keepalive
Definition: config_file.h:107
tube_wait
int tube_wait(struct tube *tube)
Wait for data to be ready for reading on the tube.
Definition: tube.c:418
dump_infra_host
static void dump_infra_host(struct lruhash_entry *e, void *arg)
callback for every host element in the infra cache
Definition: remote.c:2445
regional::available
size_t available
number of bytes available in the current chunk.
Definition: regional.h:74
iter_qname_indicates_dnssec
int iter_qname_indicates_dnssec(struct module_env *env, struct query_info *qinfo)
See if qname has DNSSEC needs.
Definition: iter_utils.c:778
service_stop_ev
static struct ub_event * service_stop_ev
event struct for stop callbacks
Definition: win_svc.c:64
auth_chunks_delete
static void auth_chunks_delete(struct auth_transfer *at)
delete chunks
Definition: authzone.c:2033
comm_base::cb_arg
void * cb_arg
user argument for stop_accept and start_accept functions
Definition: netevent.h:107
timehist_import
void timehist_import(struct timehist *hist, long long *array, size_t sz)
Import histogram from an array.
Definition: timehist.c:239
val_nsec_prove_nodata_dsreply
enum sec_status val_nsec_prove_nodata_dsreply(struct module_env *env, struct val_env *ve, struct query_info *qinfo, struct reply_info *rep, struct key_entry_key *kkey, time_t *proof_ttl, char **reason, struct module_qstate *qstate)
Check DS absence.
Definition: val_nsec.c:198
msg_parse::qname_len
size_t qname_len
length of query dname in octets, 0 if none
Definition: msgparse.h:120
dname_pkt_copy
void dname_pkt_copy(struct sldns_buffer *pkt, uint8_t *to, uint8_t *dname)
Copy over a valid dname and decompress it.
Definition: dname.c:346
str_keyword
static int str_keyword(char **str, const char *keyword)
true if the string starts with the keyword given.
Definition: testpkts.c:78
forwards_lookup
struct delegpt * forwards_lookup(struct iter_forwards *fwd, uint8_t *qname, uint16_t qclass)
Find forward zone information For this qname/qclass find forward zone information,...
Definition: iter_fwd.c:356
VAL_DLVLOOKUP_STATE
@ VAL_DLVLOOKUP_STATE
DLV lookup state, processing DLV queries.
Definition: validator.h:141
tube_res_list
List of results (arbitrary command serializations) to write back.
Definition: tube.h:115
rrset_has_sigover
static int rrset_has_sigover(sldns_buffer *pkt, struct rrset_parse *rrset, uint16_t type, int *hasother)
see if rrset of type RRSIG contains sig over given type
Definition: msgparse.c:324
sldns_wire2str_int16_scan
int sldns_wire2str_int16_scan(uint8_t **d, size_t *dl, char **s, size_t *sl)
Scan wireformat int16 field to string, with user buffers.
Definition: wire2str.c:1037
anchors_apply_cfg
int anchors_apply_cfg(struct val_anchors *anchors, struct config_file *cfg)
Process trust anchor config.
Definition: val_anchor.c:1047
read_http_result
static BIO * read_http_result(SSL *ssl)
read HTTP result from SSL
Definition: unbound-anchor.c:1099
serviced_query::serviced_query_UDP_EDNS_FRAG
@ serviced_query_UDP_EDNS_FRAG
send UDP query with EDNS1480 (or 1280)
Definition: outside_network.h:373
msg_parse::qtype
uint16_t qtype
query type, host order.
Definition: msgparse.h:122
dynlibmod.h
daemon_remote_open_ports
struct listen_port * daemon_remote_open_ports(struct config_file *cfg)
Open and create listening ports for remote control.
Definition: remote.c:365
MAX_TARGET_NX
#define MAX_TARGET_NX
max number of nxdomains allowed for target lookups for a query and its subqueries
Definition: iterator.h:62
listen_sslctx_create
void * listen_sslctx_create(char *key, char *pem, char *verifypem)
create SSL listen context
Definition: net_help.c:979
lruhash_clear
void lruhash_clear(struct lruhash *table)
Clear hash table.
Definition: lruhash.c:438
auth_zone_cmp
int auth_zone_cmp(const void *z1, const void *z2)
compare auth_zones for sorted rbtree
Definition: authzone.c:307
handle_req
static void handle_req(struct daemon_remote *rc, struct rc_state *s, RES *res)
handle remote control request
Definition: remote.c:3090
xfr_start_probe
static int xfr_start_probe(struct auth_xfer *xfr, struct module_env *env, struct auth_master *spec)
pick up probe task with specified(or NULL) destination first, or transfer task if nothing to probe,...
Definition: authzone.c:6524
dname_test_dname_lab_cmp
static void dname_test_dname_lab_cmp(void)
test dname_lab_cmp
Definition: unitdname.c:272
libworker_send_query
struct outbound_entry * libworker_send_query(struct query_info *qinfo, uint16_t flags, int dnssec, int want_dnssec, int nocaps, struct sockaddr_storage *addr, socklen_t addrlen, uint8_t *zone, size_t zonelen, int ssl_upstream, char *tls_auth_name, struct module_qstate *q)
Worker service routine to send serviced queries to authoritative servers.
Definition: libworker.c:853
dynlibmod_env::func_deinit
func_deinit_t func_deinit
Module deinit function.
Definition: dynlibmod.h:122
answer_from_cache
static int answer_from_cache(struct worker *worker, struct query_info *qinfo, struct respip_client_info *cinfo, int *need_drop, int *is_expired_answer, int *is_secure_answer, struct ub_packed_rrset_key **alias_rrset, struct reply_info **partial_repp, struct reply_info *rep, uint16_t id, uint16_t flags, struct comm_reply *repinfo, struct edns_data *edns)
answer query from the cache.
Definition: worker.c:628
ipset_get_funcblock
struct module_func_block * ipset_get_funcblock(void)
Get the function block with pointers to the ipset functions.
Definition: ipset.c:380
auth_data_cmp
int auth_data_cmp(const void *z1, const void *z2)
compare auth_data for sorted rbtree
Definition: authzone.c:324
addrtree::node_count
uint32_t node_count
Number of elements in the tree (not always equal to number of nodes)
Definition: addrtree.h:69
config_file::dnscrypt_provider_cert
struct config_strlist * dnscrypt_provider_cert
dnscrypt provider certs 1.cert
Definition: config_file.h:566
auth_xfer_probe_lookup_callback
void auth_xfer_probe_lookup_callback(void *arg, int rcode, sldns_buffer *buf, enum sec_status ATTR_UNUSED(sec), char *ATTR_UNUSED(why_bogus), int ATTR_UNUSED(was_ratelimited))
callback for task_probe lookup of host name, of A or AAAA
Definition: authzone.c:6401
ds_get_key_algo
int ds_get_key_algo(struct ub_packed_rrset_key *k, size_t idx)
Get DS RR key algorithm.
Definition: val_sigcrypt.c:206
dns_msg_authadd
int dns_msg_authadd(struct dns_msg *msg, struct regional *region, struct ub_packed_rrset_key *rrset, time_t now)
Add rrset to authority section in unpacked dns_msg message.
Definition: dns.c:440
module_qstate::prefetch_leeway
time_t prefetch_leeway
how many seconds before expiry is this prefetched (0 if not)
Definition: module.h:633
local_zone_type2str
const char * local_zone_type2str(enum localzone_type t)
Print localzone type to a string.
Definition: localzone.c:1746
dt_msg_queue_delete
void dt_msg_queue_delete(struct dt_msg_queue *mq)
Delete a worker message queue.
Definition: dtstream.c:131
dname_count_labels
int dname_count_labels(uint8_t *dname)
Count the number of labels in an uncompressed dname in memory.
Definition: dname.c:431
mesh_cb::qflags
uint16_t qflags
flags of query, for reply flags
Definition: mesh.h:254
read_datafile
struct entry * read_datafile(const char *name, int skip_whitespace)
reads the canned reply file and returns a list of structs does an exit on error.
Definition: testpkts.c:673
ub_ctx_create
struct ub_ctx * ub_ctx_create(void)
Create a resolving and validation context.
Definition: libunbound.c:165
internal_timer::enabled
uint8_t enabled
is timer enabled
Definition: netevent.c:138
sldns_wire2str_edns_llq_print
int sldns_wire2str_edns_llq_print(char **str, size_t *str_len, uint8_t *option_data, size_t option_len)
Print EDNS LLQ option data to string.
Definition: wire2str.c:1738
analyze_rr
static void analyze_rr(sldns_buffer *pkt, int q)
analyze rr in packet
Definition: pktview.c:128
alloc_stats
void alloc_stats(struct alloc_cache *alloc)
Print debug information (statistics).
Definition: alloc.c:304
fptr_whitelist_serve_expired_lookup
int fptr_whitelist_serve_expired_lookup(serve_expired_lookup_func_type *fptr)
Check function pointer whitelist for serve_expired_lookup func values.
Definition: fptr_wlist.c:680
fptr_whitelist_comm_timer
int fptr_whitelist_comm_timer(void(*fptr)(void *))
Check function pointer whitelist for comm_timer callback values.
Definition: fptr_wlist.c:127
tcl_list::region
struct regional * region
regional for allocation
Definition: tcp_conn_limit.h:55
sldns_str2wire_tsigerror_buf
int sldns_str2wire_tsigerror_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_TSIGERROR from string to wireformat.
Definition: str2wire.c:1401
sldns_buffer_status_ok
INLINE int sldns_buffer_status_ok(sldns_buffer *buffer)
returns true if the status of the buffer is LDNS_STATUS_OK, false otherwise
Definition: sbuffer.h:714
local_zones_find
struct local_zone * local_zones_find(struct local_zones *zones, uint8_t *name, size_t len, int labs, uint16_t dclass)
Find zone that with exactly given name, class.
Definition: localzone.c:1133
acl_addr::tag_datas_size
size_t tag_datas_size
size of the tag_datas array
Definition: acl_list.h:105
key_entry_create_null
struct key_entry_key * key_entry_create_null(struct regional *region, uint8_t *name, size_t namelen, uint16_t dclass, time_t ttl, time_t now)
Create a null entry, in the given region.
Definition: val_kentry.c:278
ub_event_free
void ub_event_free(struct ub_event *ev)
free the event
Definition: ub_event_pluggable.c:575
config_file::harden_dnssec_stripped
int harden_dnssec_stripped
harden against receiving no DNSSEC data for trust anchor
Definition: config_file.h:254
autr_debug_print
void autr_debug_print(struct val_anchors *anchors)
Debug printout of rfc5011 tracked anchors.
Definition: autotrust.c:2312
ub_cancel
int ub_cancel(struct ub_ctx *ctx, int async_id)
Cancel an async query in progress.
Definition: libunbound.c:829
sldns_wire2str_nsec3_next_owner_scan
int sldns_wire2str_nsec3_next_owner_scan(uint8_t **data, size_t *data_len, char **str, size_t *str_len)
Scan wireformat nsec3_next_owner field to string, with user buffers.
Definition: wire2str.c:1647
iter_msg_from_zone
int iter_msg_from_zone(struct dns_msg *msg, struct delegpt *dp, enum response_type type, uint16_t dclass)
See if a message is known to be from a certain zone.
Definition: iter_utils.c:858
verbose_print_addr
static void verbose_print_addr(struct addrinfo *addr)
Debug print of the getaddrinfo returned address.
Definition: listen_dnsport.c:93
rrsetdata_equal
int rrsetdata_equal(struct packed_rrset_data *d1, struct packed_rrset_data *d2)
compare two rrset data structures.
Definition: packed_rrset.c:146
config_file::tcp_mss
int tcp_mss
maximum segment size of tcp socket which queries are answered
Definition: config_file.h:101
usage
static void usage(char *argv[])
usage information for delayer
Definition: delayer.c:143
name_tree_next_root
int name_tree_next_root(rbtree_type *tree, uint16_t *dclass)
Find next root item in name tree.
Definition: dnstree.c:255
worker.h
read_if_pending_keys
static int read_if_pending_keys(const char *file)
see if ADDPEND keys exist in autotrust file (if possible)
Definition: unbound-anchor.c:2124
parse_packet
int parse_packet(sldns_buffer *pkt, struct msg_parse *msg, struct regional *region)
Parse the packet.
Definition: msgparse.c:906
sldns_wire2str_edns_subnet_print
int sldns_wire2str_edns_subnet_print(char **str, size_t *str_len, uint8_t *option_data, size_t option_len)
Print EDNS SUBNET option data to string.
Definition: wire2str.c:1860
add_soa
static int add_soa(struct rrset_cache *rrset_cache, time_t now, struct regional *region, struct dns_msg *msg, struct val_neg_zone *zone)
Add SOA record for external responses.
Definition: val_neg.c:1449
server_stats_insquery
void server_stats_insquery(struct ub_server_stats *stats, struct comm_point *c, uint16_t qtype, uint16_t qclass, struct edns_data *edns, struct comm_reply *repinfo)
Add stats for this query.
Definition: stats.c:467
rrinternal_get_class
static int rrinternal_get_class(sldns_buffer *strbuf, char *token, size_t token_len, int *not_there, uint16_t *cl)
read class
Definition: str2wire.c:271
local_zone_delete
void local_zone_delete(struct local_zone *z)
Delete one zone.
Definition: localzone.c:93
infra_ratelimit_cfg_insert
static int infra_ratelimit_cfg_insert(struct infra_cache *infra, struct config_file *cfg)
insert rate limit configuration into lookup tree
Definition: infra.c:200
log_edns_known_options
void log_edns_known_options(enum verbosity_value level, struct module_env *env)
Log the known edns options.
Definition: module.c:220
sldns_wire2str_rdata_buf
int sldns_wire2str_rdata_buf(uint8_t *rdata, size_t rdata_len, char *str, size_t str_len, uint16_t rrtype)
Convert RDATA to string presentation format, on one line.
Definition: wire2str.c:265
do_view_data_remove
static void do_view_data_remove(RES *ssl, struct worker *worker, char *arg)
Remove RR data from view.
Definition: remote.c:1486
iter_qstate::chase_to_rd
int chase_to_rd
true if we set RD bit because of last resort recursion lame query
Definition: iterator.h:276
modstack_find
int modstack_find(struct module_stack *stack, const char *name)
Find index of module by name.
Definition: modstack.c:261
ctx_query::res
struct ub_result * res
result structure, also contains original query, type, class.
Definition: context.h:176
iter_store_parentside_neg
void iter_store_parentside_neg(struct module_env *env, struct query_info *qinfo, struct reply_info *rep)
Store parent-side negative element, the parentside rrset does not exist, creates an rrset with empty ...
Definition: iter_utils.c:1107
dname_buffer_write
int dname_buffer_write(struct sldns_buffer *pkt, uint8_t *dname)
Copy over a valid dname to a packet.
Definition: dname.c:620
comm_point_tcp_accept_callback
void comm_point_tcp_accept_callback(int fd, short event, void *arg)
This routine is published for checks and tests, and is only used internally.
Definition: netevent.c:918
rrset_parse::size
size_t size
sum of RR rdata sizes
Definition: msgparse.h:165
dt_msg_queue_clear
static void dt_msg_queue_clear(struct dt_msg_queue *mq)
clear the message list, caller must hold the lock
Definition: dtstream.c:116
rrset_belongs_in_reply
static int rrset_belongs_in_reply(sldns_pkt_section s, uint16_t rrtype, uint16_t qtype, int dnssec)
Returns true if RR type should be included.
Definition: msgencode.c:421
auth_data::name
uint8_t * name
domain name
Definition: authzone.h:155
iter_donotq::tree
rbtree_type tree
Tree of the address spans that are blocked.
Definition: iter_donotq.h:61
ub_ctx_set_event
int ub_ctx_set_event(struct ub_ctx *ctx, struct event_base *base)
Set a new libevent event_base on a context created with ub_ctx_create_event.
Definition: libunbound.c:1386
dnskey_verify_rrset
enum sec_status dnskey_verify_rrset(struct module_env *env, struct val_env *ve, struct ub_packed_rrset_key *rrset, struct ub_packed_rrset_key *dnskey, size_t dnskey_idx, char **reason, sldns_pkt_section section, struct module_qstate *qstate)
verify rrset against one specific dnskey (from rrset)
Definition: val_sigcrypt.c:555
q_ans::flags
const char * flags
additional flags or ""
Definition: unitauth.c:62
rbtree_insert
rbnode_type * rbtree_insert(rbtree_type *rbtree, rbnode_type *data)
Insert data into the tree.
Definition: rbtree.c:228
comm_point_tcp_handle_callback
void comm_point_tcp_handle_callback(int fd, short event, void *arg)
This routine is published for checks and tests, and is only used internally.
Definition: netevent.c:1768
sldns_buffer_write_string
INLINE void sldns_buffer_write_string(sldns_buffer *buffer, const char *str)
copies the given (null-delimited) string to the current position at the buffer
Definition: sbuffer.h:487
local_zone::node
rbnode_type node
rbtree node, key is name and class
Definition: localzone.h:120
resp_addr::data
struct ub_packed_rrset_key * data
"local data" for this node
Definition: respip.h:45
dt_msg_entry::buf
void * buf
the buffer with the data to send, an encoded DNSTAP message
Definition: dtstream.h:86
get_cname_target
void get_cname_target(struct ub_packed_rrset_key *rrset, uint8_t **dname, size_t *dname_len)
Utility procedure to extract CNAME target name from its rdata.
Definition: packed_rrset.c:196
iter_dp_is_useless
int iter_dp_is_useless(struct query_info *qinfo, uint16_t qflags, struct delegpt *dp)
See if delegation is useful or offers immediately no targets for further recursion.
Definition: iter_utils.c:741
ip_list::used
int used
has the address been used
Definition: unbound-anchor.c:170
sldns_buffer_new_frm_data
void sldns_buffer_new_frm_data(sldns_buffer *buffer, void *data, size_t size)
creates a buffer with the specified data.
Definition: sbuffer.c:44
sldns_buffer_write_u8_at
INLINE void sldns_buffer_write_u8_at(sldns_buffer *buffer, size_t at, uint8_t data)
writes the given byte of data at the given position in the buffer
Definition: sbuffer.h:499
neg_data_chain
static struct val_neg_data * neg_data_chain(uint8_t *nm, size_t nm_len, int labs, struct val_neg_data *parent)
Create chain of data element and parents.
Definition: val_neg.c:629
auth_probe::masters
struct auth_master * masters
list of upstream masters for this zone, from config
Definition: authzone.h:316
proxy::numsent
size_t numsent
number of queries sent to server (in total)
Definition: delayer.c:88
compress_tree_node::dname
uint8_t * dname
the domain name for this node.
Definition: msgencode.c:86
forwards_delete_stub_hole
void forwards_delete_stub_hole(struct iter_forwards *fwd, uint16_t c, uint8_t *nm)
Remove stub hole, if one exists.
Definition: iter_fwd.c:507
rpz_remove_qname_trigger
static void rpz_remove_qname_trigger(struct rpz *r, uint8_t *dname, size_t dnamelen, enum rpz_action a, uint16_t rr_type, uint16_t rr_class, uint8_t *rdatawl, size_t rdatalen)
Remove RR from RPZ's local-zone.
Definition: rpz.c:820
tcp_relay_write
static int tcp_relay_write(int s, struct tcp_send_list **first, struct tcp_send_list **last, struct timeval *now)
relay TCP, write a part
Definition: delayer.c:695
packed_rrset_copy_region
struct ub_packed_rrset_key * packed_rrset_copy_region(struct ub_packed_rrset_key *key, struct regional *region, time_t now)
Allocate rrset in region - no more locks needed.
Definition: packed_rrset.c:326
timehist_quartile
double timehist_quartile(struct timehist *hist, double q)
Find time value for given quartile, such as 0.25, 0.50, 0.75.
Definition: timehist.c:198
priv_lookup_name
static int priv_lookup_name(struct iter_priv *priv, sldns_buffer *pkt, uint8_t *name, size_t name_len, uint16_t dclass)
See if a name is whitelisted.
Definition: iter_priv.c:190
nsec3_cached_hash
The NSEC3 hash result storage.
Definition: val_nsec3.h:228
nsec_proves_nodata
int nsec_proves_nodata(struct ub_packed_rrset_key *nsec, struct query_info *qinfo, uint8_t **wc)
Determine if a NSEC proves the NOERROR/NODATA conditions.
Definition: val_nsec.c:289
infra_data::edns_version
int edns_version
edns version that the host supports, -1 means no EDNS
Definition: infra.h:85
val_qstate::rrset_skip
size_t rrset_skip
The cname skip value; the number of rrsets that have been skipped due to chasing cnames.
Definition: validator.h:190
dynlibmod_init
int dynlibmod_init(struct module_env *env, int id)
dynlib module init
Definition: dynlibmod.c:73
rtt_lost
void rtt_lost(struct rtt_info *rtt, int orig)
Update the statistics with a new timeout expired observation.
Definition: rtt.c:100
order_id::thr
int thr
the thread id that created it
Definition: unbound-dnstap-socket.c:1563
rrset_trust_prim_noglue
@ rrset_trust_prim_noglue
Data from a primary zone file, other than glue data.
Definition: packed_rrset.h:164
perfselect
static void perfselect(struct perfinfo *info)
wait for new events for performance test
Definition: perf.c:360
dt_msg_queue::maxsize
size_t maxsize
the maximum size of the buffer, in bytes
Definition: dtstream.h:67
ub_ctx_hosts
int ub_ctx_hosts(struct ub_ctx *ctx, const char *fname)
Read list of hosts from the filename given.
Definition: libunbound.c:1158
extstrtoaddr
int extstrtoaddr(const char *str, struct sockaddr_storage *addr, socklen_t *addrlen)
Convert address string, with "@port" appendix, to sockaddr.
Definition: net_help.c:224
config_apply
void config_apply(struct config_file *config)
Apply config to global constants; this routine is called in single thread.
Definition: config_file.c:2029
sldns_wire2str_type_print
int sldns_wire2str_type_print(char **s, size_t *slen, uint16_t rrtype)
Print host format rr type to string.
Definition: wire2str.c:890
unit_show_func
void unit_show_func(const char *file, const char *func)
we are now testing this function
Definition: unitmain.c:842
check_az_q_ans
static void check_az_q_ans(struct auth_zones *az, struct q_ans *queries)
check queries on a loaded zone
Definition: unitauth.c:818
replay_var::value
char * value
the variable value
Definition: replay.h:403
fstrm_describe_control
char * fstrm_describe_control(void *pkt, size_t len)
Return string that describes a control packet.
Definition: dnstap_fstrm.c:173
libworker_send_query
struct outbound_entry * libworker_send_query(struct query_info *qinfo, uint16_t flags, int dnssec, int want_dnssec, int nocaps, struct sockaddr_storage *addr, socklen_t addrlen, uint8_t *zone, size_t zonelen, int ssl_upstream, char *tls_auth_name, struct module_qstate *q)
Worker service routine to send serviced queries to authoritative servers.
Definition: libworker.c:853
check_the_rrsigs
static void check_the_rrsigs(struct query_info *qinfo, struct reply_info *rep)
check RRSIGs in packet
Definition: unitmsgparse.c:293
dt_io_thread::started
int started
if the io processing has started
Definition: dtstream.h:130
module_qstate::edns_opts_front_in
struct edns_option * edns_opts_front_in
incoming edns options from the front end
Definition: module.h:638
infra_get_mem
size_t infra_get_mem(struct infra_cache *infra)
Get memory used by the infra cache.
Definition: infra.c:997
detach
static void detach(void)
detach from command line
Definition: unbound.c:382
pythonmod_deinit
void pythonmod_deinit(struct module_env *env, int id)
python module deinit
Definition: pythonmod.c:439
dname_str
void dname_str(uint8_t *dname, char *str)
Debug helper.
Definition: dname.c:639
daemon::rc_port
int rc_port
port number for remote that has ports opened.
Definition: daemon.h:93
sldns_str2wire_loc_buf
int sldns_str2wire_loc_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_LOC from string to wireformat.
Definition: str2wire.c:1524
dt_frame_read_buf
Containing buffer and counter for reading DNSTAP frames.
Definition: dtstream.h:94
sldns_wire2str_class_print
int sldns_wire2str_class_print(char **s, size_t *slen, uint16_t rrclass)
Print host format rr class to string.
Definition: wire2str.c:880
regional_create
struct regional * regional_create(void)
Create a new regional.
Definition: regional.c:66
ub_thr_fork_wait
void ub_thr_fork_wait(ub_thread_type thread)
There is no threading.
Definition: locks.c:134
reverse
static void reverse(char *begin, char *end)
Reverses a string.
Definition: dns64.c:159
mesh_cb::cb_arg
void * cb_arg
user arg for callback
Definition: mesh.h:262
rate_sizefunc
size_t rate_sizefunc(void *k, void *d)
calculate size for the hashtable
alloc_init
void alloc_init(struct alloc_cache *alloc, struct alloc_cache *super, int thread_num)
Init alloc (zeroes the struct).
Definition: alloc.c:103
VAL_VALIDATE_STATE
@ VAL_VALIDATE_STATE
validate the answer, using found key entry
Definition: validator.h:137
log_ident_revert_to_default
void log_ident_revert_to_default(void)
Revert identity to print, back to the recorded default value.
Definition: log.c:190
entry::match_rcode
uint8_t match_rcode
match rcode with answer rcode
Definition: testpkts.h:176
replay_answer::repinfo
struct comm_reply repinfo
reply information
Definition: replay.h:370
dnsc_nonces_sizefunc
size_t dnsc_nonces_sizefunc(void *k, void *ATTR_UNUSED(d))
Definition: dnscrypt.c:1069
view_delete
void view_delete(struct view *v)
Delete one view.
Definition: view.c:74
rrset_cache_delete
void rrset_cache_delete(struct rrset_cache *r)
Delete rrset cache.
Definition: rrset.c:73
outside_network::unwanted_total
size_t unwanted_total
cumulative total of unwanted replies (for defense)
Definition: outside_network.h:92
comm_point_start_listening
void comm_point_start_listening(struct comm_point *c, int newfd, int msec)
Start listening again for input on the comm point.
Definition: netevent.c:3204
do_zone_add
static void do_zone_add(RES *ssl, struct local_zones *zones, char *arg)
Do the local_zone command.
Definition: remote.c:1224
config_create
struct config_file * config_create(void)
Create config file structure.
Definition: config_file.c:89
check_neg_invariants
static void check_neg_invariants(struct val_neg_cache *neg)
check if negative cache is still valid
Definition: unitneg.c:472
iter_qstate::wait_priming_stub
int wait_priming_stub
This is flag that, if true, means that this event is waiting for a stub priming query.
Definition: iterator.h:366
hints_next_root
int hints_next_root(struct iter_hints *hints, uint16_t *qclass)
Find next root hints (to cycle through all root hints).
Definition: iter_hints.c:508
alloc_cache::quar
alloc_special_type * quar
singly linked lists of special type.
Definition: alloc.h:78
views_enter_view_name
static struct view * views_enter_view_name(struct views *vs, char *name)
enter a new view returns with WRlock
Definition: view.c:121
tcl_list_apply_cfg
int tcl_list_apply_cfg(struct tcl_list *tcl, struct config_file *cfg)
Process TCP connection limit config.
Definition: tcp_conn_limit.c:144
cfg_mark_ports
int cfg_mark_ports(const char *str, int allow, int *avail, int num)
Mark "number" or "low-high" as available or not in ports array.
Definition: config_file.c:1545
serviced_query::edns_lame_known
int edns_lame_known
do we know edns probe status already, for UDP_EDNS queries
Definition: outside_network.h:386
reclaim_tcp_handler
static void reclaim_tcp_handler(struct comm_point *c)
Make tcp handler free for next assignment.
Definition: netevent.c:974
port_comm
Outgoing commpoint for UDP port.
Definition: outside_network.h:199
sldns_bget_token_par
ssize_t sldns_bget_token_par(struct sldns_buffer *b, char *token, const char *delim, size_t limit, int *par, const char *skipw)
returns a token/char from the buffer b.
Definition: parse.c:244
callback_list_remove
static void callback_list_remove(struct serviced_query *sq, void *cb_arg)
remove callback from list
Definition: outside_network.c:2163
edns_register_option
int edns_register_option(uint16_t opt_code, int bypass_cache_stage, int no_aggregation, struct module_env *env)
Register a known edns option.
Definition: module.c:93
verifytest_entry
static void verifytest_entry(struct entry *e, struct alloc_cache *alloc, struct regional *region, sldns_buffer *pkt, struct ub_packed_rrset_key *dnskey, struct module_env *env, struct val_env *ve)
verify and test an entry - every rr in the message
Definition: unitverify.c:205
answer_check_it
static void answer_check_it(struct replay_runtime *runtime)
Check the now moment answer check event.
Definition: fake_event.c:404
msg_parse::rrset_first
struct rrset_parse * rrset_first
linked list of rrsets that have been found (in order).
Definition: msgparse.h:133
alloc_special_obtain
alloc_special_type * alloc_special_obtain(struct alloc_cache *alloc)
Get a new special_type element.
Definition: alloc.c:214
sldns_str2wire_str_buf
int sldns_str2wire_str_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_STR from string to wireformat.
Definition: str2wire.c:1093
rbnode_type::parent
rbnode_type * parent
parent in rbtree, RBTREE_NULL for root
Definition: rbtree.h:57
main
int main(int argc, char **argv)
main program for delayer
Definition: delayer.c:1129
fptr_whitelist_hash_markdelfunc
int fptr_whitelist_hash_markdelfunc(lruhash_markdelfunc_type fptr)
Check function pointer whitelist for lruhash markdel callback values.
Definition: fptr_wlist.c:322
worker_probe_timer_cb
void worker_probe_timer_cb(void *arg)
probe timer callback handler
Definition: worker.c:1687
respip_operate
void respip_operate(struct module_qstate *qstate, enum module_ev event, int id, struct outbound_entry *outbound)
response-ip operate on a query
Definition: respip.c:1077
ub_ctx_zone_remove
int ub_ctx_zone_remove(struct ub_ctx *ctx, const char *zone_name)
Remove zone from local authority info of the library.
Definition: libunbound.c:1326
autr_process_prime
int autr_process_prime(struct module_env *env, struct val_env *ve, struct trust_anchor *tp, struct ub_packed_rrset_key *dnskey_rrset, struct module_qstate *qstate)
Perform autotrust processing.
Definition: autotrust.c:2141
auth_data
Auth data.
Definition: authzone.h:151
forwards_delete
void forwards_delete(struct iter_forwards *fwd)
Delete forwards.
Definition: iter_fwd.c:99
iter_qstate::num_current_queries
int num_current_queries
outstanding direct queries
Definition: iterator.h:301
forwards_find
struct delegpt * forwards_find(struct iter_forwards *fwd, uint8_t *qname, uint16_t qclass)
Find forward zone exactly by name.
Definition: iter_fwd.c:342
comm_point::tcp_is_reading
int tcp_is_reading
Read/Write state for TCP.
Definition: netevent.h:170
dt_io_thread_create
struct dt_io_thread * dt_io_thread_create(void)
Create IO thread.
Definition: dtstream.c:228
rrset.h
worker::front
struct listen_dnsport * front
the frontside listening interface where request events come in
Definition: worker.h:94
config_file::num_out_ifs
int num_out_ifs
number of outgoing interfaces to open.
Definition: config_file.h:203
config_file::pidfile
char * pidfile
pidfile to write pid to.
Definition: config_file.h:293
tube_read_fd
int tube_read_fd(struct tube *tube)
Get FD that is readable when new information arrives.
Definition: tube.c:423
order_lock::smaller
rbtree_type * smaller
set of all locks that are smaller than this one (locked earlier)
Definition: lock_verify.c:79
ub_event_vmt::add_timer
int(* add_timer)(struct ub_event *, struct ub_event_base *, void(*cb)(int, short, void *), void *arg, struct timeval *)
Reconfigure and activate a timeout event.
Definition: unbound-event.h:142
auth_zone_parse_notify_serial
int auth_zone_parse_notify_serial(struct sldns_buffer *pkt, uint32_t *serial)
process notify packet and read serial number from SOA.
Definition: authzone.c:3410
do_data_remove
static void do_data_remove(RES *ssl, struct local_zones *zones, char *arg)
Do the local_data_remove command.
Definition: remote.c:1355
fake_pending::runtime
struct replay_runtime * runtime
the runtime structure this is part of
Definition: replay.h:360
config_strbytelist
List of string, bytestring for config options.
Definition: config_file.h:758
S_YNO
#define S_YNO(str, var)
put yesno into variable
Definition: config_file.c:412
SKIP_MINIMISE_STATE
@ SKIP_MINIMISE_STATE
Don't increment QNAME this iteration.
Definition: iterator.h:160
validate_referral_response
static void validate_referral_response(struct reply_info *chase_reply)
Given a referral response, validate rrsets and take least trusted rrset as the current validation sta...
Definition: validator.c:1083
ah
static int ah(struct delegpt *dp, const char *sv, const char *ip)
add hint to delegation hints
Definition: iter_hints.c:92
del_info::labs
int labs
labels
Definition: remote.c:1605
local_zone_always_transparent
@ local_zone_always_transparent
resolve normally, even when there is local data
Definition: localzone.h:90
respip_action_info
Data items representing the result of response-ip processing.
Definition: respip.h:80
respip_init
int respip_init(struct module_env *env, int id)
response-ip init
Definition: respip.c:550
auth_addr
list of addresses
Definition: authzone.h:422
rrset_parse::rrset_class
uint16_t rrset_class
class, network order.
Definition: msgparse.h:159
probetree_cmp
int probetree_cmp(const void *x, const void *y)
probe tree compare function
Definition: autotrust.c:92
dl_tv_smaller
static int dl_tv_smaller(struct timeval *t1, const struct timeval *t2)
timeval compare, t1 < t2
Definition: delayer.c:158
ub_server_stats::unwanted_queries
long long unwanted_queries
unwanted traffic received on client-facing ports
Definition: unbound.h:737
config_stub::isprime
int isprime
if stub-prime is set
Definition: config_file.h:642
module_qstate::blacklist
struct sock_list * blacklist
IP blacklist for queries.
Definition: module.h:616
infra_compfunc
int infra_compfunc(void *key1, void *key2)
compare two addresses, returns -1, 0, or +1
Definition: infra.c:79
check_nosameness
static int check_nosameness
do not check buffer sameness
Definition: unitmsgparse.c:67
infra_cache::host_ttl
int host_ttl
TTL value for host information, in seconds.
Definition: infra.h:116
MAX_KNOWN_EDNS_OPTS
#define MAX_KNOWN_EDNS_OPTS
Maximum number of known edns options.
Definition: module.h:188
dname_test_subdomain
static void dname_test_subdomain(void)
test dname_subdomain_c
Definition: unitdname.c:374
sldns_wire2str_rrquestion_scan
int sldns_wire2str_rrquestion_scan(uint8_t **data, size_t *data_len, char **str, size_t *str_len, uint8_t *pkt, size_t pktlen, int *comprloop)
Scan wireformat question rr to string, with user buffers.
Definition: wire2str.c:523
bogus_del_rrset
static void bogus_del_rrset(struct lruhash_entry *e, void *arg)
callback to delete bogus rrsets
Definition: remote.c:1775
iter_utils.h
msgreply_entry::entry
struct lruhash_entry entry
the hash table entry, data is struct reply_info*
Definition: msgreply.h:221
test_thr::id
ub_thread_type id
id
Definition: unitlruhash.c:425
sldns_str2period
uint32_t sldns_str2period(const char *nptr, const char **endptr)
converts a ttl value (like 5d2h) to a long.
Definition: parseutil.c:212
respip_merge_cname
int respip_merge_cname(struct reply_info *base_rep, const struct query_info *qinfo, const struct reply_info *tgt_rep, const struct respip_client_info *cinfo, int must_validate, struct reply_info **new_repp, struct regional *region, struct auth_zones *az)
Merge two replies to build a complete CNAME chain.
Definition: respip.c:1162
cfg_parser
struct config_parser_state * cfg_parser
global config parser object used during config parsing
Definition: config_file.c:83
NSEC3_HASH_SHA1
#define NSEC3_HASH_SHA1
The SHA1 hash algorithm for NSEC3.
Definition: val_nsec3.h:98
domain_limit_free
static void domain_limit_free(rbnode_type *n, void *ATTR_UNUSED(arg))
delete domain_limit entries
Definition: infra.c:273
auth_data::namelen
size_t namelen
length of name
Definition: authzone.h:157
ub_server_stats::qEDNS
long long qEDNS
number of queries with EDNS OPT record
Definition: unbound.h:719
libworker_event_done_cb
void libworker_event_done_cb(void *arg, int rcode, struct sldns_buffer *buf, enum sec_status s, char *why_bogus, int was_ratelimited)
mesh callback with event results
Definition: libworker.c:637
local_zones_add_zone
struct local_zone * local_zones_add_zone(struct local_zones *zones, uint8_t *name, size_t len, int labs, uint16_t dclass, enum localzone_type tp)
Add a new zone.
Definition: localzone.c:1835
stress_test
static void stress_test(struct val_neg_cache *neg)
perform stress test on insert and delete in neg cache
Definition: unitneg.c:502
daemon_init
struct daemon * daemon_init(void)
Initialize daemon structure.
Definition: daemon.c:194
replay_runtime::timer_list
struct fake_timer * timer_list
list of fake timer callbacks that are pending
Definition: replay.h:291
tube_setup_bg_write
int tube_setup_bg_write(struct tube *tube, struct comm_base *base)
Start background write handler for the pipe.
Definition: tube.c:443
sldns_fp2wire_rr_buf
int sldns_fp2wire_rr_buf(FILE *in, uint8_t *rr, size_t *len, size_t *dname_len, struct sldns_file_parse_state *parse_state)
Read one RR from zonefile with buffer for the data.
Definition: str2wire.c:861
get_qname
static uint8_t * get_qname(uint8_t *pkt, size_t pktlen)
returns owner from packet
Definition: testpkts.c:740
get_builtin_cert
static const char * get_builtin_cert(void)
return the built in root update certificate
Definition: unbound-anchor.c:214
sldns_wire2str_long_str_scan
int sldns_wire2str_long_str_scan(uint8_t **d, size_t *dl, char **s, size_t *sl)
Scan wireformat long_str field to string, with user buffers.
Definition: wire2str.c:1710
auth_addr::addr
struct sockaddr_storage addr
IP address.
Definition: authzone.h:426
infra_create
struct infra_cache * infra_create(struct config_file *cfg)
Create infra cache.
Definition: infra.c:233
val_rrset_wildcard
int val_rrset_wildcard(struct ub_packed_rrset_key *rrset, uint8_t **wc, size_t *wc_len)
Determine by looking at a signed RRset whether or not the RRset name was the result of a wildcard exp...
Definition: val_utils.c:770
forwards_delete_zone
void forwards_delete_zone(struct iter_forwards *fwd, uint16_t c, uint8_t *nm)
Remove zone from forward structure.
Definition: iter_fwd.c:486
random_burden
static void random_burden(void)
randomly allocate stuff
Definition: unitregional.c:235
state_list_remove_elem
static void state_list_remove_elem(struct rc_state **list, struct comm_point *c)
delete from list
Definition: remote.c:528
delkey
static void delkey(struct slabhash_testkey *k)
delete key
Definition: slabhash.c:186
pythonmod_get_funcblock
struct module_func_block * pythonmod_get_funcblock(void)
Get the module function block.
Definition: pythonmod.c:587
ub_server_stats::unwanted_replies
long long unwanted_replies
unwanted traffic received on server-facing ports
Definition: unbound.h:735
config_file::permit_small_holddown
int permit_small_holddown
permit small holddown values, allowing 5011 rollover very fast
Definition: config_file.h:385
handle_cancel
static void handle_cancel(struct libworker *w, uint8_t *buf, uint32_t len)
handle cancel command for bg worker
Definition: libworker.c:274
daemon_remote_delete
void daemon_remote_delete(struct daemon_remote *rc)
remote control state to delete.
Definition: remote.c:253
rrset_get_count
static size_t rrset_get_count(struct ub_packed_rrset_key *rrset)
return number of rrs in an rrset
Definition: unitverify.c:149
dl_tv_add
static void dl_tv_add(struct timeval *t1, const struct timeval *t2)
timeval add, t1 += t2
Definition: delayer.c:172
autr_cleanup_keys
static void autr_cleanup_keys(struct trust_anchor *tp)
cleanup key list
Definition: autotrust.c:1970
log_warn
void void void log_warn(const char *format,...) ATTR_FORMAT(printf
Log warning message.
ipsecmod_qstate::ipseckey_rrset
struct ub_packed_rrset_key * ipseckey_rrset
Pointer to IPSECKEY rrset allocated in the qstate region.
Definition: ipsecmod.h:71
perfinfo::numrecv
size_t numrecv
number of queries received in that time
Definition: perf.c:91
sldns_wire2str_int8_scan
int sldns_wire2str_int8_scan(uint8_t **d, size_t *dl, char **s, size_t *sl)
Scan wireformat int8 field to string, with user buffers.
Definition: wire2str.c:1027
store_rrsets
static void store_rrsets(struct module_env *env, struct reply_info *rep, time_t now, time_t leeway, int pside, struct reply_info *qrep, struct regional *region)
store rrsets in the rrset cache.
Definition: dns.c:73
listen_get_mem
size_t listen_get_mem(struct listen_dnsport *listen)
get memory size used by the listening structs
Definition: listen_dnsport.c:1552
val_qstate::signer_name
uint8_t * signer_name
signer name
Definition: validator.h:214
slabhash_status
void slabhash_status(struct slabhash *table, const char *id, int extended)
Output debug info to the log as to state of the hash table.
Definition: slabhash.c:133
cfg_strlist_find
struct config_strlist * cfg_strlist_find(struct config_strlist *head, const char *item)
Find string in strlist.
Definition: config_file.c:1690
do_forward_remove
static void do_forward_remove(RES *ssl, struct worker *worker, char *args)
do the forward_remove command
Definition: remote.c:2160
config_file::dnstap_log_resolver_query_messages
int dnstap_log_resolver_query_messages
true to log dnstap RESOLVER_QUERY message events
Definition: config_file.h:510
sldns_str2wire_rr_buf
int sldns_str2wire_rr_buf(const char *str, uint8_t *rr, size_t *len, size_t *dname_len, uint32_t default_ttl, uint8_t *origin, size_t origin_len, uint8_t *prev, size_t prev_len)
Convert text RR to wireformat, with user buffer.
Definition: str2wire.c:782
dname_strict_subdomain_c
int dname_strict_subdomain_c(uint8_t *d1, uint8_t *d2)
Like dname_strict_subdomain but counts labels.
Definition: dname.c:693
local_rrset_remove_rr
int local_rrset_remove_rr(struct packed_rrset_data *pd, size_t index)
Delete RR from local-zone RRset, wastes memory as the deleted RRs cannot be free'd (regionally alloc'...
Definition: localzone.c:400
MAX_DP_TARGET_COUNT
#define MAX_DP_TARGET_COUNT
max number of target lookups per qstate, per delegation point
Definition: iterator.h:59
delegpt_count_ns
void delegpt_count_ns(struct delegpt *dp, size_t *numns, size_t *missing)
count NS and number missing for logging
Definition: iter_delegpt.c:227
service_status
static SERVICE_STATUS service_status
global service status
Definition: win_svc.c:58
key_cache_remove
void key_cache_remove(struct key_cache *kcache, uint8_t *name, size_t namelen, uint16_t key_class)
Remove an entry from the key cache.
Definition: val_kcache.c:162
is_bind_special
static int is_bind_special(int c)
true for special characters in bind configs
Definition: val_anchor.c:497
write_http_get
static int write_http_get(SSL *ssl, const char *pathname, const char *urlname)
start HTTP1.1 transaction on SSL
Definition: unbound-anchor.c:1053
rate_key::namelen
size_t namelen
length of name
Definition: infra.h:149
tcp_req_done_item
List of done items in TCP channel.
Definition: listen_dnsport.h:290
config_view::name
char * name
view name
Definition: config_file.h:698
module_qstate::serve_expired_data
struct serve_expired_data * serve_expired_data
serve expired data
Definition: module.h:635
outbound_entry
Outbound list entry.
Definition: outbound_list.h:61
val_init
int val_init(struct module_env *env, int id)
validator init
Definition: validator.c:168
P7SIGNER
#define P7SIGNER
name of the signer of the certificate
Definition: unbound-anchor.c:149
rrset_parse::hash
hashvalue_type hash
hash value of rrset
Definition: msgparse.h:147
val_verify_rrset_entry
enum sec_status val_verify_rrset_entry(struct module_env *env, struct val_env *ve, struct ub_packed_rrset_key *rrset, struct key_entry_key *kkey, char **reason, sldns_pkt_section section, struct module_qstate *qstate)
Verify RRset with keys from a keyset.
Definition: val_utils.c:393
sldns_enum_directive
sldns_enum_directive
different type of directives in zone files We now deal with $TTL, $ORIGIN and $INCLUDE.
Definition: parse.h:39
cachedb_backend::init
int(* init)(struct module_env *, struct cachedb_env *)
Init(env, cachedb_env): false on setup failure.
Definition: cachedb.h:76
auth_zone_set_zonefile
int auth_zone_set_zonefile(struct auth_zone *z, char *zonefile)
set auth zone zonefile string.
Definition: authzone.c:555
MAX_TTL
time_t MAX_TTL
Maximum TTL that is allowed.
Definition: msgreply.c:59
do_auth_zone_reload
static void do_auth_zone_reload(RES *ssl, struct worker *worker, char *arg)
do the auth_zone_reload command
Definition: remote.c:2511
HASHTESTMAX
#define HASHTESTMAX
number of hash test max
Definition: unitslabhash.c:105
do_stop
static void do_stop(RES *ssl, struct worker *worker)
do the stop command
Definition: remote.c:678
config_file::num_ifs
int num_ifs
number of interfaces to open.
Definition: config_file.h:197
val_qstate::trust_anchor_len
size_t trust_anchor_len
trust anchor length
Definition: validator.h:197
config_file::ratelimit_below_domain
struct config_str2list * ratelimit_below_domain
ratelimits below domain
Definition: config_file.h:543
read_input
static void read_input(sldns_buffer *pkt, FILE *in)
read hex input
Definition: pktview.c:60
ub_ctx_set_stub
int ub_ctx_set_stub(struct ub_ctx *ctx, const char *zone, const char *addr, int isprime)
Add a stub zone, with given address to send to.
Definition: libunbound.c:990
config_stub
Stub config options.
Definition: config_file.h:632
RATE_WINDOW
#define RATE_WINDOW
number of seconds to track qps rate
Definition: infra.h:168
addrnode::scope
addrlen_t scope
Number of significant bits in address.
Definition: addrtree.h:97
print_exit
static void print_exit(const char *str)
fatal exit
Definition: petal.c:91
msgparse_bucket_remove
void msgparse_bucket_remove(struct msg_parse *msg, struct rrset_parse *rrset)
Remove rrset from hash table.
Definition: msgparse.c:265
pick_outgoing_tcp
static int pick_outgoing_tcp(struct waiting_tcp *w, int s)
Pick random outgoing-interface of that family, and bind it.
Definition: outside_network.c:155
context_new
struct ctx_query * context_new(struct ub_ctx *ctx, const char *name, int rrtype, int rrclass, ub_callback_type cb, ub_event_callback_type cb_event, void *cbarg)
Create new query in context, add to querynum list.
Definition: context.c:139
ub_packed_rrset_parsedelete
void ub_packed_rrset_parsedelete(struct ub_packed_rrset_key *pkey, struct alloc_cache *alloc)
Delete packed rrset key and data, not entered in hashtables yet.
Definition: packed_rrset.c:56
auth_zone::node
rbnode_type node
rbtree node, key is name and class
Definition: authzone.h:98
ub_ctx_delete
void ub_ctx_delete(struct ub_ctx *ctx)
Destroy a validation context and free all its resources.
Definition: libunbound.c:284
errinf_origin
void errinf_origin(struct module_qstate *qstate, struct sock_list *origin)
Append text to error info: from 1.2.3.4.
Definition: config_file.c:2404
ub_ctx_async
int ub_ctx_async(struct ub_ctx *ctx, int dothread)
Set a context behaviour for asynchronous action.
Definition: libunbound.c:487
fake_pending::zonelen
size_t zonelen
length of zone name
Definition: replay.h:338
replay_answer::next
struct replay_answer * next
Next in list.
Definition: replay.h:368
LDNS_RR_TYPE_ATMA
@ LDNS_RR_TYPE_ATMA
http://www.jhsoft.com/rfc/af-saa-0069.000.rtf
Definition: rrdef.h:151
auth_zone::rpz_az_prev
struct auth_zone * rpz_az_prev
previous auth zone containing RPZ data, or NULL
Definition: authzone.h:145
auth_zone::namelen
size_t namelen
length of zone name
Definition: authzone.h:103
process_answer
static int process_answer(struct ub_ctx *ctx, uint8_t *msg, uint32_t len)
process answer from bg worker
Definition: libunbound.c:583
respip_sockaddr_find_or_create
struct resp_addr * respip_sockaddr_find_or_create(struct respip_set *set, struct sockaddr_storage *addr, socklen_t addrlen, int net, int create, const char *ipstr)
Find resp_addr in tree, create and add to tree if it does not exist.
Definition: respip.c:103
test_thr
structure to threaded test the lru hash table
Definition: unitlruhash.c:421
ub_winsock_tcp_wouldblock
void ub_winsock_tcp_wouldblock(struct ub_event *ev, int eventbits)
Signal the eventloop when a TCP windows socket will block on next read or write (given by the eventbi...
Definition: ub_event.c:438
forwards_add_stub_hole
int forwards_add_stub_hole(struct iter_forwards *fwd, uint16_t c, uint8_t *nm)
Add stub hole (empty entry in forward table, that makes resolution skip a forward-zone because the st...
Definition: iter_fwd.c:497
localzonechecks
static void localzonechecks(struct config_file *cfg)
check localzones
Definition: unbound-checkconf.c:188
msg_cache_lookup
struct msgreply_entry * msg_cache_lookup(struct module_env *env, uint8_t *qname, size_t qnamelen, uint16_t qtype, uint16_t qclass, uint16_t flags, time_t now, int wr)
lookup message in message cache
Definition: dns.c:240
ub_stats_info::mesh_time_median
double mesh_time_median
mesh stats: median of waiting times for replies (in sec)
Definition: unbound.h:818
config_file::control_ifs
struct config_strlist_head control_ifs
the interfaces the remote control should listen on
Definition: config_file.h:436
dns64_deinit
void dns64_deinit(struct module_env *env, int id)
Deinitializes this instance of the dns64 module.
Definition: dns64.c:431
auth_xfer_timer
void auth_xfer_timer(void *arg)
xfer nextprobe timeout callback, this is part of task_nextprobe
Definition: authzone.c:6480
del_info::expired
time_t expired
time to invalidate to
Definition: remote.c:1607
val_secalgo.h
listen_stop_accept
void listen_stop_accept(struct listen_dnsport *listen)
stop accept handlers for TCP (until enabled again)
Definition: listen_dnsport.c:1571
context_deserialize_cancel
struct ctx_query * context_deserialize_cancel(struct ub_ctx *ctx, uint8_t *p, uint32_t len)
Deserialize a cancel buffer.
Definition: context.c:388
config_file::ssl_service_pem
char * ssl_service_pem
public key file for dnstcp-ssl service
Definition: config_file.h:114
rrset_canonical_equal
int rrset_canonical_equal(struct regional *region, struct ub_packed_rrset_key *k1, struct ub_packed_rrset_key *k2)
Compare two rrsets and see if they are the same, canonicalised.
Definition: val_sigcrypt.c:1053
fake_timer
Timers with callbacks, fake replay version.
Definition: replay.h:379
log_init
void log_init(const char *filename, int use_syslog, const char *chrootdir)
call this to initialize logging services.
Definition: log.c:86
view::local_zones
struct local_zones * local_zones
view specific local authority zones
Definition: view.h:74
delegpt_set_name_mlc
int delegpt_set_name_mlc(struct delegpt *dp, uint8_t *name)
Set name of delegation point.
Definition: iter_delegpt.c:571
fake_commpoint::type_udp_out
int type_udp_out
if this is a udp outgoing type of commpoint
Definition: fake_event.c:77
sldns_buffer_write_string_at
INLINE void sldns_buffer_write_string_at(sldns_buffer *buffer, size_t at, const char *str)
copies the given (null-delimited) string to the specified position at the buffer
Definition: sbuffer.h:476
codeline::node
rbnode_type node
rbtree node
Definition: memstats.c:54
final_state
static int final_state(struct iter_qstate *iq)
Transition an event to its final state.
Definition: iterator.c:213
FSTRM_CONTROL_FRAME_STOP
#define FSTRM_CONTROL_FRAME_STOP
control frame value to denote the control frame STOP
Definition: dnstap_fstrm.h:104
worker_stat_timer_cb
void worker_stat_timer_cb(void *arg)
statistics timer callback handler
Definition: worker.c:1670
listening_ports_free
void listening_ports_free(struct listen_port *list)
Close and delete the (list of) listening ports.
Definition: fake_event.c:1299
TCP_BACKLOG
#define TCP_BACKLOG
number of queued TCP connections for listen()
Definition: listen_dnsport.c:74
sldns_enum_hash
sldns_enum_hash
Hashing algorithms used in the DS record.
Definition: rrdef.h:389
auth_zone_set_fallback
int auth_zone_set_fallback(struct auth_zone *z, char *fallbackstr)
set auth zone fallback.
Definition: authzone.c:572
neg_nsec3_proof_ds
static struct dns_msg * neg_nsec3_proof_ds(struct val_neg_zone *zone, uint8_t *qname, size_t qname_len, int qlabs, sldns_buffer *buf, struct rrset_cache *rrset_cache, struct regional *region, time_t now, uint8_t *topname)
neg cache nsec3 proof procedure
Definition: val_neg.c:1349
dt_msg_queue::first
struct dt_msg_entry * first
list of messages.
Definition: dtstream.h:73
calc_rto
static int calc_rto(const struct rtt_info *rtt)
calculate RTO from rtt information
Definition: rtt.c:50
xfr_transfer_nexttarget_or_end
static void xfr_transfer_nexttarget_or_end(struct auth_xfer *xfr, struct module_env *env)
perform next lookup, next transfer TCP, or end and resume wait time task
Definition: authzone.c:5239
ub_ctx_set_stub
int ub_ctx_set_stub(struct ub_ctx *ctx, const char *zone, const char *addr, int isprime)
Add a stub zone, with given address to send to.
Definition: libunbound.c:990
test_slabhash_sizefunc
size_t test_slabhash_sizefunc(void *, void *)
test sizefunc for lruhash
alloc_clear
void alloc_clear(struct alloc_cache *alloc)
Free the alloc.
Definition: alloc.c:160
respip_client_info
Client-specific attributes that can affect IP-based actions.
Definition: respip.h:64
mesh_reply::start_time
struct timeval start_time
the time when request was entered
Definition: mesh.h:224
val_anchors::tree
rbtree_type * tree
Anchors are store in this tree.
Definition: val_anchor.h:69
sldns_wire2str_time_scan
int sldns_wire2str_time_scan(uint8_t **data, size_t *data_len, char **str, size_t *str_len)
Scan wireformat time field to string, with user buffers.
Definition: wire2str.c:1347
VAL_CLASS_CNAME
@ VAL_CLASS_CNAME
A positive response, with a CNAME/DNAME chain.
Definition: val_utils.h:69
perfinfo::total_sent
size_t total_sent
total number sent
Definition: perf.c:105
config_file::respip_tags
struct config_strbytelist * respip_tags
list of IP-netblock, tagbitlist
Definition: config_file.h:423
server_stats_obtain
void server_stats_obtain(struct worker *worker, struct worker *who, struct ub_stats_info *s, int reset)
Obtain the stats info for a given thread.
Definition: stats.c:361
FINISHED_STATE
@ FINISHED_STATE
Responses that are to be returned upstream end at this state.
Definition: iterator.h:216
key_entry_create_null
struct key_entry_key * key_entry_create_null(struct regional *region, uint8_t *name, size_t namelen, uint16_t dclass, time_t ttl, time_t now)
Create a null entry, in the given region.
Definition: val_kentry.c:278
ratelimit_list_arg
struct for user arg ratelimit list
Definition: remote.c:2783
replay_scenario::mom_last
struct replay_moment * mom_last
The last element in list of replay moments.
Definition: replay.h:162
config_stub::addrs
struct config_strlist * addrs
list of stub nameserver addresses (IP address)
Definition: config_file.h:640
config_file::donotqueryaddrs
struct config_strlist * donotqueryaddrs
list of donotquery addresses, linked list
Definition: config_file.h:218
val_neg_cache
The negative cache.
Definition: val_neg.h:67
infra_set_lame
int infra_set_lame(struct infra_cache *infra, struct sockaddr_storage *addr, socklen_t addrlen, uint8_t *nm, size_t nmlen, time_t timenow, int dnsseclame, int reclame, uint16_t qtype)
Set a host to be lame for the given zone.
Definition: infra.c:506
auth_zone::namelabs
int namelabs
number of labels in zone name
Definition: authzone.h:105
module_qstate::return_msg
struct dns_msg * return_msg
the reply message, with message for client and calling module
Definition: module.h:610
usage
static void usage(void)
Give unbound-control usage, and exit (1).
Definition: unbound-control.c:81
module_ext_state
module_ext_state
External visible states of the module state machine Modules may also have an internal state.
Definition: module.h:533
change_section
static void change_section(struct msg_parse *msg, struct rrset_parse *rrset, sldns_pkt_section section)
change section of rrset from previous to current section
Definition: msgparse.c:280
canon_rr::rrset
struct ub_packed_rrset_key * rrset
rrset the RR is in
Definition: val_sigcrypt.c:642
comm_timer_delete
void comm_timer_delete(struct comm_timer *timer)
delete timer.
Definition: netevent.c:3333
service_start
static void service_start(const char *cfgfile, int v, int c)
start the service
Definition: win_svc.c:474
comm_point_local_handle_callback
void comm_point_local_handle_callback(int fd, short event, void *arg)
This routine is published for checks and tests, and is only used internally.
Definition: netevent.c:2484
outside_network::tcp_free
struct pending_tcp * tcp_free
list of tcp comm points that are free for use
Definition: outside_network.h:158
mesh_area::ans_secure
size_t ans_secure
(extended stats) secure replies
Definition: mesh.h:124
module_env::fwds
struct iter_forwards * fwds
Mapping of forwarding zones to targets.
Definition: module.h:501
do_stub_add
static void do_stub_add(RES *ssl, struct worker *worker, char *args)
do the stub_add command
Definition: remote.c:2177
testbound_selftest
void testbound_selftest(void)
testbounds self test
Definition: replay.c:936
service_send
static void service_send(struct ringbuf *ring, struct timeval *now, sldns_buffer *pkt, struct sockaddr_storage *srv_addr, socklen_t srv_len)
send out waiting packets
Definition: delayer.c:356
local_zone_does_not_cover
static int local_zone_does_not_cover(struct local_zone *z, struct query_info *qinfo, int labs)
See if the local zone does not cover the name, eg.
Definition: localzone.c:1492
replay_scenario::mom_first
struct replay_moment * mom_first
The list of replay moments.
Definition: replay.h:160
nsec3_prove_closest_encloser
static enum sec_status nsec3_prove_closest_encloser(struct module_env *env, struct nsec3_filter *flt, rbtree_type *ct, struct query_info *qinfo, int prove_does_not_exist, struct ce_response *ce)
proveClosestEncloser Given a List of nsec3 RRs, find and prove the closest encloser to qname.
Definition: val_nsec3.c:942
local_zone_override::node
struct addr_tree_node node
node in addrtree
Definition: localzone.h:192
fake_pending::buffer
struct sldns_buffer * buffer
what is important only that we remember the query, copied here.
Definition: replay.h:330
rbtree_type::count
size_t count
The number of the nodes in the tree.
Definition: rbtree.h:81
val_qstate::orig_msg
struct dns_msg * orig_msg
The original message we have been given to validate.
Definition: validator.h:156
macro_assign
int macro_assign(rbtree_type *store, char *name, char *value)
Set macro value.
Definition: replay.c:909
sldns_wire2str_rr_unknown_buf
int sldns_wire2str_rr_unknown_buf(uint8_t *rr, size_t rr_len, char *str, size_t str_len)
3597 printout of an RR in unknown rr format.
Definition: wire2str.c:273
process_bind_contents
static int process_bind_contents(struct val_anchors *anchors, sldns_buffer *buf, int *line, FILE *in)
read contents of trusted-keys{ ...
Definition: val_anchor.c:636
ident
static const char * ident
the identity of this executable/process
Definition: log.c:76
str_is_ip6
int str_is_ip6(const char *str)
callback TLS session ticket encrypt and decrypt For use with SSL_CTX_set_tlsext_ticket_key_cb or SSL_...
Definition: net_help.c:113
iter_qstate::dp
struct delegpt * dp
This is the current delegation point for an in-progress query.
Definition: iterator.h:283
server_stats_insquery
void server_stats_insquery(struct ub_server_stats *stats, struct comm_point *c, uint16_t qtype, uint16_t qclass, struct edns_data *edns, struct comm_reply *repinfo)
Add stats for this query.
Definition: stats.c:467
timehist_log
void timehist_log(struct timehist *hist, const char *name)
Log histogram, print it to the logfile.
Definition: timehist.c:164
delegpt_get_mem
size_t delegpt_get_mem(struct delegpt *dp)
get memory in use by dp
Definition: iter_delegpt.c:669
sldns_buffer_limit
INLINE size_t sldns_buffer_limit(sldns_buffer *buffer)
returns the maximum size of the buffer
Definition: sbuffer.h:271
fptr_whitelist_hash_deldatafunc
int fptr_whitelist_hash_deldatafunc(lruhash_deldatafunc_type fptr)
Check function pointer whitelist for lruhash deldata callback values.
Definition: fptr_wlist.c:303
pending_matches_current
static int pending_matches_current(struct replay_runtime *runtime, struct entry **entry, struct fake_pending **pend)
return: true if pending query matches the now event.
Definition: fake_event.c:202
mesh_make_new_space
int mesh_make_new_space(struct mesh_area *mesh, struct sldns_buffer *qbuf)
Make space for another recursion state for a reply in the mesh.
Definition: mesh.c:323
fptr_whitelist_modenv_kill_sub
int fptr_whitelist_modenv_kill_sub(void(*fptr)(struct module_qstate *newq))
Check function pointer whitelist for module_env kill_sub callback values.
Definition: fptr_wlist.c:373
ub_timer_add
int ub_timer_add(struct ub_event *ev, struct ub_event_base *base, void(*cb)(int, short, void *), void *arg, struct timeval *tv)
Reconfigure and activate a timeout event.
Definition: ub_event_pluggable.c:607
log_crypto_err
void log_crypto_err(const char *str)
Log libcrypto error with descriptive string.
Definition: net_help.c:834
rrset_parse_equals
static int rrset_parse_equals(struct rrset_parse *p, sldns_buffer *pkt, hashvalue_type h, uint32_t rrset_flags, uint8_t *dname, size_t dnamelen, uint16_t type, uint16_t dclass)
compare rrset_parse with data
Definition: msgparse.c:208
iter_inform_super
void iter_inform_super(struct module_qstate *qstate, int id, struct module_qstate *super)
Return priming query results to interested super querystates.
Definition: iterator.c:3588
rbtree_null_node
rbnode_type rbtree_null_node
the NULL node, global alloc
Definition: rbtree.c:53
optarg
char * optarg
getopt global, in case header files fail to declare it.
dnskey_verify_rrset
enum sec_status dnskey_verify_rrset(struct module_env *env, struct val_env *ve, struct ub_packed_rrset_key *rrset, struct ub_packed_rrset_key *dnskey, size_t dnskey_idx, char **reason, sldns_pkt_section section, struct module_qstate *qstate)
verify rrset against one specific dnskey (from rrset)
Definition: val_sigcrypt.c:555
iter_scrub_nxdomain
void iter_scrub_nxdomain(struct dns_msg *msg)
Prepare an NXDOMAIN message to be used for a subdomain answer by removing all RRs from the ANSWER sec...
Definition: iter_utils.c:1272
listen_delete
void listen_delete(struct listen_dnsport *listen)
delete the listening structure
Definition: fake_event.c:892
prealloc_setup
static void prealloc_setup(struct alloc_cache *alloc)
prealloc some entries in the cache.
Definition: alloc.c:67
auth_zone_generate_answer
static int auth_zone_generate_answer(struct auth_zone *z, struct query_info *qinfo, struct regional *region, struct dns_msg **msg, int *fallback)
Lookup answer in a zone.
Definition: authzone.c:3187
rrset_ref::id
rrset_id_type id
id needed
Definition: msgreply.h:108
do_flush_type
static void do_flush_type(RES *ssl, struct worker *worker, char *arg)
flush a type
Definition: remote.c:1568
pending_delete
void pending_delete(struct outside_network *outnet, struct pending *p)
Delete pending answer.
Definition: outside_network.c:1001
optarg
char * optarg
getopt global, in case header files fail to declare it.
sldns_wire2str_rrquestion_buf
int sldns_wire2str_rrquestion_buf(uint8_t *d, size_t dlen, char *s, size_t slen)
Convert question RR to string presentation format, on one line.
Definition: wire2str.c:259
fstrm_create_control_frame_stop
void * fstrm_create_control_frame_stop(size_t *len)
This creates an FSTRM control frame of type STOP.
Definition: dnstap_fstrm.c:75
fptr_whitelist_mod_clear
int fptr_whitelist_mod_clear(void(*fptr)(struct module_qstate *qstate, int id))
Check function pointer whitelist for module clear call values.
Definition: fptr_wlist.c:503
replay_scenario
A replay scenario.
Definition: replay.h:155
iter_clear
void iter_clear(struct module_qstate *qstate, int id)
iterator cleanup query state
Definition: iterator.c:3913
remove_item
static void remove_item(struct val_neg_cache *neg)
remove a random item
Definition: unitneg.c:243
waiting_tcp::timer
struct comm_timer * timer
timeout event; timer keeps running whether the query is waiting for a buffer or the tcp reply is pend...
Definition: outside_network.h:277
log_vmsg
void log_vmsg(int pri, const char *type, const char *format, va_list args)
va_list argument version of log_info.
Definition: log.c:220
alloc_reg_release
void alloc_reg_release(struct alloc_cache *alloc, struct regional *r)
Put regional for query states back into alloc cache.
Definition: alloc.c:342
respip_set
Conceptual set of IP addresses for response AAAA or A records that should trigger special actions.
Definition: respip.h:23
mesh_run
void mesh_run(struct mesh_area *mesh, struct mesh_state *mstate, enum module_ev ev, struct outbound_entry *e)
Run the mesh.
Definition: mesh.c:1668
local_zone_redirect
@ local_zone_redirect
answer with data at zone apex
Definition: localzone.h:79
entry_add_reply
static struct reply_packet * entry_add_reply(struct entry *entry)
Add reply packet to entry.
Definition: testpkts.c:92
replay_moment_read
static struct replay_moment * replay_moment_read(char *remain, FILE *in, const char *name, struct sldns_file_parse_state *pstate)
Read a replay moment 'STEP' from file.
Definition: replay.c:268
mesh_area::replies_sent
size_t replies_sent
number of replies sent
Definition: mesh.h:118
lz_enter_rr_into_zone
static int lz_enter_rr_into_zone(struct local_zone *z, const char *rrstr)
enter data RR into auth zone
Definition: localzone.c:522
dns64_always_synth_for_qname
static int dns64_always_synth_for_qname(struct module_qstate *qstate, int id)
See if query name is in the always synth config.
Definition: dns64.c:544
REGIONAL_CHUNK_SIZE
#define REGIONAL_CHUNK_SIZE
Default reasonable size for chunks.
Definition: regional.c:56
pythonmod_env
Global state for the module.
Definition: pythonmod.c:79
wsvc_desetup_worker
void wsvc_desetup_worker(struct worker *worker)
Desetup lead worker events.
Definition: win_svc.c:627
val_neg_zone::node
rbnode_type node
rbtree node element, key is this struct: the name, class
Definition: val_neg.h:96
LDNS_RDF_TYPE_LONG_STR
@ LDNS_RDF_TYPE_LONG_STR
A <character-string> encoding of the value field as specified [RFC1035], Section 5....
Definition: rrdef.h:350
deleg_remove_nonsecure_additional
static void deleg_remove_nonsecure_additional(struct reply_info *rep)
remove nonsecure from a delegation referral additional section
Definition: worker.c:448
config_lookup_uid
void config_lookup_uid(struct config_file *config)
Find username, sets cfg_uid and cfg_gid.
Definition: config_file.c:2048
perfinfo::by_rcode
size_t by_rcode[32]
numbers by rcode
Definition: perf.c:107
track_id::id
int id
the id to pass to libunbound to cancel
Definition: asynclook.c:72
delegpt_no_ipv6
void delegpt_no_ipv6(struct delegpt *dp)
Register the fact that there is no ipv6 and thus AAAAs are not going to be queried for or be useful.
Definition: iter_delegpt.c:510
nsec3_get_hashed
size_t nsec3_get_hashed(struct sldns_buffer *buf, uint8_t *nm, size_t nmlen, int algo, size_t iter, uint8_t *salt, size_t saltlen, uint8_t *res, size_t max)
Get NSEC3 hashed in a buffer.
Definition: val_nsec3.c:536
rrset_parse::rr_first
struct rr_parse * rr_first
linked list of RRs in this rrset.
Definition: msgparse.h:167
mesh_area::stats_dropped
size_t stats_dropped
stats, cumulative number of incoming client msgs dropped
Definition: mesh.h:114
xfr_probe_move_to_next_lookup
static void xfr_probe_move_to_next_lookup(struct auth_xfer *xfr, struct module_env *env)
move to the next lookup of hostname for task_probe
Definition: authzone.c:3796
check_order
static void check_order(rbtree_type *all_locks)
Check ordering of locks.
Definition: lock_verify.c:370
sock_list::next
struct sock_list * next
next in list
Definition: module.h:576
comm_base_delete
void comm_base_delete(struct comm_base *b)
Destroy a comm base.
Definition: fake_event.c:913
MESH_MAX_ACTIVATION
#define MESH_MAX_ACTIVATION
Maximum number of mesh state activations.
Definition: mesh.h:70
config_file::tls_ciphers
char * tls_ciphers
TLS ciphers.
Definition: config_file.h:128
hints_lookup_root
struct delegpt * hints_lookup_root(struct iter_hints *hints, uint16_t qclass)
Find root hints for the given class.
Definition: iter_hints.c:460
rrset_get_sigcount
static size_t rrset_get_sigcount(struct ub_packed_rrset_key *k)
Get RR signature count.
Definition: val_sigcrypt.c:95
sldns_buffer_set_capacity
int sldns_buffer_set_capacity(sldns_buffer *buffer, size_t capacity)
changes the buffer's capacity.
Definition: sbuffer.c:74
auth_zones_read_zones
static int auth_zones_read_zones(struct auth_zones *az, struct config_file *cfg)
read all auth zones from file (if they have)
Definition: authzone.c:1746
addr_tree_node::parent
struct addr_tree_node * parent
parent in tree
Definition: dnstree.h:81
log_addr
void log_addr(enum verbosity_value v, const char *str, struct sockaddr_storage *addr, socklen_t addrlen)
Prints the sockaddr in readable format with log_info.
Definition: net_help.c:189
generate_request
static int generate_request(struct module_qstate *qstate, int id, uint8_t *name, size_t namelen, uint16_t qtype, uint16_t qclass, uint16_t flags, struct module_qstate **newq, int detached)
Generate a request for DNS data.
Definition: validator.c:379
tcp_req_info_send_reply
void tcp_req_info_send_reply(struct tcp_req_info *req)
Send reply on tcp simultaneous answer channel.
Definition: listen_dnsport.c:1917
slabhash_testkey::id
int id
the key id
Definition: slabhash.h:207
rpz_find_zone
static struct local_zone * rpz_find_zone(struct rpz *r, uint8_t *qname, size_t qname_len, uint16_t qclass, int only_exact, int wr, int zones_keep_lock)
Find RPZ local-zone by qname.
Definition: rpz.c:655
comm_base_delete
void comm_base_delete(struct comm_base *b)
Destroy a comm base.
Definition: netevent.c:203
context_serialize_new_query
uint8_t * context_serialize_new_query(struct ctx_query *q, uint32_t *len)
Serialize a context query that questions data.
Definition: context.c:222
sldns_wire2str_opcode_print
int sldns_wire2str_opcode_print(char **s, size_t *slen, int opcode)
Print host format opcode to string.
Definition: wire2str.c:862
dns_msg::rep
struct reply_info * rep
reply info - ptr to packed repinfo structure
Definition: dns.h:65
xml_data::num_keys
int num_keys
number of keys usefully read in
Definition: unbound-anchor.c:1201
key_entry_isgood
int key_entry_isgood(struct key_entry_key *kkey)
See if this entry is good.
Definition: val_kentry.c:227
perf_sigh
static RETSIGTYPE perf_sigh(int sig)
signal handler for user quit
Definition: perf.c:151
comm_point
Communication point to the network These behaviours can be accomplished by setting the flags and pass...
Definition: netevent.h:155
val_neg.h
find_covering_nsec3
static int find_covering_nsec3(struct module_env *env, struct nsec3_filter *flt, rbtree_type *ct, uint8_t *nm, size_t nmlen, struct ub_packed_rrset_key **rrset, int *rr)
findCoveringNSEC3 Given a name, find a covering NSEC3 from among a list of NSEC3s.
Definition: val_nsec3.c:829
edns_known_option::opt_code
uint16_t opt_code
type of this edns option
Definition: module.h:217
memlowercmp
static int memlowercmp(uint8_t *p1, uint8_t *p2, uint8_t len)
Compare labels in memory, lowercase while comparing.
Definition: dname.c:471
ub_c_lex_destroy
int ub_c_lex_destroy(void)
remove buffers for parsing and init
del_macro
static void del_macro(rbnode_type *x, void *ATTR_UNUSED(arg))
helper function to delete macro values
Definition: replay.c:571
config_file::remote_control_enable
int remote_control_enable
remote control section.
Definition: config_file.h:434
port_if::avail_total
int avail_total
the total number of available ports (size of the array)
Definition: outside_network.h:184
replay_range_read
static struct replay_range * replay_range_read(char *remain, FILE *in, const char *name, struct sldns_file_parse_state *pstate, char *line)
Read a range from file.
Definition: replay.c:151
comm_base::start_accept
void(* start_accept)(void *)
callback to start listening on accept sockets, performed after stop_accept() then a timeout has passe...
Definition: netevent.h:105
replay_moment::string
char * string
string argument, for assign.
Definition: replay.h:235
ub_server_stats::ans_expired
long long ans_expired
expired answers served from cache
Definition: unbound.h:741
sec_status
sec_status
Security status from validation for data.
Definition: packed_rrset.h:176
wsvc_rc_start
void wsvc_rc_start(FILE *out)
Start the service from servicecontrolmanager, tells OS to start daemon.
Definition: w_inst.c:275
key_entry_hash
void key_entry_hash(struct key_entry_key *kk)
calculate hash for key entry
Definition: val_kentry.c:102
reclaim_http_handler
static void reclaim_http_handler(struct comm_point *c)
Make http handler free for next assignment.
Definition: netevent.c:1840
rrset_trust
rrset_trust
RRset trustworthiness.
Definition: packed_rrset.h:140
tube_queue_item
int tube_queue_item(struct tube *tube, uint8_t *msg, size_t len)
Append data item to background list of writes.
Definition: tube.c:455
canon_rr
RR entries in a canonical sorted tree of RRs.
Definition: val_sigcrypt.c:638
bin_split
void bin_split(struct lruhash *table, struct lruhash_bin *newa, int newmask)
Split hash bin into two new ones.
Definition: lruhash.c:117
auth_addr::addrlen
socklen_t addrlen
addr length
Definition: authzone.h:428
lookinfo::result
struct ub_result * result
result from lookup
Definition: asynclook.c:90
sldns_str2wire_nsap_buf
int sldns_str2wire_nsap_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_NSAP from string to wireformat.
Definition: str2wire.c:1785
comm_point_create_http_out
struct comm_point * comm_point_create_http_out(struct comm_base *base, size_t bufsize, comm_point_callback_type *callback, void *callback_arg, struct sldns_buffer *temp)
Create an outgoing HTTP commpoint.
Definition: netevent.c:2874
replay_get_oldest_timer
struct fake_timer * replay_get_oldest_timer(struct replay_runtime *runtime)
get oldest enabled fake timer
Definition: replay.c:547
BIT_QR
#define BIT_QR
QR flag.
Definition: net_help.h:71
log_edns_opt_list
void log_edns_opt_list(enum verbosity_value level, const char *info_str, struct edns_option *list)
Log the edns options in the edns option list.
Definition: msgparse.c:1111
delegpt::ssl_upstream
uint8_t ssl_upstream
use SSL for upstream query
Definition: iter_delegpt.h:85
mini_ev_cmp
int mini_ev_cmp(const void *a, const void *b)
compare events in tree, based on timevalue, ptr for uniqueness
infra_get_host_rto
long long infra_get_host_rto(struct infra_cache *infra, struct sockaddr_storage *addr, socklen_t addrlen, uint8_t *name, size_t namelen, struct rtt_info *rtt, int *delay, time_t timenow, int *tA, int *tAAAA, int *tother)
Get additional (debug) info on timing.
Definition: infra.c:615
main
int main(int argc, char *argv[])
Main routine for petal.
Definition: petal.c:611
dtio_mainfdcallback
void dtio_mainfdcallback(int fd, short bits, void *arg)
callback for unbound-dnstap-socket
packed_rrset::k
struct packed_rrset_key * k
domain name, type and class
Definition: packed_rrset.h:268
comm_point_create_tcp
struct comm_point * comm_point_create_tcp(struct comm_base *base, int fd, int num, int idle_timeout, struct tcl_list *tcp_conn_limit, size_t bufsize, struct sldns_buffer *spoolbuf, comm_point_callback_type *callback, void *callback_arg)
Create a TCP listener comm point.
Definition: netevent.c:2728
auth_probe::have_new_lease
int have_new_lease
we have seen a new lease this scan, because one of the masters replied with the current SOA serial ve...
Definition: authzone.h:327
fake_pending::pkt
uint8_t * pkt
the buffer parsed into a sldns_pkt
Definition: replay.h:351
config_collate_arg
collate func arg
Definition: config_file.c:755
test_slabhash_compfunc
int test_slabhash_compfunc(void *key1, void *key2)
test comparefunc for lruhash
Definition: slabhash.c:197
processDSNSResponse
static void processDSNSResponse(struct module_qstate *qstate, int id, struct module_qstate *forq)
Process response for DS NS Find queries, that attempt to find the delegation point where we ask the D...
Definition: iterator.c:3321
ub_c_error_msg
void ub_c_error_msg(const char *fmt,...) ATTR_FORMAT(printf
parsing helpers: print error with file and line numbers
val_neg_create
struct val_neg_cache * val_neg_create(struct config_file *cfg, size_t maxiter)
Create negative cache.
Definition: val_neg.c:86
config_file::dynlib_file
struct config_strlist * dynlib_file
Dynamic library file.
Definition: config_file.h:454
LDNS_RR_TYPE_CNAME
@ LDNS_RR_TYPE_CNAME
the canonical name for an alias
Definition: rrdef.h:93
acl_list_tag_data_cfg
static int acl_list_tag_data_cfg(struct acl_list *acl, struct config_file *cfg, const char *str, const char *tag, const char *data)
apply acl_tag_data string
Definition: acl_list.c:283
worker::ports
int * ports
ports to be used by this worker.
Definition: worker.h:98
dtio_read_frame_free
static void dtio_read_frame_free(struct dt_frame_read_buf *rb)
delete the buffer and counters used to read frame
Definition: dtstream.c:564
alloc_special_next
#define alloc_special_next(x)
access next pointer.
Definition: alloc.h:60
proxy::lastuse
struct timeval lastuse
last time this was used
Definition: delayer.c:80
lruhash_create
struct lruhash * lruhash_create(size_t start_size, size_t maxmem, lruhash_sizefunc_type sizefunc, lruhash_compfunc_type compfunc, lruhash_delkeyfunc_type delkeyfunc, lruhash_deldatafunc_type deldatafunc, void *arg)
Create new hash table.
Definition: lruhash.c:62
S_SIZET_NONZERO
#define S_SIZET_NONZERO(str, var)
put integer_nonzero into size_t
Definition: config_file.c:409
sldns_rr_descript
const sldns_rr_descriptor * sldns_rr_descript(uint16_t type)
returns the resource record descriptor for the given rr type.
Definition: rrdef.c:631
libworker_handle_service_reply
int libworker_handle_service_reply(struct comm_point *c, void *arg, int error, struct comm_reply *reply_info)
process incoming serviced query replies from the network
Definition: libworker.c:905
replay_runtime::infra
struct infra_cache * infra
ref the infra cache (was passed to outside_network_create)
Definition: replay.h:299
setup_local_list
static void setup_local_list(struct main_tap_data *maindata, struct config_strlist_head *local_list)
setup local accept sockets
Definition: unbound-dnstap-socket.c:1155
rpz_create
struct rpz * rpz_create(struct config_auth *p)
Create RPZ.
Definition: rpz.c:382
listen_type_udpancil_dnscrypt
@ listen_type_udpancil_dnscrypt
udp ipv6 (v4mapped) for use with ancillary data + dnscrypt
Definition: listen_dnsport.h:97
parse_url
static int parse_url(char *url, char **host, char **file, int *port, int *ssl)
parse URL into host and file parts, false on malloc or parse error
Definition: authzone.c:6846
rr_is_dnskey_revoked
static int rr_is_dnskey_revoked(uint16_t t, uint8_t *rdata, size_t len)
Check if REVOKED DNSKEY pass rdata without rdatalen in front of it.
Definition: autotrust.c:310
ub_event_base_loopexit
int ub_event_base_loopexit(struct ub_event_base *base)
exit that loop
Definition: ub_event_pluggable.c:497
no_data_for_rrsig
static int no_data_for_rrsig(struct reply_info *rep, struct ub_packed_rrset_key *rrsig)
check that there is no data element that matches the RRSIG
Definition: unitmsgparse.c:277
config_memsize_test
static void config_memsize_test(void)
test config_file: cfg_parse_memsize
Definition: unitmain.c:347
ub_event_new
struct ub_event * ub_event_new(struct ub_event_base *base, int fd, short bits, void(*cb)(int, short, void *), void *arg)
Create a new ub_event for the event base.
Definition: ub_event_pluggable.c:508
sldns_str2wire_period_buf
int sldns_str2wire_period_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_PERIOD from string to wireformat.
Definition: str2wire.c:1476
http_process_initial_header
static int http_process_initial_header(struct comm_point *c)
a http header is complete, process it
Definition: netevent.c:1985
check_chroot_string
static void check_chroot_string(const char *desc, char **ss, const char *chrootdir, struct config_file *cfg)
check chroot for a file string
Definition: unbound-checkconf.c:454
check_modules_exist
static void check_modules_exist(const char *module_conf)
check that the modules exist, are compiled in
Definition: unbound-checkconf.c:522
tomsg
struct dns_msg * tomsg(struct module_env *env, struct query_info *q, struct reply_info *r, struct regional *region, time_t now, int allow_expired, struct regional *scratch)
generate dns_msg from cached message
Definition: dns.c:538
mesh_get_mem
size_t mesh_get_mem(struct mesh_area *mesh)
Calculate memory size in use by mesh and all queries inside it.
Definition: mesh.c:1770
LDNS_RR_TYPE_OPENPGPKEY
@ LDNS_RR_TYPE_OPENPGPKEY
RFC 7344.
Definition: rrdef.h:196
process_one_header
static int process_one_header(char *buf, char *file, size_t flen, char *host, size_t hlen, int *vs)
process one http header
Definition: petal.c:191
iter_priv::region
struct regional * region
regional for allocation
Definition: iter_priv.h:57
algo_needs_set_bogus
void algo_needs_set_bogus(struct algo_needs *n, uint8_t algo)
Mark this algorithm a failure, sec_bogus.
Definition: val_sigcrypt.c:461
ext_thr_info::ctx
struct ub_ctx * ctx
context
Definition: asynclook.c:178
iter_env::max_dependency_depth
int max_dependency_depth
The maximum dependency depth that this resolver will pursue.
Definition: iterator.h:126
canonical_tree_compare
int canonical_tree_compare(const void *k1, const void *k2)
canonical compare for two tree entries
Definition: val_sigcrypt.c:879
sig_base
static struct ub_event_base * sig_base
signal variable
Definition: unbound-dnstap-socket.c:1201
respip_merge_cname
int respip_merge_cname(struct reply_info *base_rep, const struct query_info *qinfo, const struct reply_info *tgt_rep, const struct respip_client_info *cinfo, int must_validate, struct reply_info **new_repp, struct regional *region, struct auth_zones *az)
Merge two replies to build a complete CNAME chain.
Definition: respip.c:1162
anchor_find
struct trust_anchor * anchor_find(struct val_anchors *anchors, uint8_t *name, int namelabs, size_t namelen, uint16_t dclass)
Find a trust anchor.
Definition: val_anchor.c:197
mesh_attach_sub
int mesh_attach_sub(struct module_qstate *qstate, struct query_info *qinfo, uint16_t qflags, int prime, int valrec, struct module_qstate **newq)
Attach subquery.
Definition: mesh.c:1047
sldns_str2wire_ipseckey_buf
int sldns_str2wire_ipseckey_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_IPSECKEY from string to wireformat.
Definition: str2wire.c:1850
iter_forward_zone::node
rbnode_type node
redblacktree node, key is this structure: class and name
Definition: iter_fwd.h:68
comm_timer_create
struct comm_timer * comm_timer_create(struct comm_base *base, void(*cb)(void *), void *cb_arg)
create timer.
Definition: fake_event.c:1494
internal_base::base
struct ub_event_base * base
ub_event event_base type.
Definition: netevent.c:116
read_fwds_addr
static int read_fwds_addr(struct config_stub *s, struct delegpt *dp)
set fwd server addresses
Definition: iter_fwd.c:229
REMOTE_CONTROL_TCP_TIMEOUT
#define REMOTE_CONTROL_TCP_TIMEOUT
number of milliseconds timeout on incoming remote control handshake
Definition: remote.h:60
mesh_detach_subs
void mesh_detach_subs(struct module_qstate *qstate)
Detach-subqueries.
Definition: mesh.c:974
pick_random_ip
static struct ip_list * pick_random_ip(struct ip_list *list)
pick random unused element from IP list
Definition: unbound-anchor.c:693
sldns_wireparse_errors
struct sldns_struct_lookup_table * sldns_wireparse_errors
error string from wireparse
Definition: wire2str.c:154
dt_io_thread_apply_cfg
int dt_io_thread_apply_cfg(struct dt_io_thread *dtio, struct config_file *cfg)
Apply config to the dtio thread.
Definition: dtstream.c:257
reply_info
Structure to store DNS query and the reply packet.
Definition: msgreply.h:125
packed_rrset_key::type
uint16_t type
the rrset type in network format
Definition: packed_rrset.h:94
daemon_init
struct daemon * daemon_init(void)
Initialize daemon structure.
Definition: daemon.c:194
config_file::fast_server_num
size_t fast_server_num
number of fastest server to select from
Definition: config_file.h:178
tap_socket_new_tlsaccept
static struct tap_socket * tap_socket_new_tlsaccept(char *ip, void(*ev_cb)(int, short, void *), void *data, char *server_key, char *server_cert, char *verifypem)
create new socket (unconnected, not base-added), or NULL malloc fail
Definition: unbound-dnstap-socket.c:235
log_dns_msg
void log_dns_msg(const char *str, struct query_info *qinfo, struct reply_info *rep)
Debug send the query info and reply info to the log in readable form.
Definition: msgreply.c:820
parse_create_qinfo
static int parse_create_qinfo(sldns_buffer *pkt, struct msg_parse *msg, struct query_info *qinf, struct regional *region)
allocate qinfo, return 0 on error
Definition: msgreply.c:73
swap
#define swap(t, a, b)
Generic macro for swapping two variables.
Definition: dns64.c:150
find_NS
static struct ub_packed_rrset_key * find_NS(struct reply_info *rep, size_t from, size_t to)
find NS rrset in given list
Definition: iterator.c:2633
name_tree_init
void name_tree_init(rbtree_type *tree)
Init a name tree to be empty.
Definition: dnstree.c:74
do_macro_range
static char * do_macro_range(char *buf)
Do range macro on expanded buffer.
Definition: replay.c:775
replay_runtime::now_tv
struct timeval now_tv
the current time in microseconds
Definition: replay.h:304
worker::need_to_exit
int need_to_exit
do we need to restart or quit (on signal)
Definition: worker.h:115
fptr_whitelist_inplace_cb_query_response
int fptr_whitelist_inplace_cb_query_response(inplace_cb_query_response_func_type *fptr)
Check function pointer whitelist for inplace_cb_query_response func values.
Definition: fptr_wlist.c:664
log_nametypeclass
void log_nametypeclass(enum verbosity_value v, const char *str, uint8_t *name, uint16_t type, uint16_t dclass)
Print string with neat domain name, type and class.
Definition: net_help.c:481
ub_server_stats::num_query_dnscrypt_cert
long long num_query_dnscrypt_cert
number of queries that queried dnscrypt certificates
Definition: unbound.h:760
comm_point_create_udp
struct comm_point * comm_point_create_udp(struct comm_base *base, int fd, struct sldns_buffer *buffer, comm_point_callback_type *callback, void *callback_arg)
Create an UDP comm point.
Definition: netevent.c:2516
is_pow2
int is_pow2(size_t num)
See if number is a power of 2.
Definition: net_help.c:170
ipset_deinit
void ipset_deinit(struct module_env *env, int id)
Deinit the ipset module.
Definition: ipset.c:253
val_mark_insecure
void val_mark_insecure(struct reply_info *rep, uint8_t *kname, struct rrset_cache *r, struct module_env *env)
Mark all unchecked rrset entries below a NULL key entry as insecure.
Definition: val_utils.c:1031
dname_print
void dname_print(FILE *out, struct sldns_buffer *pkt, uint8_t *dname)
Debug helper.
Definition: dname.c:389
ctx_logfile_overridden
int ctx_logfile_overridden
store that the logfile has a debug override
Definition: libunbound.c:83
auth_chunk::next
struct auth_chunk * next
next chunk in list
Definition: authzone.h:457
val_qstate::dlv_insecure_at_len
size_t dlv_insecure_at_len
length of dlv insecure point name
Definition: validator.h:233
config_auth::for_upstream
int for_upstream
provide upstream answers
Definition: config_file.h:670
ub_ctx
The context structure.
Definition: context.h:65
pretty_rcode
static void pretty_rcode(char *s, size_t len, int r)
nice string for rcode
Definition: unbound-host.c:247
addrnode::ttl
time_t ttl
Abs time in seconds in which elem is meaningful.
Definition: addrtree.h:95
comm_point_send_udp_msg
int comm_point_send_udp_msg(struct comm_point *c, sldns_buffer *packet, struct sockaddr *addr, socklen_t addrlen)
Send an udp message over a commpoint.
Definition: netevent.c:335
lruhash_get_mem
size_t lruhash_get_mem(struct lruhash *table)
Get memory in use now by the lruhash table.
Definition: lruhash.c:493
outnet_tcp_connect
int outnet_tcp_connect(int s, struct sockaddr_storage *addr, socklen_t addrlen)
connect tcp connection to addr, 0 on failure
Definition: outside_network.c:270
sldns_wire2str_int16_data_scan
int sldns_wire2str_int16_data_scan(uint8_t **data, size_t *data_len, char **str, size_t *str_len)
Scan wireformat int16_data field to string, with user buffers.
Definition: wire2str.c:1628
sldns_wire2str_class_print
int sldns_wire2str_class_print(char **str, size_t *str_len, uint16_t rrclass)
Print host format rr class to string.
Definition: wire2str.c:880
LDNS_RR_TYPE_ISDN
@ LDNS_RR_TYPE_ISDN
RFC1183.
Definition: rrdef.h:123
testbound_usage
static void testbound_usage(void)
give commandline usage for testbound.
Definition: testbound.c:87
optind
int optind
getopt global, in case header files fail to declare it.
modstack_setup
int modstack_setup(struct module_stack *stack, const char *module_conf, struct module_env *env)
Setup modules.
Definition: modstack.c:223
is_file
static int is_file(const char *fname)
true if fname is a file
Definition: unbound-checkconf.c:401
verify_test
void verify_test(void)
unit test for verification functions
Definition: unitverify.c:506
az_find_name
static struct auth_data * az_find_name(struct auth_zone *z, uint8_t *nm, size_t nmlen)
find domain with exactly the given name
Definition: authzone.c:609
dname_has_label
int dname_has_label(uint8_t *dname, size_t dnamelen, uint8_t *label)
Check if dname contains label.
Definition: dname.c:592
mesh_area::num_reply_addrs
size_t num_reply_addrs
count of the total number of mesh_reply entries
Definition: mesh.h:94
cfg_convert_timeval
time_t cfg_convert_timeval(const char *str)
Convert 14digit to time value.
Definition: config_file.c:1808
respip_views_apply_cfg
int respip_views_apply_cfg(struct views *vs, struct config_file *cfg, int *have_view_respip_cfg)
Apply response-ip config settings in named views.
Definition: respip.c:417
dname_strict_subdomain_c
int dname_strict_subdomain_c(uint8_t *d1, uint8_t *d2)
Like dname_strict_subdomain but counts labels.
Definition: dname.c:693
perfio::fd
int fd
file descriptor of socket
Definition: perf.c:135
modstack_init
void modstack_init(struct module_stack *stack)
Init a stack of modules.
Definition: modstack.c:92
add_rr
static void add_rr(char *rrstr, uint8_t *pktbuf, size_t pktsize, size_t *pktlen, struct sldns_file_parse_state *pstate, sldns_pkt_section add_section, const char *fname)
add RR to packet
Definition: testpkts.c:458
outnet_comm_point_for_tcp
struct comm_point * outnet_comm_point_for_tcp(struct outside_network *outnet, comm_point_callback_type *cb, void *cb_arg, struct sockaddr_storage *to_addr, socklen_t to_addrlen, struct sldns_buffer *query, int timeout, int ssl, char *host)
Create tcp commpoint suitable for communication to the destination.
Definition: outside_network.c:2344
auth_zone::for_downstream
int for_downstream
for downstream: this zone answers queries towards the downstream clients
Definition: authzone.h:131
val_qstate::chase_reply
struct reply_info * chase_reply
The chased reply, extract from original message.
Definition: validator.h:177
pollit
static int pollit(int fd, struct timeval *t)
perform a select() on the fd
Definition: tube.c:397
iter_ds_toolow
int iter_ds_toolow(struct dns_msg *msg, struct delegpt *dp)
See if a DS response (type ANSWER) is too low: a nodata answer with a SOA record in the authority sec...
Definition: iter_utils.c:1330
event_reg_remove
static void event_reg_remove(FILE *out)
remove registry entries for eventlog
Definition: w_inst.c:131
edns_option::next
struct edns_option * next
next item in list
Definition: msgparse.h:235
optarg
char * optarg
getopt global, in case header files fail to declare it.
longformat
static int longformat
long format option, for multiline printout per message
Definition: unbound-dnstap-socket.c:92
MINIMAL_RESPONSES
int MINIMAL_RESPONSES
minimal responses when positive answer
Definition: net_help.c:71
fake_pending::tcp_pkt_counter
int tcp_pkt_counter
if we are handling a multi pkt tcp stream, non 0 and the pkt nr
Definition: replay.h:358
outside_network.h
dup_all
static char * dup_all(char *str)
dup string and print error on error
Definition: authzone.c:6822
config_file::shm_enable
int shm_enable
SHM data - true if shm is enabled.
Definition: config_file.h:552
LDNS_RDF_TYPE_INT16_DATA
@ LDNS_RDF_TYPE_INT16_DATA
variable length any type rdata where the length is specified by the first 2 bytes
Definition: rrdef.h:313
auth_zones_notify
int auth_zones_notify(struct auth_zones *az, struct module_env *env, uint8_t *nm, size_t nmlen, uint16_t dclass, struct sockaddr_storage *addr, socklen_t addrlen, int has_serial, uint32_t serial, int *refused)
process notify for auth zones.
Definition: authzone.c:3561
autr_ta::last_change
time_t last_change
last update of key state (new pending count keeps date the same)
Definition: autotrust.h:75
config_file::ratelimit_factor
int ratelimit_factor
ratelimit factor, 0 blocks all, 10 allows 1/10 of traffic
Definition: config_file.h:545
fake_dsa
int fake_dsa
fake DSA support for unit tests
Definition: val_secalgo.c:58
auth_xfer_create
struct auth_xfer * auth_xfer_create(struct auth_zones *az, struct auth_zone *z)
Create auth_xfer structure.
Definition: authzone.c:6771
edns_option::opt_len
size_t opt_len
length of this edns option (cannot exceed uint16 in encoding)
Definition: msgparse.h:239
ipsecmod_qstate
Per query state for the ipsecmod module.
Definition: ipsecmod.h:61
sldns_wire2str_atma_scan
int sldns_wire2str_atma_scan(uint8_t **data, size_t *data_len, char **str, size_t *str_len)
Scan wireformat ATMA field to string, with user buffers.
Definition: wire2str.c:1538
az_nsec3_get_nextcloser
static void az_nsec3_get_nextcloser(uint8_t *cenm, uint8_t *qname, size_t qname_len, uint8_t **nx, size_t *nxlen)
Return nextcloser name (as a ref into the qname).
Definition: authzone.c:2751
calc_data_need
static size_t calc_data_need(struct reply_info *rep)
Calculate space needed for the data and all its parents.
Definition: val_neg.c:324
xml_is_zone_name
static int xml_is_zone_name(BIO *zone, const char *name)
See if XML element equals the zone name.
Definition: unbound-anchor.c:1399
config_auth::rpz_taglist
uint8_t * rpz_taglist
rpz tags (or NULL)
Definition: config_file.h:677
fptr_whitelist_comm_point_raw
int fptr_whitelist_comm_point_raw(comm_point_callback_type *fptr)
Check function pointer whitelist for raw comm_point callback values.
Definition: fptr_wlist.c:117
comm_base_create_event
struct comm_base * comm_base_create_event(struct ub_event_base *base)
Create comm base that uses the given ub_event_base (underlying pluggable event mechanism pointer).
Definition: netevent.c:186
dtio_setup_reconnect
static void dtio_setup_reconnect(struct dt_io_thread *dtio)
setup the reconnect event for dnstap io
Definition: dtstream.c:1552
fptr_whitelist_mod_get_mem
int fptr_whitelist_mod_get_mem(size_t(*fptr)(struct module_env *env, int id))
Check function pointer whitelist for module get_mem call values.
Definition: fptr_wlist.c:532
local_zones_add_RR
int local_zones_add_RR(struct local_zones *zones, const char *rr)
Add RR data into the localzone data.
Definition: localzone.c:1881
tcl_addr_lookup
struct tcl_addr * tcl_addr_lookup(struct tcl_list *tcl, struct sockaddr_storage *addr, socklen_t addrlen)
Lookup address to see its TCP connection limit structure.
Definition: tcp_conn_limit.c:182
dt_io_thread::accept_frame_received
int accept_frame_received
Set if valid ACCEPT frame is received.
Definition: dtstream.h:204
msgparse_test
void msgparse_test(void)
unit test for msgreply and msgparse
Definition: unitmsgparse.c:503
acl_list_delete
void acl_list_delete(struct acl_list *acl)
Delete acl structure.
Definition: acl_list.c:67
rtt_update
void rtt_update(struct rtt_info *rtt, int ms)
Update the statistics with a new roundtrip estimate observation.
Definition: rtt.c:89
log_crypto_err_code
void log_crypto_err_code(const char *str, unsigned long err)
Log libcrypto error from errcode with descriptive string, calls log_err.
Definition: net_help.c:843
log_lock
static lock_basic_type log_lock
pthread mutex to protect FILE*
Definition: log.c:73
STACK_OF
static STACK_OF(X509)
read certificates from a PEM bio
Definition: unbound-anchor.c:348
ub_resolve_async
int ub_resolve_async(struct ub_ctx *ctx, const char *name, int rrtype, int rrclass, void *mydata, ub_callback_type callback, int *async_id)
Perform resolution and validation of the target name.
Definition: libunbound.c:766
comm_point::tcp_do_toggle_rw
int tcp_do_toggle_rw
if set, read/write completes: read/write state of tcp is toggled.
Definition: netevent.h:255
config_file::rrset_cache_size
size_t rrset_cache_size
size of the rrset cache
Definition: config_file.h:158
auth_xfer_probe_udp_callback
int auth_xfer_probe_udp_callback(struct comm_point *c, void *arg, int err, struct comm_reply *repinfo)
callback for commpoint udp replies to task_probe
Definition: authzone.c:6157
DTIO_COMMAND_WAKEUP
@ DTIO_COMMAND_WAKEUP
DTIO command channel wakeup.
Definition: dtstream.c:81
config_file::dnstap_ip
char * dnstap_ip
dnstap IP
Definition: config_file.h:489
val_anchors::dlv_anchor
struct trust_anchor * dlv_anchor
The DLV trust anchor (if one is configured, else NULL)
Definition: val_anchor.h:71
config_file::acls
struct config_str2list * acls
list of access control entries, linked list
Definition: config_file.h:240
val_neg_data::in_use
uint8_t in_use
if this element is in use, boolean
Definition: val_neg.h:169
stream_wait_max
size_t stream_wait_max
size (in bytes) of stream wait buffers max
Definition: config_file.c:80
val_find_rrset_signer
void val_find_rrset_signer(struct ub_packed_rrset_key *rrset, uint8_t **sname, size_t *slen)
Find the signer name for an RRset.
Definition: val_utils.c:160
config_file::python_script
struct config_strlist * python_script
Python script file.
Definition: config_file.h:451
auth_xfer_probe_timer_callback
void auth_xfer_probe_timer_callback(void *arg)
callback for task_probe timer
Definition: authzone.c:6122
donotq_insert
static int donotq_insert(struct iter_donotq *dq, struct sockaddr_storage *addr, socklen_t addrlen, int net)
insert new address into donotq structure
Definition: iter_donotq.c:77
lookinfo
result list for the lookups
Definition: asynclook.c:82
mesh_detect_cycle_found
static int mesh_detect_cycle_found(struct module_qstate *qstate, struct mesh_state *dep_m)
find cycle for already looked up mesh_state
Definition: mesh.c:960
auth_xfer::notify_has_serial
int notify_has_serial
true if the notify_received has a serial number
Definition: authzone.h:239
rrset_canonical_equal
int rrset_canonical_equal(struct regional *region, struct ub_packed_rrset_key *k1, struct ub_packed_rrset_key *k2)
Compare two rrsets and see if they are the same, canonicalised.
Definition: val_sigcrypt.c:1053
outnet_comm_point_for_http
struct comm_point * outnet_comm_point_for_http(struct outside_network *outnet, comm_point_callback_type *cb, void *cb_arg, struct sockaddr_storage *to_addr, socklen_t to_addrlen, int timeout, int ssl, char *host, char *path)
Create http commpoint suitable for communication to the destination.
Definition: fake_event.c:1704
add_trustanchor_frm_rr
static struct autr_ta * add_trustanchor_frm_rr(struct val_anchors *anchors, uint8_t *rr, size_t rr_len, size_t dname_len, struct trust_anchor **tp)
Add trust anchor from RR.
Definition: autotrust.c:440
az_domain_go_up
static struct auth_data * az_domain_go_up(struct auth_zone *z, struct auth_data *n)
go up the auth tree to next existing name.
Definition: authzone.c:2214
dname_lab_startswith
int dname_lab_startswith(uint8_t *label, char *prefix, char **endptr)
Check if labels starts with given prefix.
Definition: dname.c:569
optarg
char * optarg
getopt global, in case header files fail to declare it.
ipstrtoaddr
int ipstrtoaddr(const char *ip, int port, struct sockaddr_storage *addr, socklen_t *addrlen)
Convert ip address string and port to sockaddr.
Definition: net_help.c:247
LDNS_RR_TYPE_MD
@ LDNS_RR_TYPE_MD
a mail destination (Obsolete - use MX)
Definition: rrdef.h:89
do_list_forwards
static void do_list_forwards(RES *ssl, struct worker *worker)
do the list_forwards command
Definition: remote.c:2605
dname_test_iswild
static void dname_test_iswild(void)
test dname_is_wild routine
Definition: unitdname.c:500
parse_ip_addr
static struct ip_list * parse_ip_addr(const char *str, int port)
parse a text IP address into a sockaddr
Definition: unbound-anchor.c:583
LDNS_RDF_TYPE_NSEC3_SALT
@ LDNS_RDF_TYPE_NSEC3_SALT
nsec3 hash salt
Definition: rrdef.h:327
data_entry_init
static void data_entry_init(struct infra_cache *infra, struct lruhash_entry *e, time_t timenow)
init the data elements
Definition: infra.c:378
sldns_file_parse_state::default_ttl
uint32_t default_ttl
default TTL, this is used if the text does not specify a TTL, host byteorder
Definition: str2wire.h:229
setup_http_request
static int setup_http_request(sldns_buffer *buf, char *host, char *path)
setup http request headers in buffer for sending query to destination
Definition: outside_network.c:2386
module_env::detach_subs
void(* detach_subs)(struct module_qstate *qstate)
Detach-subqueries.
Definition: module.h:379
ub_event_vmt::add
int(* add)(struct ub_event *, struct timeval *)
Activate the event.
Definition: unbound-event.h:138
regional
the regional* is the first block*.
Definition: regional.h:60
mesh_do_callback
static void mesh_do_callback(struct mesh_state *m, int rcode, struct reply_info *rep, struct mesh_cb *r)
callback results to mesh cb entry
Definition: mesh.c:1114
query_dname_tolower
void query_dname_tolower(uint8_t *dname)
lowercase query dname
Definition: dname.c:135
dynlibmod_inform_super
void dynlibmod_inform_super(struct module_qstate *qstate, int id, struct module_qstate *super)
dynlib module
Definition: dynlibmod.c:186
query_dname_compare
int query_dname_compare(register uint8_t *d1, register uint8_t *d2)
compare uncompressed, noncanonical, registers are hints for speed
Definition: dname.c:100
msgtostr
static char * msgtostr(struct dns_msg *msg)
create string for message
Definition: unitauth.c:702
mesh_area::env
struct module_env * env
environment for new states
Definition: mesh.h:86
rdata_duplicate
static int rdata_duplicate(struct packed_rrset_data *d, uint8_t *rdata, size_t len)
see if rdata is duplicate
Definition: authzone.c:700
localzone.h
az_setall_deleted
static void az_setall_deleted(struct auth_zones *az)
set all auth zones deleted, then in auth_zones_cfg, it marks them as nondeleted (if they are still in...
Definition: authzone.c:1952
slabhash.h
daemon_apply_cfg
void daemon_apply_cfg(struct daemon *daemon, struct config_file *cfg)
Apply config settings.
Definition: daemon.c:816
cachedb_env::backend_data
void * backend_data
backend specific data here
Definition: cachedb.h:58
outnet_comm_point_for_http
struct comm_point * outnet_comm_point_for_http(struct outside_network *outnet, comm_point_callback_type *cb, void *cb_arg, struct sockaddr_storage *to_addr, socklen_t to_addrlen, int timeout, int ssl, char *host, char *path)
Create http commpoint suitable for communication to the destination.
Definition: outside_network.c:2405
log_rrset_key
void log_rrset_key(enum verbosity_value v, const char *str, struct ub_packed_rrset_key *rrset)
Print string with neat domain name, type, class from rrset.
Definition: packed_rrset.c:263
alloc_reg_obtain
struct regional * alloc_reg_obtain(struct alloc_cache *alloc)
Get a new regional for query states.
Definition: alloc.c:329
UB_PIPE
@ UB_PIPE
error in pipe communication with async bg worker
Definition: context.h:201
VAL_MAX_RESTART_COUNT
#define VAL_MAX_RESTART_COUNT
max number of query restarts, number of IPs to probe
Definition: validator.h:68
port_if::maxout
int maxout
max number of fds, size of out array
Definition: outside_network.h:191
rbtree_init
void rbtree_init(rbtree_type *rbtree, int(*cmpf)(const void *, const void *))
Init a new tree (malloced by caller) with given key compare function.
Definition: rbtree.c:95
iter_forwards
Iterator forward zones structure.
Definition: iter_fwd.h:52
optarg
char * optarg
getopt global, in case header files fail to declare it.
verify_rrset
static void verify_rrset(struct respip_set *set, const char *ipstr, const char *rdatastr, size_t rdi, uint16_t type)
find the respip address node in the specified tree (by address lookup) and verify type and address of...
Definition: unitmain.c:712
xfr_master_add_addrs
static void xfr_master_add_addrs(struct auth_master *m, struct ub_packed_rrset_key *rrset, uint16_t rrtype)
add addrs from A or AAAA rrset to the master
Definition: authzone.c:5292
mesh_area::ans_rcode
size_t ans_rcode[UB_STATS_RCODE_NUM]
(extended stats) rcodes in replies
Definition: mesh.h:128
lruhash_lookup
struct lruhash_entry * lruhash_lookup(struct lruhash *table, hashvalue_type hash, void *key, int wr)
Lookup an entry in the hashtable.
Definition: lruhash.c:356
listen_dnsport::udp_buff
struct sldns_buffer * udp_buff
buffer shared by UDP connections, since there is only one datagram at any time.
Definition: listen_dnsport.h:62
sldns_get_rr_class_by_name
sldns_rr_class sldns_get_rr_class_by_name(const char *name)
retrieves a class by looking up its name.
Definition: rrdef.c:728
win_do_cron
static void * win_do_cron(void *arg)
Do the cron action and wait for result exit value.
Definition: win_svc.c:546
parse_packet
int parse_packet(struct sldns_buffer *pkt, struct msg_parse *msg, struct regional *region)
Parse the packet.
Definition: msgparse.c:906
libworker_fg_done_cb
void libworker_fg_done_cb(void *arg, int rcode, sldns_buffer *buf, enum sec_status s, char *why_bogus, int was_ratelimited)
mesh callback with fg results
Definition: libworker.c:550
sldns_str2wire_type_buf
int sldns_str2wire_type_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_TYPE from string to wireformat.
Definition: str2wire.c:1340
get_origin
static void get_origin(const char *name, struct sldns_file_parse_state *pstate, char *parse)
parse ORIGIN
Definition: testpkts.c:436
waiting_tcp::next_waiting
struct waiting_tcp * next_waiting
next in waiting list.
Definition: outside_network.h:274
LDNS_RDF_TYPE_APL
@ LDNS_RDF_TYPE_APL
apl data
Definition: rrdef.h:282
regional_alloc
void * regional_alloc(struct regional *r, size_t size)
Allocate size bytes of memory inside regional.
Definition: regional.c:122
replay_runtime::callback_query
comm_point_callback_type * callback_query
callback to call for incoming queries
Definition: replay.h:294
mesh_new_callback
int mesh_new_callback(struct mesh_area *mesh, struct query_info *qinfo, uint16_t qflags, struct edns_data *edns, struct sldns_buffer *buf, uint16_t qid, mesh_cb_func_type cb, void *cb_arg)
New query with callback.
Definition: mesh.c:598
iter_priv.h
rpz_action
rpz_action
RPZ actions.
Definition: rpz.h:70
libworker_setup
static struct libworker * libworker_setup(struct ub_ctx *ctx, int is_bg, struct ub_event_base *eb)
setup fresh libworker struct
Definition: libworker.c:131
log_ident_set_default
void log_ident_set_default(const char *id)
Set default identity to print, default is 'unbound'.
Definition: log.c:185
slabhash::mask
uint32_t mask
size bitmask - uses high bits.
Definition: slabhash.h:61
handle_query
void handle_query(uint8_t *inbuf, ssize_t inlen, struct entry *entries, int *count, enum transport_type transport, void(*sendfunc)(uint8_t *, size_t, void *), void *userdata, FILE *verbose_out)
Parses data buffer to a query, finds the correct answer and calls the given function for every packet...
Definition: testpkts.c:1629
rrset_get_count
static size_t rrset_get_count(struct ub_packed_rrset_key *rrset)
return number of rrs in an rrset
Definition: val_sigcrypt.c:83
MSG_GENERIC_WARN
#define MSG_GENERIC_WARN
from gen_msg.h - warning message record for windows message log
Definition: win_svc.h:59
usage
static void usage(char *nm)
usage information for perf
Definition: perf.c:59
timehist_log
void timehist_log(struct timehist *hist, const char *name)
Log histogram, print it to the logfile.
Definition: timehist.c:164
msg_add_rrset_ar
static int msg_add_rrset_ar(struct auth_zone *z, struct regional *region, struct dns_msg *msg, struct auth_data *node, struct auth_rrset *rrset)
add rrset to additional section
Definition: authzone.c:268
usage
static void usage(char *argv[])
usage information for streamtcp
Definition: streamtcp.c:69
perform_setup
static void perform_setup(struct daemon *daemon, struct config_file *cfg, int debug_mode, const char **cfgfile, int need_pidfile)
daemonize, drop user privileges and chroot if needed
Definition: unbound.c:419
daemon::num
int num
num threads allocated
Definition: daemon.h:101
val_neg_addreply
void val_neg_addreply(struct val_neg_cache *neg, struct reply_info *rep)
Insert NSECs from this message into the negative cache for reference.
Definition: val_neg.c:878
worker_send_cmd
void worker_send_cmd(struct worker *worker, enum worker_commands cmd)
Send a command to a worker.
Definition: worker.c:230
val_qstate
Per query state for the validator module.
Definition: validator.h:147
qlist_grow_capacity
static void qlist_grow_capacity(struct perfinfo *info)
grow query list capacity
Definition: perf.c:509
sldns_str2wire_tag_buf
int sldns_str2wire_tag_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_TAG from string to wireformat.
Definition: str2wire.c:2015
do_quit
static volatile int do_quit
signal handler global info
Definition: delayer.c:345
sldns_buffer_new
sldns_buffer * sldns_buffer_new(size_t capacity)
creates a new buffer with the specified capacity.
Definition: sbuffer.c:19
module_func_block::operate
void(* operate)(struct module_qstate *qstate, enum module_ev event, int id, struct outbound_entry *outbound)
accept a new query, or work further on existing query.
Definition: module.h:711
vbmp
static int vbmp
verbosity for this test
Definition: unitauth.c:53
query_dname_len
size_t query_dname_len(sldns_buffer *query)
Determine length of dname in buffer, no compression ptrs allowed,.
Definition: dname.c:52
tcp_req_info_add_meshstate
int tcp_req_info_add_meshstate(struct tcp_req_info *req, struct mesh_area *mesh, struct mesh_state *m)
Add mesh state to the tcp req list of open requests.
Definition: listen_dnsport.c:1855
config_auth::isrpz
int isrpz
this zone is used to create local-zone policies
Definition: config_file.h:675
algo_needs_set_secure
int algo_needs_set_secure(struct algo_needs *n, uint8_t algo)
Mark this algorithm as a success, sec_secure, and see if we are done.
Definition: val_sigcrypt.c:450
autr_global_delete
void autr_global_delete(struct autr_global_data *global)
Delete global 5011 data structure.
Definition: autotrust.c:84
config_file::server_cert_file
char * server_cert_file
certificate file for server
Definition: config_file.h:444
LDNS_RR_TYPE_PX
@ LDNS_RR_TYPE_PX
RFC2163.
Definition: rrdef.h:135
sldns_wire2str_eui64_scan
int sldns_wire2str_eui64_scan(uint8_t **d, size_t *dl, char **s, size_t *sl)
Scan wireformat EUI64 field to string, with user buffers.
Definition: wire2str.c:1678
perfinfo::io
struct perfio * io
I/O ports array.
Definition: perf.c:112
O_IFC
#define O_IFC(opt, str, num, arr)
compare and print array option
Definition: config_file.c:848
find_add_addrs
static int find_add_addrs(struct module_env *env, uint16_t qclass, struct regional *region, struct delegpt *dp, time_t now, struct dns_msg **msg)
find and add A and AAAA records for nameservers in delegpt
Definition: dns.c:265
rpz_trigger_to_string
static const char * rpz_trigger_to_string(enum rpz_trigger r)
string for RPZ trigger enum
Definition: rpz.c:96
addredge::parent_index
int parent_index
Index of this edge in parent_node.
Definition: addrtree.h:118
cfg_scan_ports
int cfg_scan_ports(int *avail, int num)
Scan ports available.
Definition: config_file.c:1590
fstrm_create_control_frame_stop
void * fstrm_create_control_frame_stop(size_t *len)
This creates an FSTRM control frame of type STOP.
Definition: dnstap_fstrm.c:75
calc_edns_field_size
uint16_t calc_edns_field_size(struct edns_data *edns)
Estimate size of EDNS record in packet.
Definition: msgencode.c:788
config_str2list::str2
char * str2
second string
Definition: config_file.h:737
ipsecmod_qstate::enabled
int enabled
State of the IPsec module.
Definition: ipsecmod.h:65
rrset_trust_nonauth_ans_AA
@ rrset_trust_nonauth_ans_AA
non-authoritative data from the answer section of authoritative answers
Definition: packed_rrset.h:151
az_insert_rr
static int az_insert_rr(struct auth_zone *z, uint8_t *rr, size_t rr_len, size_t dname_len, int *duplicate)
insert RR into zone, ignore duplicates
Definition: authzone.c:1156
do_flush_bogus
static void do_flush_bogus(RES *ssl, struct worker *worker)
remove all bogus rrsets, msgs and keys from cache
Definition: remote.c:1814
module_qstate::need_refetch
int need_refetch
whether to refetch a fresh answer on finishing this state
Definition: module.h:650
infra_create_ratedata
static void infra_create_ratedata(struct infra_cache *infra, uint8_t *name, size_t namelen, time_t timenow)
create rate data item for name, number 1 in now
Definition: infra.c:827
cfg_strlist_append
int cfg_strlist_append(struct config_strlist_head *list, char *item)
Append text at end of list.
Definition: config_file.c:1650
rrset_cache::table
struct slabhash table
uses partitioned hash table
Definition: rrset.h:58
tcp_req_info_read_again
static void tcp_req_info_read_again(int fd, struct comm_point *c)
read again to drain buffers when there could be more to read
Definition: netevent.c:1746
addredge
Definition: addrtree.h:108
local_data::namelen
size_t namelen
length of name
Definition: localzone.h:169
rr_parse::next
struct rr_parse * next
next in list of RRs.
Definition: msgparse.h:194
config_file::root_hints
struct config_strlist * root_hints
the root hints
Definition: config_file.h:208
log_vmsg
void log_vmsg(int pri, const char *type, const char *format, va_list args)
va_list argument version of log_info.
Definition: log.c:220
tmpfilecleanup
static void tmpfilecleanup(void)
cleanup tmp files at exit
Definition: unitauth.c:466
bits_common
static addrlen_t bits_common(const addrkey_t *s1, addrlen_t l1, const addrkey_t *s2, addrlen_t l2, addrlen_t skip)
Common number of bits in prefix.
Definition: addrtree.c:330
replay_moment::evt_type
enum replay_moment::replay_event_type evt_type
variable with what is to happen this moment
auth_free_masters
static void auth_free_masters(struct auth_master *list)
free the masters list
Definition: authzone.c:2063
delegpt::auth_dp
uint8_t auth_dp
delegpt from authoritative zone that is locally hosted
Definition: iter_delegpt.h:87
local_rrset
A local data RRset.
Definition: localzone.h:180
mesh_reply::qname
uint8_t * qname
qname from this query.
Definition: mesh.h:230
spool_auto_file
static void spool_auto_file(FILE *in, int *lineno, FILE *cfg, char *id)
spool autotrust file
Definition: testbound.c:217
MAX_SENT_COUNT
#define MAX_SENT_COUNT
max number of queries-sent-out.
Definition: iterator.h:68
comm_point_udp_callback
void comm_point_udp_callback(int fd, short event, void *arg)
This routine is published for checks and tests, and is only used internally.
Definition: netevent.c:681
process_response
static void process_response(struct module_qstate *qstate, struct iter_qstate *iq, struct iter_env *ie, int id, struct outbound_entry *outbound, enum module_ev event)
process authoritative server reply
Definition: iterator.c:3682
print_mem
static int print_mem(RES *ssl, struct worker *worker, struct daemon *daemon, struct ub_stats_info *s)
print mem stats
Definition: remote.c:793
outside_network::unwanted_param
void * unwanted_param
user param for action
Definition: outside_network.h:98
xfr_probe_start_lookups
static void xfr_probe_start_lookups(struct auth_xfer *xfr)
start the lookups for task_probe
Definition: authzone.c:3783
iter_forward_zone::name
uint8_t * name
name
Definition: iter_fwd.h:70
validate_nameerror_response
static void validate_nameerror_response(struct module_env *env, struct val_env *ve, struct query_info *qchase, struct reply_info *chase_reply, struct key_entry_key *kkey, int *rcode)
Validate a NAMEERROR signed response – a response that has a NXDOMAIN Rcode.
Definition: validator.c:987
mesh_area::num_forever_states
size_t num_forever_states
number of reply states in the forever list
Definition: mesh.h:104
tube::res_com
struct comm_point * res_com
background write queue, commpoint to write results back
Definition: tube.h:84
find_match
struct entry * find_match(struct entry *entries, uint8_t *query_pkt, size_t query_pkt_len, enum transport_type transport)
finds entry in list, or returns NULL.
Definition: testpkts.c:1427
slab_idx
static unsigned int slab_idx(struct slabhash *sl, hashvalue_type hash)
helper routine to calculate the slabhash index
Definition: slabhash.c:111
get_mesh_status
static void get_mesh_status(struct mesh_area *mesh, struct mesh_state *m, char *buf, size_t len)
get status of a mesh state
Definition: remote.c:2342
hex_to_buf
void hex_to_buf(sldns_buffer *pkt, const char *hex)
Helper to convert hex string to packet buffer.
Definition: readhex.c:65
LISTEN_BACKLOG
#define LISTEN_BACKLOG
listen backlog on TCP connections for dnstap logs
Definition: unbound-dnstap-socket.c:71
dt_io_thread_register_queue
int dt_io_thread_register_queue(struct dt_io_thread *dtio, struct dt_msg_queue *mq)
Register a msg queue to the io thread.
Definition: dtstream.c:369
local_zones_tags_lookup
struct local_zone * local_zones_tags_lookup(struct local_zones *zones, uint8_t *name, size_t len, int labs, uint16_t dclass, uint16_t dtype, uint8_t *taglist, size_t taglen, int ignoretags)
Lookup zone that contains the given name, class and taglist.
Definition: localzone.c:1095
perfinfo
Global info for perf.
Definition: perf.c:77
key_cache_create
struct key_cache * key_cache_create(struct config_file *cfg)
Create the key cache.
Definition: val_kcache.c:50
mesh_state::num_activated
size_t num_activated
number of activations for the mesh state
Definition: mesh.h:186
comm_base_delete
void comm_base_delete(struct comm_base *b)
Destroy a comm base.
Definition: fake_event.c:913
key_cache_search
static struct key_entry_key * key_cache_search(struct key_cache *kcache, uint8_t *name, size_t namelen, uint16_t key_class, int wr)
Lookup exactly in the key cache.
Definition: val_kcache.c:111
ub_c_in
FILE * ub_c_in
lex in file
key_entry_isgood
int key_entry_isgood(struct key_entry_key *kkey)
See if this entry is good.
Definition: val_kentry.c:227
comm_timer_is_set
int comm_timer_is_set(struct comm_timer *timer)
see if timeout has been set to a value.
Definition: netevent.c:3358
remote_get_opt_ssl
void remote_get_opt_ssl(char *line, void *arg)
routine to printout option values over SSL
Definition: remote.c:2585
respip_data_answer
static int respip_data_answer(enum respip_action action, struct ub_packed_rrset_key *data, uint16_t qtype, const struct reply_info *rep, size_t rrset_id, struct reply_info **new_repp, int tag, struct config_strlist **tag_datas, size_t tag_datas_size, char *const *tagname, int num_tags, struct ub_packed_rrset_key **redirect_rrsetp, struct regional *region)
See if response-ip or tag data should override the original answer rrset (which is rep->rrsets[rrset_...
Definition: respip.c:699
DTIO_RECONNECT_TIMEOUT_MAX
#define DTIO_RECONNECT_TIMEOUT_MAX
the msec to wait for reconnect max after backoff
Definition: dtstream.c:68
listen_create
struct listen_dnsport * listen_create(struct comm_base *base, struct listen_port *ports, size_t bufsize, int tcp_accept_count, int tcp_idle_timeout, struct tcl_list *tcp_conn_limit, void *sslctx, struct dt_env *dtenv, comm_point_callback_type *cb, void *cb_arg)
Create commpoints with for this thread for the shared ports.
Definition: listen_dnsport.c:1325
lruhash_delete
void lruhash_delete(struct lruhash *table)
Delete hash table.
Definition: lruhash.c:153
outside_network::rnd
struct ub_randstate * rnd
where to get random numbers
Definition: outside_network.h:132
rrset_insert_rr
int rrset_insert_rr(struct regional *region, struct packed_rrset_data *pd, uint8_t *rdata, size_t rdata_len, time_t ttl, const char *rrstr)
Insert specified rdata into the specified resource record.
Definition: localzone.c:358
pythonmod_clear
void pythonmod_clear(struct module_qstate *qstate, int id)
python module cleanup query state
Definition: pythonmod.c:549
tube_res_list::buf
uint8_t * buf
serialized buffer to write
Definition: tube.h:119
dnskey_verify_rrset_sig
enum sec_status dnskey_verify_rrset_sig(struct regional *region, struct sldns_buffer *buf, struct val_env *ve, time_t now, struct ub_packed_rrset_key *rrset, struct ub_packed_rrset_key *dnskey, size_t dnskey_idx, size_t sig_idx, struct rbtree_type **sortree, int *buf_canon, char **reason, sldns_pkt_section section, struct module_qstate *qstate)
verify rrset, with specific dnskey(from set), for a specific rrsig
Definition: val_sigcrypt.c:1376
outside_network::num_ip6
int num_ip6
number of outgoing IP6 interfaces
Definition: outside_network.h:118
fptr_whitelist_serviced_query
int fptr_whitelist_serviced_query(comm_point_callback_type *fptr)
Check function pointer whitelist for serviced query callback values.
Definition: fptr_wlist.c:211
dname_test_has_label
static void dname_test_has_label(void)
Test dname_has_label.
Definition: unitdname.c:799
rpz_rr_to_action
static enum rpz_action rpz_rr_to_action(uint16_t rr_type, uint8_t *rdatawl, size_t rdatalen)
Classify RPZ action for RR type/rdata.
Definition: rpz.c:148
module_env::infra_cache
struct infra_cache * infra_cache
shared infrastructure cache (edns, lameness)
Definition: module.h:333
localzone_type
localzone_type
Local zone type This type determines processing for queries that did not match local-data directly.
Definition: localzone.h:65
fptr_whitelist_pending_udp
int fptr_whitelist_pending_udp(comm_point_callback_type *fptr)
Check function pointer whitelist for pending udp callback values.
Definition: fptr_wlist.c:193
perfinfo::duration
int duration
duration of test in seconds
Definition: perf.c:96
do_verbosity
static void do_verbosity(RES *ssl, char *str)
do the verbosity command
Definition: remote.c:696
infra_data::lame_other
uint8_t lame_other
the host is lame (not authoritative) for other query types
Definition: infra.h:99
donotq_create
struct iter_donotq * donotq_create(void)
Create donotqueryaddresses structure.
Definition: iter_donotq.c:52
dtio_control_ready_send
static int dtio_control_ready_send(struct dt_io_thread *dtio)
setup a ready control message
Definition: dtstream.c:1830
sldns_str2wire_eui48_buf
int sldns_str2wire_eui48_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_EUI48 from string to wireformat.
Definition: str2wire.c:1971
libworker_handle_service_reply
int libworker_handle_service_reply(struct comm_point *c, void *arg, int error, struct comm_reply *reply_info)
process incoming serviced query replies from the network
Definition: libworker.c:905
verb
static int verb
verbosity for this application
Definition: unbound-anchor.c:159
chaos_replystr
static void chaos_replystr(sldns_buffer *pkt, char **str, int num, struct edns_data *edns, struct worker *worker, struct comm_reply *repinfo)
Fill CH class answer into buffer.
Definition: worker.c:811
respip_get_mem
size_t respip_get_mem(struct module_env *env, int id)
response-ip alloc size routine
Definition: respip.c:1264
regional_free_all
void regional_free_all(struct regional *r)
Free all memory associated with regional.
Definition: regional.c:96
fake_commpoint::runtime
struct replay_runtime * runtime
runtime ptr
Definition: fake_event.c:88
mesh_state_add_reply
int mesh_state_add_reply(struct mesh_state *s, struct edns_data *edns, struct comm_reply *rep, uint16_t qid, uint16_t qflags, const struct query_info *qinfo)
Create new reply structure and attach it to a mesh state.
Definition: mesh.c:1474
canon_rr::node
rbnode_type node
rbtree node, key is this structure
Definition: val_sigcrypt.c:640
ub_ctx::thr_next_num
int thr_next_num
next thread number for new threads
Definition: context.h:96
libworker::is_bg_thread
int is_bg_thread
is this a bg worker that is threaded (not forked)?
Definition: libworker.h:77
get_random_zone
static char * get_random_zone(void)
get static pointer to random zone name
Definition: unitneg.c:95
count_large
static size_t count_large(struct regional *r)
also reasonably slow, counts the number of large objects
Definition: regional.c:205
delegpt_create_mlc
struct delegpt * delegpt_create_mlc(uint8_t *name)
create malloced delegation point, with the given name
Definition: iter_delegpt.c:530
sldns_buffer_reserve
int sldns_buffer_reserve(sldns_buffer *buffer, size_t amount)
ensures BUFFER can contain at least AMOUNT more bytes.
Definition: sbuffer.c:93
xfr_create_soa_probe_packet
static void xfr_create_soa_probe_packet(struct auth_xfer *xfr, sldns_buffer *buf, uint16_t id)
create SOA probe packet for xfr
Definition: authzone.c:3961
SERVICE_NAME
#define SERVICE_NAME
service name for unbound (internal to ServiceManager)
Definition: win_svc.h:52
ub_randfree
void ub_randfree(struct ub_randstate *state)
Delete the random state.
Definition: random.c:204
addr_tree_insert
int addr_tree_insert(rbtree_type *tree, struct addr_tree_node *node, struct sockaddr_storage *addr, socklen_t addrlen, int net)
insert element into addr tree.
Definition: dnstree.c:96
name_tree_lookup
struct name_tree_node * name_tree_lookup(rbtree_type *tree, uint8_t *name, size_t len, int labs, uint16_t dclass)
Lookup closest encloser in name tree.
Definition: dnstree.c:178
read_http_headers
static size_t read_http_headers(SSL *ssl, size_t *clen)
read http headers and process them
Definition: unbound-anchor.c:927
val_inform_super
void val_inform_super(struct module_qstate *qstate, int id, struct module_qstate *super)
inform validator super.
Definition: validator.c:3209
iterator.h
config_file::num_threads
int num_threads
number of threads to create
Definition: config_file.h:80
rrsigs_copy_from_rrset_to_rrsigset
static int rrsigs_copy_from_rrset_to_rrsigset(struct auth_rrset *rrset, struct auth_rrset *rrsigset)
copy the rrsigs from the rrset to the rrsig rrset, because the rrset is going to be deleted.
Definition: authzone.c:1066
rbtree.h
write_ssl_line
static int write_ssl_line(SSL *ssl, const char *str, const char *sec)
write a line over SSL
Definition: unbound-anchor.c:831
auth_xfer_cmp
int auth_xfer_cmp(const void *z1, const void *z2)
compare auth_xfer for sorted rbtree
Definition: authzone.c:334
priv_create
struct iter_priv * priv_create(void)
Create priv structure.
Definition: iter_priv.c:55
sock_list_logentry
static void sock_list_logentry(enum verbosity_value v, const char *s, struct sock_list *p)
log a sock_list entry
Definition: val_utils.c:1081
is_pow2
int is_pow2(size_t num)
See if number is a power of 2.
Definition: net_help.c:170
val_neg_create
struct val_neg_cache * val_neg_create(struct config_file *cfg, size_t maxiter)
Create negative cache.
Definition: val_neg.c:86
neg_create_zone
struct val_neg_zone * neg_create_zone(struct val_neg_cache *neg, uint8_t *nm, size_t nm_len, uint16_t dclass)
Create a new zone.
Definition: val_neg.c:530
fetch_fill
static void fetch_fill(struct iter_env *ie, const char *str)
fillup fetch policy array
Definition: iter_utils.c:77
respip_set_get_tree
struct rbtree_type * respip_set_get_tree(struct respip_set *set)
returns address of the IP address tree of the specified respip set; returns NULL for NULL input; exis...
Definition: respip.c:95
iter_qstate::state
enum iter_state state
State of the iterator module.
Definition: iterator.h:230
config_file::neg_cache_size
size_t neg_cache_size
size of the neg cache
Definition: config_file.h:392
local_data_answer
int local_data_answer(struct local_zone *z, struct module_env *env, struct query_info *qinfo, struct edns_data *edns, struct comm_reply *repinfo, sldns_buffer *buf, struct regional *temp, int labs, struct local_data **ldp, enum localzone_type lz_type, int tag, struct config_strlist **tag_datas, size_t tag_datas_size, char **tagname, int num_tags)
Get local data from local zone and encode answer.
Definition: localzone.c:1359
DNSKEY_BIT_SEP
#define DNSKEY_BIT_SEP
DNSKEY secure entry point, KSK flag.
Definition: net_help.h:95
az_remove_rr
static int az_remove_rr(struct auth_zone *z, uint8_t *rr, size_t rr_len, size_t dname_len, int *nonexist)
remove RR from zone, ignore if it does not exist, false on alloc failure
Definition: authzone.c:1265
rrset_remove_rr
static int rrset_remove_rr(struct auth_rrset *rrset, size_t index)
remove RR from existing RRset.
Definition: authzone.c:728
msgparse_test
void msgparse_test(void)
unit test for msgreply and msgparse
Definition: unitmsgparse.c:503
ub_event_add
int ub_event_add(struct ub_event *ev, struct timeval *tv)
Activate the event.
Definition: ub_event_pluggable.c:585
probe_date_allows_certupdate
static int probe_date_allows_certupdate(const char *root_anchor_file)
Read autotrust 5011 probe file and see if the date compared to the current date allows a certupdate.
Definition: unbound-anchor.c:2183
packed_rrset_data::rr_data
uint8_t ** rr_data
Array of pointers to every rr's rdata.
Definition: packed_rrset.h:258
find_id
static int find_id(struct ub_ctx *ctx, int *id)
find next useful id number of 0 on error
Definition: context.c:125
outbound_list_remove
void outbound_list_remove(struct outbound_list *list, struct outbound_entry *e)
Remove an entry from the list, and deletes it.
Definition: outbound_list.c:78
rpz_apply_qname_trigger
int rpz_apply_qname_trigger(struct auth_zones *az, struct module_env *env, struct query_info *qinfo, struct edns_data *edns, sldns_buffer *buf, struct regional *temp, struct comm_reply *repinfo, uint8_t *taglist, size_t taglen, struct ub_server_stats *stats)
Walk over the RPZ zones to find and apply a QNAME trigger policy.
Definition: rpz.c:939
packed_rrset_heap_data
static struct packed_rrset_data * packed_rrset_heap_data(int iter(struct autr_ta **, uint8_t **, size_t *, size_t *), struct autr_ta *list)
Create packed_rrset data on the heap.
Definition: autotrust.c:655
should_be_bogus
static int should_be_bogus(struct ub_packed_rrset_key *rrset, struct query_info *qinfo)
return true if answer should be bogus
Definition: unitverify.c:133
algo_needs_reason
void algo_needs_reason(struct module_env *env, int alg, char **reason, char *s)
Format error reason for algorithm missing.
Definition: val_sigcrypt.c:541
edns_known_option::bypass_cache_stage
int bypass_cache_stage
whether the option needs to bypass the cache stage
Definition: module.h:219
test_slabhash_compfunc
int test_slabhash_compfunc(void *, void *)
test comparefunc for lruhash
Definition: slabhash.c:197
vbmp
static int vbmp
verbose message parse unit test
Definition: unitmsgparse.c:59
nsec3_cached_hash::b32_len
size_t b32_len
length of base32 encoding (as a label)
Definition: val_nsec3.h:246
rpz_create
struct rpz * rpz_create(struct config_auth *p)
Create RPZ.
Definition: rpz.c:382
replay_moment::file_content
struct config_strlist * file_content
file contents to match, one string per line
Definition: replay.h:240
RESPONSE_TYPE_ANSWER
@ RESPONSE_TYPE_ANSWER
'answer' means that the response terminates the resolution process.
Definition: iter_resptype.h:63
rrset_get_sig_keytag
static uint16_t rrset_get_sig_keytag(struct ub_packed_rrset_key *k, size_t sig_idx)
Get signature keytag value.
Definition: val_sigcrypt.c:108
dname_test_qdl
static void dname_test_qdl(sldns_buffer *buff)
test query_dname_len function
Definition: unitdname.c:66
ldns_test
void ldns_test(void)
unit test for ldns functions
Definition: unitldns.c:224
context_serialize_answer
uint8_t * context_serialize_answer(struct ctx_query *q, int err, struct sldns_buffer *pkt, uint32_t *len)
Serialize a context_query result to hand back to user.
Definition: context.c:296
rrdef.h
ub_rrset_sizefunc
size_t ub_rrset_sizefunc(void *key, void *data)
Calculate memory size of rrset entry.
Definition: packed_rrset.c:70
replay_scenario::title
char * title
name of replay scenario.
Definition: replay.h:157
xml_data::use_key
int use_key
do we want to use this anchor?
Definition: unbound-anchor.c:1206
find_master_by_host
static struct auth_master * find_master_by_host(struct auth_master *list, char *host)
find master (from notify or probe) in list of masters
Definition: authzone.c:3640
iter_forward_zone::dp
struct delegpt * dp
delegation point with forward server information for this zone.
Definition: iter_fwd.h:80
rbnode_type
The rbnode_type struct definition.
Definition: rbtree.h:55
module_env::msg_cache
struct slabhash * msg_cache
shared message cache
Definition: module.h:329
az_rrset_find_rrsig
static int az_rrset_find_rrsig(struct packed_rrset_data *d, uint8_t *rdata, size_t len, size_t *index)
find an rrsig index in the rrset.
Definition: authzone.c:683
lruhash::compfunc
lruhash_compfunc_type compfunc
the compare function for entries in this table.
Definition: lruhash.h:153
MINIMAL_RESPONSES
int MINIMAL_RESPONSES
minimal responses when positive answer: default is no
Definition: net_help.c:71
timehist.h
xml_append_ds
static void xml_append_ds(struct xml_data *data)
write the parsed xml-DS to the DS list
Definition: unbound-anchor.c:1496
track_id::lock
lock_basic_type lock
a lock on this structure for thread safety
Definition: asynclook.c:76
VAL_CLASS_CNAMENOANSWER
@ VAL_CLASS_CNAMENOANSWER
A CNAME/DNAME chain, and the offset is at the end of it, but there is no answer here,...
Definition: val_utils.h:76
DNSCRYPT_SHARED_SECRET_KEY_LENGTH
#define DNSCRYPT_SHARED_SECRET_KEY_LENGTH
Shared secret cache key length.
Definition: dnscrypt.c:52
fstrm_create_control_frame_finish
void * fstrm_create_control_frame_finish(size_t *len)
This creates an FSTRM control frame of type FINISH.
Definition: dnstap_fstrm.c:151
val_sigcrypt.h
dname_signame_label_count
int dname_signame_label_count(uint8_t *dname)
Count labels for the RRSIG signature label field.
Definition: dname.c:750
cfg_insert_respip_data
static void cfg_insert_respip_data(struct config_str2list **respip_actions, struct config_str2list **respip_data)
Populate raw respip redirect config data, used for both global and view-based respip redirect test ca...
Definition: unitmain.c:746
remote_write
static void remote_write(SSL *ssl, int fd, const char *buf, size_t len)
write to ssl or fd, fatalexit on error
Definition: unbound-control.c:697
sldns_buffer_write_u48_at
INLINE void sldns_buffer_write_u48_at(sldns_buffer *buffer, size_t at, uint64_t data)
writes the given 6 byte integer at the given position in the buffer
Definition: sbuffer.h:562
key_cache_insert
void key_cache_insert(struct key_cache *kcache, struct key_entry_key *kkey, struct module_qstate *qstate)
Insert or update a key cache entry.
Definition: val_kcache.c:83
ipsecmod_env::whitelist
rbtree_type * whitelist
White listed domains for ipsecmod.
Definition: ipsecmod.h:55
dt_io_thread::commandpipe
int commandpipe[2]
command pipe that stops the pipe if closed.
Definition: dtstream.h:171
ub_server_stats::qopcode
long long qopcode[UB_STATS_OPCODE_NUM]
query opcodes
Definition: unbound.h:693
lz_enter_zone_tag
static int lz_enter_zone_tag(struct local_zones *zones, char *zname, uint8_t *list, size_t len, uint16_t rr_class)
enter tagstring into zone
Definition: localzone.c:584
rrset_trust_none
@ rrset_trust_none
initial value for trust
Definition: packed_rrset.h:142
timehist_clear
void timehist_clear(struct timehist *hist)
Clear histogram.
Definition: timehist.c:110
sldns_str2wire_nsec3_salt_buf
int sldns_str2wire_nsec3_salt_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_NSEC3_SALT from string to wireformat.
Definition: str2wire.c:1923
rrset_msg
static struct dns_msg * rrset_msg(struct ub_packed_rrset_key *rrset, struct regional *region, time_t now, struct query_info *q)
synthesize RRset-only response from cached RRset item
Definition: dns.c:613
auth_zone_set_fallback
int auth_zone_set_fallback(struct auth_zone *z, char *fallbackstr)
set auth zone fallback.
Definition: authzone.c:572
auth_xfer_pickup_initial
void auth_xfer_pickup_initial(struct auth_zones *az, struct module_env *env)
initial pick up of worker timeouts, ties events to worker event loop
Definition: authzone.c:6655
config_parser_state::cfg
struct config_file * cfg
the result of parsing is stored here.
Definition: config_file.h:1209
read_last_success_time
static int32_t read_last_success_time(const char *file)
read last successful probe time from autotrust file (if possible)
Definition: unbound-anchor.c:2146
lruhash::space_used
size_t space_used
the amount of space used, roughly the number of bytes in use.
Definition: lruhash.h:178
tcp_proxy_list_clear
static void tcp_proxy_list_clear(struct tcp_proxy *p)
clear TCP proxy list
Definition: delayer.c:916
TIMEOUT_COUNT_MAX
#define TIMEOUT_COUNT_MAX
number of timeouts for a type when the domain can be blocked ; even if another type has completely rt...
Definition: infra.c:61
val_neg_data::len
size_t len
length of name
Definition: val_neg.h:148
ub_result::bogus
int bogus
If the result was not secure (secure==0), and this result is due to a security failure,...
Definition: unbound.h:196
main
int main(int argc, char *argv[])
Main routine for checkconf.
Definition: unbound-checkconf.c:907
create_udp_sock
int create_udp_sock(int family, int socktype, struct sockaddr *addr, socklen_t addrlen, int v6only, int *inuse, int *noproto, int rcv, int snd, int listen, int *reuseport, int transparent, int freebind, int use_systemd, int dscp)
Create and bind nonblocking UDP socket.
Definition: listen_dnsport.c:179
name_tree_init_parents
void name_tree_init_parents(rbtree_type *tree)
Initialize parent pointers in name tree.
Definition: dnstree.c:140
local_zone::soa
struct ub_packed_rrset_key * soa
if data contains zone apex SOA data, this is a ptr to it.
Definition: localzone.h:157
sldns_buffer_copy
void sldns_buffer_copy(sldns_buffer *result, sldns_buffer *from)
Copy contents of the from buffer to the result buffer and then flips the result buffer.
Definition: sbuffer.c:151
tap_socket
tap socket
Definition: unbound-dnstap-socket.c:141
line_diff
static void line_diff(const char *p, const char *q, const char *pdesc, const char *qdesc)
find line diff between strings
Definition: unitauth.c:722
internal_timer::ev
struct ub_event * ev
ub_event event type
Definition: netevent.c:136
sldns_wire2str_cert_alg_scan
int sldns_wire2str_cert_alg_scan(uint8_t **d, size_t *dl, char **s, size_t *sl)
Scan wireformat cert_alg field to string, with user buffers.
Definition: wire2str.c:1320
rrset_cache_create
struct rrset_cache * rrset_cache_create(struct config_file *cfg, struct alloc_cache *alloc)
Create rrset cache.
Definition: rrset.c:59
subnet_msg_cache_data
Definition: subnetmod.h:71
edge_create
static struct addredge * edge_create(struct addrnode *node, const addrkey_t *addr, addrlen_t addrlen, struct addrnode *parent_node, int parent_index)
Create a new edge.
Definition: addrtree.c:55
dt_io_thread::use_client_certs
int use_client_certs
are client certificates in use
Definition: dtstream.h:216
xfr_set_timeout
static void xfr_set_timeout(struct auth_xfer *xfr, struct module_env *env, int failure, int lookup_only)
pick up nextprobe task to start waiting to perform transfer actions
Definition: authzone.c:6572
nsec3_get_nextowner_b32
size_t nsec3_get_nextowner_b32(struct ub_packed_rrset_key *rrset, int r, uint8_t *buf, size_t max)
Get next owner name, converted to base32 encoding and with the zone name (taken from the nsec3 owner ...
Definition: val_nsec3.c:268
val_neg_get_mem
size_t val_neg_get_mem(struct val_neg_cache *neg)
see how much memory is in use by the negative cache.
Definition: val_neg.c:103
dname_has_label
int dname_has_label(uint8_t *dname, size_t dnamelen, uint8_t *label)
Check if dname contains label.
Definition: dname.c:592
mesh_log_list
void mesh_log_list(struct mesh_area *mesh)
Print all the states in the mesh to the log.
Definition: mesh.c:1705
do_view_zone_add
static void do_view_zone_add(RES *ssl, struct worker *worker, char *arg)
Add a new zone to view.
Definition: remote.c:1383
ub_ctx::qqpipe_lock
lock_basic_type qqpipe_lock
mutex on query write pipe
Definition: context.h:68
regional_init
static void regional_init(struct regional *r)
init regional struct with first block
Definition: regional.c:73
tcp_connect_errno_needs_log
int tcp_connect_errno_needs_log(struct sockaddr *addr, socklen_t addrlen)
See if errno for tcp connect has to be logged or not.
Definition: netevent.c:328
sldns_wire2str_edns_option_print
int sldns_wire2str_edns_option_print(char **str, size_t *str_len, uint16_t option_code, uint8_t *option_data, size_t option_len)
Print an EDNS option as OPT: VALUE.
Definition: wire2str.c:1943
listen_list_delete
void listen_list_delete(struct listen_list *list)
delete listen_list of commpoints.
Definition: listen_dnsport.c:1411
ce_response::nc_rrset
struct ub_packed_rrset_key * nc_rrset
NSEC3 record that proved nc.
Definition: val_nsec3.c:88
ip_rate_key::entry
struct lruhash_entry entry
lruhash key entry
Definition: infra.h:160
config_str3list::str2
char * str2
second string
Definition: config_file.h:749
comm_point_drop_reply
void comm_point_drop_reply(struct comm_reply *repinfo)
Drop reply.
Definition: netevent.c:3181
sock_list_merge
void sock_list_merge(struct sock_list **list, struct regional *region, struct sock_list *add)
Merge socklist into another socket list.
Definition: net_help.c:823
iter_indicates_dnssec
int iter_indicates_dnssec(struct module_env *env, struct delegpt *dp, struct dns_msg *msg, uint16_t dclass)
See if delegation is expected to have DNSSEC information (RRSIGs) in its answers, or not.
Definition: iter_utils.c:799
priv_apply_cfg
int priv_apply_cfg(struct iter_priv *priv, struct config_file *cfg)
Process priv config.
Definition: iter_priv.c:147
mesh_create
struct mesh_area * mesh_create(struct module_stack *stack, struct module_env *env)
Allocate mesh, to empty.
Definition: mesh.c:242
UB_SOCKET
@ UB_SOCKET
socket operation.
Definition: context.h:187
tube_write_msg
int tube_write_msg(struct tube *tube, uint8_t *buf, uint32_t len, int nonblock)
Write length bytes followed by message.
Definition: tube.c:285
ub_openssl_lock_delete
void ub_openssl_lock_delete(void)
De-init the allocated openssl locks.
Definition: net_help.c:1355
az_domain_find_or_create
static struct auth_data * az_domain_find_or_create(struct auth_zone *z, uint8_t *dname, size_t dname_len)
find or create domain with name in zone
Definition: authzone.c:635
infra_edns_update
int infra_edns_update(struct infra_cache *infra, struct sockaddr_storage *addr, socklen_t addrlen, uint8_t *name, size_t namelen, int edns_version, time_t timenow)
Update edns information for the host.
Definition: infra.c:641
edns_data
EDNS data storage rdata is parsed in a list (has accessor functions).
Definition: msgparse.h:215
comm_point_stop_listening
void comm_point_stop_listening(struct comm_point *c)
Stop listening for input on the commpoint.
Definition: netevent.c:3195
fptr_whitelist_comm_point
int fptr_whitelist_comm_point(comm_point_callback_type *fptr)
Check function pointer whitelist for comm_point callback values.
Definition: fptr_wlist.c:104
do_view_list_local_zones
static void do_view_list_local_zones(RES *ssl, struct worker *worker, char *arg)
do the view_list_local_zones command
Definition: remote.c:2752
anchors_apply_cfg
int anchors_apply_cfg(struct val_anchors *anchors, struct config_file *cfg)
Process trust anchor config.
Definition: val_anchor.c:1047
iter_new
static int iter_new(struct module_qstate *qstate, int id)
new query for iterator
Definition: iterator.c:132
val_nsec_check_dlv
int val_nsec_check_dlv(struct query_info *qinfo, struct reply_info *rep, uint8_t **nm, size_t *nm_len)
Determine the DLV result, what to do with NSEC DLV reply.
Definition: val_nsec.c:568
neg_insert_data
void neg_insert_data(struct val_neg_cache *neg, struct val_neg_zone *zone, struct ub_packed_rrset_key *nsec)
Insert data into the data tree of a zone Does not do locking.
Definition: val_neg.c:748
response_type
response_type
The response type is used to interpret the response.
Definition: iter_resptype.h:52
rrsig_get_labcount
static uint8_t rrsig_get_labcount(struct packed_rrset_data *d, size_t sig)
get label count for a signature
Definition: val_utils.c:762
cfg_region_strlist_insert
int cfg_region_strlist_insert(struct regional *region, struct config_strlist **head, char *item)
insert with region for allocation.
Definition: config_file.c:1673
sldns_buffer_flip
INLINE void sldns_buffer_flip(sldns_buffer *buffer)
makes the buffer ready for reading the data that has been written to the buffer.
Definition: sbuffer.h:207
delegpt_addr::next_usable
struct delegpt_addr * next_usable
next delegation point in usable list
Definition: iter_delegpt.h:136
do_statetable
static int do_statetable(struct module_env *env, struct trust_anchor *tp, int *changed)
Do the statetable from RFC5011 transition matrix.
Definition: autotrust.c:1943
dns_cache_store_msg
void dns_cache_store_msg(struct module_env *env, struct query_info *qinfo, hashvalue_type hash, struct reply_info *rep, time_t leeway, int pside, struct reply_info *qrep, uint32_t flags, struct regional *region)
Store message in the cache.
Definition: dns.c:156
ub_ctx::event_base
struct ub_event_base * event_base
event base for event oriented interface
Definition: context.h:121
target_count_create
static void target_count_create(struct iter_qstate *iq)
create target count structure for this query
Definition: iterator.c:629
sldns_buffer_skip
INLINE void sldns_buffer_skip(sldns_buffer *buffer, ssize_t count)
changes the buffer's position by COUNT bytes.
Definition: sbuffer.h:259
delegpt_ns::done_pside4
uint8_t done_pside4
if the parent-side ipv4 address has been looked up (last resort).
Definition: iter_delegpt.h:122
ipset_clear
void ipset_clear(struct module_qstate *qstate, int id)
clear the ipset query-specific contents out of qstate
Definition: ipset.c:350
ub_ctx_get_option
int ub_ctx_get_option(struct ub_ctx *ctx, const char *opt, char **str)
Get an option from the context.
Definition: libunbound.c:361
read_datafile
struct entry * read_datafile(const char *name, int skip_whitespace)
reads the canned reply file and returns a list of structs does an exit on error.
Definition: testpkts.c:673
waiting_udp_get_mem
static size_t waiting_udp_get_mem(struct pending *w)
get memory used by waiting udp
Definition: outside_network.c:2483
listen_sslctx_setup_ticket_keys
int listen_sslctx_setup_ticket_keys(void *sslctx, struct config_strlist *tls_session_ticket_keys)
setup TLS session ticket
Definition: net_help.c:1374
ub_event_del_bits
void ub_event_del_bits(struct ub_event *ev, short bits)
Configure the event so it will not longer fire on given bits.
Definition: ub_event.c:368
rrset_get_ttl
static uint32_t rrset_get_ttl(struct ub_packed_rrset_key *rrset)
return TTL of rrset
Definition: val_utils.c:327
mesh_reply::query_reply
struct comm_reply query_reply
the query reply destination, packet buffer and where to send.
Definition: mesh.h:220
iter_hints_stub::noprime
uint8_t noprime
does the stub need to forego priming (like on other ports)
Definition: iter_hints.h:74
auth_zones_notify
int auth_zones_notify(struct auth_zones *az, struct module_env *env, uint8_t *nm, size_t nmlen, uint16_t dclass, struct sockaddr_storage *addr, socklen_t addrlen, int has_serial, uint32_t serial, int *refused)
process notify for auth zones.
Definition: authzone.c:3561
sldns_str2wire_tsigerror_buf
int sldns_str2wire_tsigerror_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_TSIGERROR from string to wireformat.
Definition: str2wire.c:1401
sig_record_quit
static int sig_record_quit
How many quit requests happened.
Definition: daemon.c:100
ub_server_stats::num_query_dnscrypt_cleartext
long long num_query_dnscrypt_cleartext
number of queries in clear text and not asking for the certificates
Definition: unbound.h:762
LDNS_TSIG_ERROR_NOERROR
#define LDNS_TSIG_ERROR_NOERROR
TSIG and TKEY extended rcodes (16bit), 0-15 are the normal rcodes.
Definition: rrdef.h:436
config_file::ratelimit_for_domain
struct config_str2list * ratelimit_for_domain
ratelimits for domain (exact match)
Definition: config_file.h:541
errinf
void errinf(struct module_qstate *qstate, const char *str)
Append text to the error info for validation.
Definition: config_file.c:2379
BIT_RA
#define BIT_RA
RA flag.
Definition: net_help.h:63
fptr_whitelist_hash_delkeyfunc
int fptr_whitelist_hash_delkeyfunc(lruhash_delkeyfunc_type fptr)
Check function pointer whitelist for lruhash delkeyfunc callback values.
Definition: fptr_wlist.c:286
sldns_struct_rr_descriptor
Contains all information about resource record types.
Definition: rrdef.h:450
mesh_serve_expired_init
static int mesh_serve_expired_init(struct mesh_state *mstate, int timeout)
Init the serve expired data structure.
Definition: mesh.c:419
dnsc_load_local_data
static int dnsc_load_local_data(struct dnsc_env *dnscenv, struct config_file *cfg)
Insert local-zone and local-data into configuration.
Definition: dnscrypt.c:683
do_remtime
static void do_remtime(struct module_env *env, struct autr_ta *anchor, int *c)
Event: RemTime.
Definition: autotrust.c:1750
caps_free
static void caps_free(struct rbnode_type *n, void *ATTR_UNUSED(d))
delete caps_whitelist element
Definition: iterator.c:103
daemon_fork
void daemon_fork(struct daemon *daemon)
Fork workers and start service.
Definition: daemon.c:571
BIT_AA
#define BIT_AA
AA flag.
Definition: net_help.h:69
create_tcp_accept_sock
int create_tcp_accept_sock(struct addrinfo *addr, int v6only, int *noproto, int *reuseport, int transparent, int mss, int freebind, int use_systemd, int dscp)
Create and bind TCP listening socket.
Definition: listen_dnsport.c:644
delete_replay_answer
static void delete_replay_answer(struct replay_answer *a)
delete a replay answer
Definition: fake_event.c:186
delegpt_ns::done_pside6
uint8_t done_pside6
if the parent-side ipv6 address has been looked up (last resort).
Definition: iter_delegpt.h:126
config_file::dnstap_version
char * dnstap_version
dnstap "version", package version is used if "".
Definition: config_file.h:507
anchor_new_ta
static struct trust_anchor * anchor_new_ta(struct val_anchors *anchors, uint8_t *name, int namelabs, size_t namelen, uint16_t dclass, int lockit)
create new trust anchor object
Definition: val_anchor.c:221
ub_get_event_sys
void ub_get_event_sys(struct ub_event_base *ub_base, const char **n, const char **s, const char **m)
Return the name, system and method for the pluggable event base.
Definition: ub_event_pluggable.c:437
ssl_http_write_more
static int ssl_http_write_more(struct comm_point *c)
write more data for http (with ssl)
Definition: netevent.c:2316
next_space_pos
static char * next_space_pos(const char *str)
return next space character in string
Definition: config_file.c:2168
auth_master::host
char * host
master IP address (and port), or hostname, string
Definition: authzone.h:436
cachedb_get_funcblock
struct module_func_block * cachedb_get_funcblock(void)
Get the function block with pointers to the cachedb functions.
local_zone_delete
void local_zone_delete(struct local_zone *z)
Delete one zone.
Definition: localzone.c:93
ub_ctx::local_zones
struct local_zones * local_zones
local authority zones
Definition: context.h:116
sldns_wire2str_int16_scan
int sldns_wire2str_int16_scan(uint8_t **data, size_t *data_len, char **str, size_t *str_len)
Scan wireformat int16 field to string, with user buffers.
Definition: wire2str.c:1037
rbtree_search
rbnode_type * rbtree_search(rbtree_type *rbtree, const void *key)
Find key in tree.
Definition: rbtree.c:281
LDNS_RR_TYPE_RP
@ LDNS_RR_TYPE_RP
RFC1183.
Definition: rrdef.h:117
key_entry_set_reason
void key_entry_set_reason(struct key_entry_key *kkey, char *reason)
Set reason why a key is bad.
Definition: val_kentry.c:241
val_check_nonsecure
void val_check_nonsecure(struct module_env *env, struct reply_info *rep)
Remove all unsigned or non-secure status rrsets from NS and AR sections.
Definition: val_utils.c:927
sldns_buffer_write_u48
INLINE void sldns_buffer_write_u48(sldns_buffer *buffer, uint64_t data)
writes the given 6 byte integer at the current position in the buffer
Definition: sbuffer.h:586
keyraw.h
edns_opt_append
int edns_opt_append(struct edns_data *edns, struct regional *region, uint16_t code, size_t len, uint8_t *data)
Append edns option to edns data structure.
Definition: msgreply.c:946
local_zone_always_nxdomain
@ local_zone_always_nxdomain
answer with nxdomain, even when there is local data
Definition: localzone.h:94
az_domain_rrset
static struct auth_rrset * az_domain_rrset(struct auth_data *n, uint16_t t)
find rrset of given type in the domain
Definition: authzone.c:647
comm_point::inuse
int inuse
number of queries outstanding on this socket, used by outside network for udp ports
Definition: netevent.h:287
subnet_env::subnet_msg_cache
struct slabhash * subnet_msg_cache
shared message cache key: struct query_info* data: struct subnet_msg_cache_data*
Definition: subnetmod.h:59
ub_ctx_set_tls
int ub_ctx_set_tls(struct ub_ctx *ctx, int tls)
Use DNS over TLS to send queries to machines set with ub_ctx_set_fwd().
Definition: libunbound.c:977
reply_info::security
enum sec_status security
The security status from DNSSEC validation of this message.
Definition: msgreply.h:168
AUTH_PROBE_TIMEOUT
#define AUTH_PROBE_TIMEOUT
timeout for probe packets for SOA
Definition: authzone.c:78
ring_peek_time
static struct timeval * ring_peek_time(struct ringbuf *r)
peek at timevalue for next item in ring
Definition: delayer.c:294
q_ans_query
static void q_ans_query(struct q_ans *q, struct auth_zones *az, struct query_info *qinfo, struct regional *region, int expected_fallback, uint8_t *dp_nm, size_t dp_nmlen)
make q_ans query
Definition: unitauth.c:765
del_info::num_msgs
size_t num_msgs
number of msgs removed
Definition: remote.c:1611
dynlibmod_env
Definition: dynlibmod.h:114
lruhash_insert
void lruhash_insert(struct lruhash *table, hashvalue_type hash, struct lruhash_entry *entry, void *data, void *cb_arg)
Insert a new element into the hashtable.
Definition: lruhash.c:300
sldns_buffer::_capacity
size_t _capacity
The amount of data the buffer can contain.
Definition: sbuffer.h:125
cfg_str2list_insert
int cfg_str2list_insert(struct config_str2list **head, char *item, char *i2)
Insert string into str2list.
Definition: config_file.c:1750
regional_alloc
void * regional_alloc(struct regional *r, size_t size)
Allocate size bytes of memory inside regional.
Definition: regional.c:122
module_qstate::reply_origin
struct sock_list * reply_origin
origin of the reply (can be NULL from cache, list for cnames)
Definition: module.h:614
edns_data::bits
uint16_t bits
the EDNS bits field from ttl (host order): Z
Definition: msgparse.h:223
handle_ipv6_ptr
static enum module_ext_state handle_ipv6_ptr(struct module_qstate *qstate, int id)
Handle PTR queries for IPv6 addresses.
Definition: dns64.c:455
config_file::unwanted_threshold
size_t unwanted_threshold
what threshold for unwanted action.
Definition: config_file.h:270
fill_buffer_with_reply
static void fill_buffer_with_reply(sldns_buffer *buffer, struct entry *entry, uint8_t *q, size_t qlen, int tcp_pkt_counter)
Fill buffer with reply from the entry.
Definition: fake_event.c:326
ub_ctx_data_add
int ub_ctx_data_add(struct ub_ctx *ctx, const char *data)
Add localdata to the library local authority info.
Definition: libunbound.c:1352
lruhash_entry::lock
lock_rw_type lock
rwlock for access to the contents of the entry Note that it does not cover the lru_ and overflow_ ptr...
Definition: lruhash.h:210
swap_np
static void swap_np(rbnode_type **x, rbnode_type **y)
helpers for delete: swap node pointers
Definition: rbtree.c:299
parse_extract_edns
int parse_extract_edns(struct msg_parse *msg, struct edns_data *edns, struct regional *region)
After parsing the packet, extract EDNS data from packet.
Definition: msgparse.c:967
trust_anchor::autr
struct autr_point_data * autr
Autotrust anchor point data, or NULL.
Definition: val_anchor.h:112
dynlibmod_init
int dynlibmod_init(struct module_env *env, int id)
dynlib module init
Definition: dynlibmod.c:73
rtt_lost
void rtt_lost(struct rtt_info *rtt, int orig)
Update the statistics with a new timeout expired observation.
Definition: rtt.c:100
packed_rrset_sizeof
size_t packed_rrset_sizeof(struct packed_rrset_data *d)
Memory size of rrset data.
Definition: packed_rrset.c:80
fake_pending::cb_arg
void * cb_arg
callback user argument
Definition: replay.h:344
reply_nsec_signer
static uint8_t * reply_nsec_signer(struct reply_info *rep, size_t *signer_len, uint16_t *dclass)
see if the reply has signed NSEC records and return the signer
Definition: val_neg.c:852
val_neg_data_compare
int val_neg_data_compare(const void *a, const void *b)
Comparison function for rbtree val neg data elements.
Definition: val_neg.c:65
event_reg_install
static void event_reg_install(FILE *out, const char *pathname)
install registry entries for eventlog
Definition: w_inst.c:73
replay_moment::addrlen
socklen_t addrlen
length of addr, if 0, then any address will do
Definition: replay.h:230
sldns_opcodes
struct sldns_struct_lookup_table * sldns_opcodes
Operation codes.
Definition: wire2str.c:111
sldns_b32_pton_calculate_size
size_t sldns_b32_pton_calculate_size(size_t src_text_length)
calculates the size needed to store the result of b32_pton
Definition: parseutil.c:454
addrtree_find
struct addrnode * addrtree_find(struct addrtree *tree, const addrkey_t *addr, addrlen_t sourcemask, time_t now)
Find a node containing an element in the tree.
Definition: addrtree.c:474
lru_demote
void lru_demote(struct lruhash *table, struct lruhash_entry *entry)
Demote entry, so it becomes the least recently used in the LRU list.
Definition: lruhash.c:553
comm_signal::callback
void(* callback)(int, void *)
callback function, takes signal number and user arg
Definition: netevent.h:343
ipsecmod_get_funcblock
struct module_func_block * ipsecmod_get_funcblock(void)
Get the function block with pointers to the ipsecmod functions.
infra_delete
void infra_delete(struct infra_cache *infra)
Delete infra cache.
Definition: infra.c:282
print_dp_main
static void print_dp_main(RES *ssl, struct delegpt *dp, struct dns_msg *msg)
print main dp info
Definition: cachedump.c:789
START_IO_INTERVAL
#define START_IO_INTERVAL
number of msec between starting io ports
Definition: perf.c:143
fake_pending::timeout
int timeout
original timeout in seconds from 'then'
Definition: replay.h:346
LDNS_RDATA_FIELD_DESCRIPTORS_COUNT
#define LDNS_RDATA_FIELD_DESCRIPTORS_COUNT
Definition: rrdef.c:627
ub_server_stats::qtls
long long qtls
number of queries over (DNS over) TLS
Definition: unbound.h:699
fptr_whitelist_pending_tcp
int fptr_whitelist_pending_tcp(comm_point_callback_type *fptr)
Check function pointer whitelist for pending tcp callback values.
Definition: fptr_wlist.c:202
service_callback::next
struct service_callback * next
next in callback list
Definition: outside_network.h:308
iter_qstate::depth
int depth
The depth of this query, this means the depth of recursion.
Definition: iterator.h:246
init_parents
static void init_parents(struct val_anchors *anchors)
initialise parent pointers in the tree
Definition: val_anchor.c:189
chunkline_get_line_collated
static int chunkline_get_line_collated(struct auth_chunk **chunk, size_t *chunk_pos, sldns_buffer *buf)
find a line with ( ) collated
Definition: authzone.c:4214
dns_msg_ansadd
int dns_msg_ansadd(struct dns_msg *msg, struct regional *region, struct ub_packed_rrset_key *rrset, time_t now)
Add rrset to authority section in unpacked dns_msg message.
Definition: dns.c:451
do_view_datas_add
static void do_view_datas_add(RES *ssl, struct worker *worker, char *arg)
Add new RR data from stdin to view.
Definition: remote.c:1464
checkfile
static void checkfile(char *f1, char *f2)
check that file is the same as other file
Definition: unitauth.c:549
incoming_ssl_fd
void * incoming_ssl_fd(void *sslctx, int fd)
accept a new fd and wrap it in a BIO in SSL
Definition: net_help.c:1205
mesh.h
ub_event_new
struct ub_event * ub_event_new(struct ub_event_base *, int fd, short bits, void(*cb)(int, short, void *), void *arg)
Create a new ub_event for the event base.
Definition: ub_event.c:290
ub_c_parse
int ub_c_parse(void)
the yacc lex generated parse function
sldns_wire2str_apl_scan
int sldns_wire2str_apl_scan(uint8_t **d, size_t *dl, char **s, size_t *sl)
Scan wireformat apl field to string, with user buffers.
Definition: wire2str.c:1155
daemon::use_rpz
int use_rpz
some RPZ policies are configured
Definition: daemon.h:136
sldns_buffer_write_at
INLINE void sldns_buffer_write_at(sldns_buffer *buffer, size_t at, const void *data, size_t count)
writes the given data to the buffer at the specified position
Definition: sbuffer.h:434
hashword
uint32_t hashword(const uint32_t *k, size_t length, uint32_t initval)
Hash key made of 4byte chunks.
Definition: lookup3.c:218
pythonmod_env::func_inform
PyObject * func_inform
Module super_inform function.
Definition: pythonmod.c:94
ub_wait
int ub_wait(struct ub_ctx *ctx)
Wait for a context to finish with results.
Definition: libunbound.c:626
copy_msg
static int copy_msg(struct regional *region, struct lruhash_entry *e, struct query_info **k, struct reply_info **d)
copy msg to worker pad
Definition: cachedump.c:223
check_no_anchor
static int check_no_anchor(struct val_anchors *anchors, uint8_t *nm, size_t l, uint16_t c)
check no anchor and unlock
Definition: val_utils.c:1001
pkthdr.h
respip_set_delete
void respip_set_delete(struct respip_set *set)
Delete response IP set.
Definition: respip.c:84
msg_rrset_duplicate
static int msg_rrset_duplicate(struct dns_msg *msg, uint8_t *nm, size_t nmlen, uint16_t type, uint16_t dclass)
see if rrset is a duplicate in the answer message
Definition: authzone.c:203
tap_data_free
void tap_data_free(struct tap_data *data)
delete the tap structure
Definition: unbound-dnstap-socket.c:758
optind
int optind
getopt global, in case header files fail to declare it.
config_file::use_syslog
int use_syslog
should log messages be sent to syslogd
Definition: config_file.h:296
log_err_addr
void log_err_addr(const char *str, const char *err, struct sockaddr_storage *addr, socklen_t addrlen)
Log errno and addr.
Definition: net_help.c:575
delno
static int delno
number of deleted files
Definition: unitauth.c:462
netblockdnametoaddr
int netblockdnametoaddr(uint8_t *dname, size_t dnamelen, struct sockaddr_storage *addr, socklen_t *addrlen, int *net, int *af)
RPZ format netblock to network byte order address and netblock example RPZ netblock format dnames:
Definition: net_help.c:396
hints_apply_cfg
int hints_apply_cfg(struct iter_hints *hints, struct config_file *cfg)
Process hints config.
Definition: iter_hints.c:431
comm_point_udp_callback
void comm_point_udp_callback(int fd, short event, void *arg)
This routine is published for checks and tests, and is only used internally.
Definition: netevent.c:681
do_moment_and_advance
static void do_moment_and_advance(struct replay_runtime *runtime)
Perform actions or checks determined by the moment.
Definition: fake_event.c:736
inplace_cb_register
int inplace_cb_register(void *cb, enum inplace_cb_list_type type, void *cbarg, struct module_env *env, int id)
Register an inplace callback function.
Definition: module.c:127
autr_ta::revoked
uint8_t revoked
revoked TA was seen
Definition: autotrust.h:83
answer_chaos
static int answer_chaos(struct worker *w, struct query_info *qinfo, struct edns_data *edns, struct comm_reply *repinfo, sldns_buffer *pkt)
Answer CH class queries.
Definition: worker.c:928
iter_delegpt.h
local_zone_str2type
int local_zone_str2type(const char *str, enum localzone_type *t)
Parse the string into localzone type.
Definition: localzone.c:1771
infra_adjust
struct infra_cache * infra_adjust(struct infra_cache *infra, struct config_file *cfg)
Adjust infra cache to use updated configuration settings.
Definition: infra.c:294
module_stack::num
int num
the number of modules
Definition: modstack.h:52
val_find_signer
void val_find_signer(enum val_classification subtype, struct query_info *qinf, struct reply_info *rep, size_t cname_skip, uint8_t **signer_name, size_t *signer_len)
Given a response, determine the name of the "signer".
Definition: val_utils.c:217
fptr_whitelist_mod_init
int fptr_whitelist_mod_init(int(*fptr)(struct module_env *env, int id))
Check function pointer whitelist for module init call values.
Definition: fptr_wlist.c:389
reply_info_copy
struct reply_info * reply_info_copy(struct reply_info *rep, struct alloc_cache *alloc, struct regional *region)
Copy reply_info and all rrsets in it and allocate.
Definition: msgreply.c:700
UB_STATS_OPCODE_NUM
#define UB_STATS_OPCODE_NUM
number of opcodes in stats
Definition: unbound.h:656
fptr_whitelist_mod_operate
int fptr_whitelist_mod_operate(void(*fptr)(struct module_qstate *qstate, enum module_ev event, int id, struct outbound_entry *outbound))
Check function pointer whitelist for module operate call values.
Definition: fptr_wlist.c:445
LDNS_RDF_TYPE_ILNP64
@ LDNS_RDF_TYPE_ILNP64
4 shorts represented as 4 * 16 bit hex numbers separated by colons.
Definition: rrdef.h:334
nonce_cache_key::magic_query
uint8_t magic_query[DNSCRYPT_MAGIC_HEADER_LEN]
the client_magic used by the client, this is associated to 1 cert only
Definition: dnscrypt.c:68
worker::back
struct outside_network * back
the backside outside network interface to the auth servers
Definition: worker.h:96
comm_point::comm_ssl_shake_hs_read
@ comm_ssl_shake_hs_read
ssl_write wants to read
Definition: netevent.h:202
module_event_noreply
@ module_event_noreply
no reply, timeout or other error
Definition: module.h:561
serviced_query::cblist
struct service_callback * cblist
list of interested parties that need callback on results.
Definition: outside_network.h:392
auth_zones_cleanup
void auth_zones_cleanup(struct auth_zones *az)
Cleanup auth zones.
Definition: authzone.c:6674
massage_qname
static char * massage_qname(const char *nm, int *reverse)
massage input name
Definition: unbound-host.c:164
daemon_remote_start_accept
void daemon_remote_start_accept(struct daemon_remote *rc)
Stop accept handlers for TCP (until enabled again)
Definition: remote.c:436
dl_tv_subtract
static void dl_tv_subtract(struct timeval *t1, const struct timeval *t2)
timeval subtract, t1 -= t2
Definition: delayer.c:186
mesh_reply::local_alias
struct local_rrset * local_alias
same as that in query_info.
Definition: mesh.h:232
http_parse_ttl
static int http_parse_ttl(sldns_buffer *buf, struct sldns_file_parse_state *pstate)
process $TTL for http
Definition: authzone.c:4271
sldns_buffer_end
INLINE uint8_t * sldns_buffer_end(sldns_buffer *buffer)
returns a pointer to the end of the buffer (the data at the buffer's limit).
Definition: sbuffer.h:356
usage
static void usage(char *argv[])
usage information for pktview
Definition: pktview.c:52
neg_lru_touch
static void neg_lru_touch(struct val_neg_cache *neg, struct val_neg_data *data)
Touch LRU for data element, put it at the start of the LRU list.
Definition: val_neg.c:179
rrset_insert_rr
int rrset_insert_rr(struct regional *region, struct packed_rrset_data *pd, uint8_t *rdata, size_t rdata_len, time_t ttl, const char *rrstr)
insert RR into RRset data structure; Wastes a couple of bytes
Definition: localzone.c:358
hash_infra
static hashvalue_type hash_infra(struct sockaddr_storage *addr, socklen_t addrlen, uint8_t *name)
calculate infra hash for a key
Definition: infra.c:355
forwards_delete
void forwards_delete(struct iter_forwards *fwd)
Delete forwards.
Definition: iter_fwd.c:99
comm_timer_set
void comm_timer_set(struct comm_timer *timer, struct timeval *tv)
reset timevalue for timer.
Definition: fake_event.c:1515
sldns_buffer_write_u16
INLINE void sldns_buffer_write_u16(sldns_buffer *buffer, uint16_t data)
writes the given 2 byte integer at the current position in the buffer
Definition: sbuffer.h:536
config_file::do_udp
int do_udp
do udp query support.
Definition: config_file.h:93
LDNS_RR_COMPRESS
@ LDNS_RR_COMPRESS
compression is allowed
Definition: rrdef.h:74
ext_thr_info::argv
char ** argv
array of names to query
Definition: asynclook.c:182
ub_ctx_error_exit
static void ub_ctx_error_exit(struct ub_ctx *ctx, const char *str, const char *str2)
print ub context creation error and exit
Definition: unbound-anchor.c:267
views_print
void views_print(struct views *v)
Debug helper.
Definition: view.c:244
pending_tcp_query
struct waiting_tcp * pending_tcp_query(struct serviced_query *sq, sldns_buffer *packet, int timeout, comm_point_callback_type *callback, void *callback_arg)
Send TCP query.
Definition: outside_network.c:1319
ub_signal_add
int ub_signal_add(struct ub_event *ev, struct timeval *tv)
Activate a signal event.
Definition: ub_event_pluggable.c:630
order_lock::node
rbnode_type node
rbnode in all tree
Definition: lock_verify.c:71
answer_notify
static void answer_notify(struct worker *w, struct query_info *qinfo, struct edns_data *edns, sldns_buffer *pkt, struct comm_reply *repinfo)
Answer notify queries.
Definition: worker.c:989
views::lock
lock_rw_type lock
lock on the view tree
Definition: view.h:58
edns_opt_copy_region
struct edns_option * edns_opt_copy_region(struct edns_option *list, struct regional *region)
Copy edns option list allocated to the new region.
Definition: msgreply.c:1143
assembled_rrset_delete
static void assembled_rrset_delete(struct ub_packed_rrset_key *pkey)
delete assembled rrset
Definition: val_anchor.c:99
sldns_wire2str_eui48_scan
int sldns_wire2str_eui48_scan(uint8_t **d, size_t *dl, char **s, size_t *sl)
Scan wireformat EUI48 field to string, with user buffers.
Definition: wire2str.c:1666
dnsc_read_from_file
static int dnsc_read_from_file(char *fname, char *buf, size_t count)
Read the content of fname into buf.
Definition: dnscrypt.c:535
mesh_delete_all
void mesh_delete_all(struct mesh_area *mesh)
Delete all mesh states from the mesh.
Definition: mesh.c:304
massage_type
static int massage_type(const char *t, int reverse, int *multi)
massage input type
Definition: unbound-host.c:184
addrtree_delete
void addrtree_delete(struct addrtree *tree)
Free tree and all nodes below.
Definition: addrtree.c:275
regional_create_custom
struct regional * regional_create_custom(size_t size)
Create a new region, with custom settings.
Definition: regional.c:84
sldns_struct_rr_descriptor::_dname_count
uint8_t _dname_count
The number of DNAMEs in the _wireformat string, for parsing.
Definition: rrdef.h:466
tcp_proxy::addr
struct sockaddr_storage addr
remote client address
Definition: delayer.c:123
sldns_wire2str_int8_scan
int sldns_wire2str_int8_scan(uint8_t **data, size_t *data_len, char **str, size_t *str_len)
Scan wireformat int8 field to string, with user buffers.
Definition: wire2str.c:1027
dnskey_get_keysize
static size_t dnskey_get_keysize(struct packed_rrset_data *data, size_t idx)
Get size of key in keyset.
Definition: val_kentry.c:371
config_delauths
void config_delauths(struct config_auth *list)
Delete items in config auth list.
Definition: config_file.c:1339
iter_ns_probability
int iter_ns_probability(struct ub_randstate *rnd, int n, int m)
Select randomly with n/m probability.
Definition: iter_utils.c:664
acl_list_apply_cfg
int acl_list_apply_cfg(struct acl_list *acl, struct config_file *cfg, struct views *v)
Process access control config.
Definition: acl_list.c:437
wsvc_cron_cb
void wsvc_cron_cb(void *arg)
windows cron timer callback handler
Definition: win_svc.c:594
nsec3_cached_hash::b32
uint8_t * b32
the hash result in base32 encoding
Definition: val_nsec3.h:244
log_packed_rrset
void log_packed_rrset(enum verbosity_value v, const char *str, struct ub_packed_rrset_key *rrset)
Print the string with prefix, one rr per line.
Definition: packed_rrset.c:299
cfg_count_numbers
int cfg_count_numbers(const char *str)
Count number of values in the string.
Definition: config_file.c:1833
ring_pop
static int ring_pop(struct ringbuf *r, sldns_buffer *pkt, struct timeval *tv, struct proxy **p)
get entry from ringbuffer
Definition: delayer.c:303
rr_is_dnskey_sep
static int rr_is_dnskey_sep(uint16_t t, uint8_t *rdata, size_t len)
Check if KSK DNSKEY.
Definition: autotrust.c:291
ipsecmod_deinit
void ipsecmod_deinit(struct module_env *env, int id)
Deinit the ipsecmod module.
ub_packed_rrset_ttl
time_t ub_packed_rrset_ttl(struct ub_packed_rrset_key *key)
Get TTL of rrset.
Definition: packed_rrset.c:318
respip_set_get_tree
struct rbtree_type * respip_set_get_tree(struct respip_set *set)
returns address of the IP address tree of the specified respip set; returns NULL for NULL input; exis...
Definition: respip.c:95
ub_default_event_base
struct ub_event_base * ub_default_event_base(int sigs, time_t *time_secs, struct timeval *time_tv)
Return a default event base.
Definition: ub_event.c:210
cfg_parser
struct config_parser_state * cfg_parser
global config during parsing
Definition: config_file.c:83
do_chunked_read
static BIO * do_chunked_read(SSL *ssl)
read chunked data from connection
Definition: unbound-anchor.c:989
do_stub_remove
static void do_stub_remove(RES *ssl, struct worker *worker, char *args)
do the stub_remove command
Definition: remote.c:2218
iter_dp_cangodown
int iter_dp_cangodown(struct query_info *qinfo, struct delegpt *dp)
See if delegpt can go down a step to the qname or not.
Definition: iter_utils.c:1377
delegpt_free_mlc
void delegpt_free_mlc(struct delegpt *dp)
free malloced delegation point.
Definition: iter_delegpt.c:547
addr_mask
void addr_mask(struct sockaddr_storage *addr, socklen_t len, int net)
Make sure the sockaddr ends in zeroes.
Definition: net_help.c:677
fptr_ok
#define fptr_ok(x)
Macro to perform an assertion check for fptr wlist checks.
Definition: fptr_wlist.h:70
fwd_init_parents
static void fwd_init_parents(struct iter_forwards *fwd)
initialise parent pointers in the tree
Definition: iter_fwd.c:150
nsec3_prove_nameerror
enum sec_status nsec3_prove_nameerror(struct module_env *env, struct val_env *ve, struct ub_packed_rrset_key **list, size_t num, struct query_info *qinfo, struct key_entry_key *kkey)
Determine if the set of NSEC3 records provided with a response prove NAME ERROR.
Definition: val_nsec3.c:1065
ub_event_base_free
void ub_event_base_free(struct ub_event_base *base)
Free event base.
Definition: ub_event_pluggable.c:476
port_comm::index
int index
index in the out array of the interface
Definition: outside_network.h:207
config_file::log_servfail
int log_servfail
log servfails with a reason
Definition: config_file.h:308
ub_server_stats
per worker statistics.
Definition: unbound.h:663
pythonmod_env::data
PyObject * data
Module data.
Definition: pythonmod.c:100
auth_free_master_addrs
static void auth_free_master_addrs(struct auth_addr *list)
free master addr list
Definition: authzone.c:2051
sldns_wire2str_loc_scan
int sldns_wire2str_loc_scan(uint8_t **d, size_t *dl, char **str, size_t *sl)
Scan wireformat LOC field to string, with user buffers.
Definition: wire2str.c:1384
algo_needs_reason
void algo_needs_reason(struct module_env *env, int alg, char **reason, char *s)
Format error reason for algorithm missing.
Definition: val_sigcrypt.c:541
tap_socket::ev_cb
void(* ev_cb)(int, short, void *)
the callback, for the event, ev_cb(fd, bits, arg)
Definition: unbound-dnstap-socket.c:149
val_reply_remove_auth
void val_reply_remove_auth(struct reply_info *rep, size_t index)
Remove rrset with index from reply, from the authority section.
Definition: val_utils.c:914
sldns_wire2str_rdata_unknown_scan
int sldns_wire2str_rdata_unknown_scan(uint8_t **data, size_t *data_len, char **str, size_t *str_len)
Scan wireformat rdata to string in unknown format, with user buffers.
Definition: wire2str.c:748
alloc.h
ub_ctx_create
struct ub_ctx * ub_ctx_create(void)
Create a resolving and validation context.
Definition: libunbound.c:165
service_cfgfile
static char * service_cfgfile
config file to open.
Definition: win_svc.c:68
service_findwait
static int service_findwait(struct timeval *now, struct timeval *wait, struct ringbuf *ring, struct tcp_proxy *tcplist)
find waiting time
Definition: delayer.c:839
val_neg_cache::last
struct val_neg_data * last
last in lru (least recently used element)
Definition: val_neg.h:76
sldns_hexdigit_to_int
int sldns_hexdigit_to_int(char ch)
Returns the int value of the given (hex) digit.
Definition: parseutil.c:187
auth_xfer::expiry
time_t expiry
expiry time (from SOA), time until zone data is not considered valid any more, if no master responds ...
Definition: authzone.h:266
fptr_whitelist_tube_listen
int fptr_whitelist_tube_listen(tube_callback_type *fptr)
Check function pointer whitelist for tube listen handler values.
Definition: fptr_wlist.c:566
tcp_req_info_delete
void tcp_req_info_delete(struct tcp_req_info *req)
Delete tcp request structure.
Definition: listen_dnsport.c:1611
ub_server_stats::ans_secure
long long ans_secure
answers that were secure (AD)
Definition: unbound.h:727
perfinfo::rset
fd_set rset
readset
Definition: perf.c:116
inplace_cb_reply_cache_call
int inplace_cb_reply_cache_call(struct module_env *env, struct query_info *qinfo, struct module_qstate *qstate, struct reply_info *rep, int rcode, struct edns_data *edns, struct comm_reply *repinfo, struct regional *region)
Call the registered functions in the inplace_cb_reply_cache linked list.
Definition: msgreply.c:1066
module_error
@ module_error
module could not finish the query
Definition: module.h:545
edns_data::opt_list
struct edns_option * opt_list
rdata element list, or NULL if none
Definition: msgparse.h:227
config_file::key_cache_slabs
size_t key_cache_slabs
slabs in the key cache.
Definition: config_file.h:390
pythonmod_get_funcblock
struct module_func_block * pythonmod_get_funcblock(void)
Get the module function block.
Definition: pythonmod.c:587
dnsc_key_to_fingerprint
void dnsc_key_to_fingerprint(char fingerprint[80U], const uint8_t *const key)
Helper function to convert a binary key into a printable fingerprint.
Definition: dnscrypt.c:626
S_NUMBER_OR_ZERO
#define S_NUMBER_OR_ZERO(str, var)
put integer_or_zero into variable
Definition: config_file.c:397
fake_pending
Pending queries to network, fake replay version.
Definition: replay.h:328
sldns_rr_descriptor_field_type
sldns_rdf_type sldns_rr_descriptor_field_type(const sldns_rr_descriptor *descriptor, size_t field)
returns the rdf type for the given rdata field number of the rr type for the given descriptor.
Definition: rrdef.c:674
listen_sslctx_setup
int listen_sslctx_setup(void *ctxt)
Set SSL_OP_NOxxx options on SSL context to disable bad crypto.
Definition: net_help.c:888
PARSE_TABLE_SIZE
#define PARSE_TABLE_SIZE
number of buckets in parse rrset hash table.
Definition: msgparse.h:75
outnet_tcptimer
void outnet_tcptimer(void *arg)
callback for outgoing TCP timer event
Definition: outside_network.c:1286
outside_network::delay_tv
struct timeval delay_tv
timeout for delayclose
Definition: outside_network.h:108
wsvc_setup_worker
void wsvc_setup_worker(struct worker *worker)
Setup lead worker events.
Definition: win_svc.c:607
pending::timer
struct comm_timer * timer
timeout event
Definition: outside_network.h:231
module_env::scratch
struct regional * scratch
region for temporary usage.
Definition: module.h:465
tap_socket_list_insert
static int tap_socket_list_insert(struct tap_socket_list **liststart, struct tap_socket *s)
add tap socket to list
Definition: unbound-dnstap-socket.c:370
cfg_parse_memsize
int cfg_parse_memsize(const char *str, size_t *res)
Convert a 'nice' memory or file size into a bytecount From '100k' to 102400.
Definition: config_file.c:1868
config_file::log_queries
int log_queries
log queries with one line per query
Definition: config_file.h:300
ub_event_new
struct ub_event * ub_event_new(struct ub_event_base *base, int fd, short bits, void(*cb)(int, short, void *), void *arg)
Create a new ub_event for the event base.
Definition: ub_event.c:290
parse_section
static int parse_section(sldns_buffer *pkt, struct msg_parse *msg, struct regional *region, sldns_pkt_section section, uint16_t num_rrs, size_t *num_rrsets)
Parse packet RR section, for answer, authority and additional sections.
Definition: msgparse.c:821
xml_charhandle
static void xml_charhandle(void *userData, const XML_Char *s, int len)
XML handle character data, the data inside an element.
Definition: unbound-anchor.c:1243
ub_ctx::cfglock
lock_basic_type cfglock
mutex for access to env.cfg, finalized and dothread
Definition: context.h:78
val_neg_zone::tree
rbtree_type tree
tree of NSEC data for this zone, sorted canonical by NSEC owner name
Definition: val_neg.h:123
key_entry_create_bad
struct key_entry_key * key_entry_create_bad(struct regional *region, uint8_t *name, size_t namelen, uint16_t dclass, time_t ttl, time_t now)
Create a bad entry, in the given region.
Definition: val_kentry.c:324
timehist_clear
void timehist_clear(struct timehist *hist)
Clear histogram.
Definition: timehist.c:110
comm_point_tcp_handle_write
static int comm_point_tcp_handle_write(int fd, struct comm_point *c)
Handle tcp writing callback.
Definition: netevent.c:1517
LDNS_RDF_TYPE_TSIGTIME
@ LDNS_RDF_TYPE_TSIGTIME
tsig time 48 bits
Definition: rrdef.h:306
alloc_test
static void alloc_test(void)
test alloc code
Definition: unitmain.c:75
ub_server_stats::mem_stream_wait
long long mem_stream_wait
number of bytes in the stream wait buffers
Definition: unbound.h:789
ub_server_stats::num_queries_ip_ratelimited
long long num_queries_ip_ratelimited
number of queries that have been dropped/ratelimited by ip.
Definition: unbound.h:667
mesh_report_reply
void mesh_report_reply(struct mesh_area *mesh, struct outbound_entry *e, struct comm_reply *reply, int what)
Handle new event from the wire.
Definition: mesh.c:756
comm_point::tcp_parent
struct comm_point * tcp_parent
parent communication point (for TCP sockets)
Definition: netevent.h:174
comm_base_dispatch
void comm_base_dispatch(struct comm_base *b)
Dispatch the comm base events.
Definition: netevent.c:243
verb_cert
static void verb_cert(const char *msg, X509 *x)
printout certificate in detail
Definition: unbound-anchor.c:321
module_env::hints
struct iter_hints * hints
iterator forwarder information.
Definition: module.h:509
ta_key
Trust anchor key.
Definition: val_anchor.h:79
context_release_alloc
void context_release_alloc(struct ub_ctx *ctx, struct alloc_cache *alloc, int locking)
Release an alloc.
Definition: context.c:206
ub_server_stats::qbit_Z
long long qbit_Z
number of queries with Z bit
Definition: unbound.h:713
sldns_enum_rdf_type
sldns_enum_rdf_type
The different types of RDATA fields.
Definition: rrdef.h:264
auth_master
auth zone master upstream, and the config settings for it
Definition: authzone.h:432
modstack_config
int modstack_config(struct module_stack *stack, const char *module_conf)
Read config file module settings and set up the modfunc block.
Definition: modstack.c:99
autr_get_num_anchors
size_t autr_get_num_anchors(struct val_anchors *anchors)
See if autotrust anchors are configured and how many.
Definition: autotrust.c:106
RESPONSE_TYPE_THROWAWAY
@ RESPONSE_TYPE_THROWAWAY
'throwaway' means that this particular response should be discarded and the next nameserver should be...
Definition: iter_resptype.h:78
fptr_whitelist_hash_compfunc
int fptr_whitelist_hash_compfunc(lruhash_compfunc_type fptr)
Check function pointer whitelist for lruhash compfunc callback values.
Definition: fptr_wlist.c:269
O_UNS
#define O_UNS(opt, str, var)
compare and print unsigned option
Definition: config_file.c:838
addr_tree_find
struct addr_tree_node * addr_tree_find(rbtree_type *tree, struct sockaddr_storage *addr, socklen_t addrlen, int net)
Find element in addr tree.
Definition: dnstree.c:241
daemon_create_workers
static void daemon_create_workers(struct daemon *daemon)
Allocate empty worker structures.
Definition: daemon.c:424
auth_master::ssl
int ssl
use ssl for channel
Definition: authzone.h:447
respip_clear
void respip_clear(struct module_qstate *qstate, int id)
response-ip cleanup query state
Definition: respip.c:1258
dt_msg_queue_create
struct dt_msg_queue * dt_msg_queue_create(void)
Create new (empty) worker message queue.
Definition: dtstream.c:102
bin_overflow_remove
void bin_overflow_remove(struct lruhash_bin *bin, struct lruhash_entry *entry)
Remove entry from bin overflow chain.
Definition: lruhash.c:167
processFinished
static int processFinished(struct module_qstate *qstate, struct val_qstate *vq, struct val_env *ve, int id)
The Finished state.
Definition: validator.c:2141
trustanchor_state2str
static const char * trustanchor_state2str(autr_state_type s)
string for a trustanchor state
Definition: autotrust.c:1067
parse_delegpt
static struct delegpt * parse_delegpt(RES *ssl, char *args, uint8_t *nm, int allow_names)
parse args into delegpt
Definition: remote.c:1988
config_file::edns_buffer_size
size_t edns_buffer_size
EDNS buffer size to use.
Definition: config_file.h:144
config_file::dlv_anchor_file
char * dlv_anchor_file
DLV anchor file.
Definition: config_file.h:335
ext_thr_info::numq
int numq
number of queries to do
Definition: asynclook.c:184
run_scenario
static void run_scenario(struct replay_runtime *runtime)
run the scenario in event callbacks
Definition: fake_event.c:814
dt_io_thread::ssl_ctx
void * ssl_ctx
ssl context for the io thread, for tls connections.
Definition: dtstream.h:132
rpz_clear
int rpz_clear(struct rpz *r)
Clear local-zones and respip data in RPZ, used after reloading file or AXFR/HTTP transfer.
Definition: rpz.c:313
matches_nolocation
static int matches_nolocation
if matching within a section should disregard the order of RRs.
Definition: unitmsgparse.c:63
sockaddr_cmp
int sockaddr_cmp(struct sockaddr_storage *addr1, socklen_t len1, struct sockaddr_storage *addr2, socklen_t len2)
Compare two sockaddrs.
Definition: net_help.c:596
context_new
struct ctx_query * context_new(struct ub_ctx *ctx, const char *name, int rrtype, int rrclass, ub_callback_type cb, ub_event_callback_type cb_event, void *cbarg)
Create new query in context, add to querynum list.
Definition: context.c:139
fptr_whitelist_rbtree_cmp
int fptr_whitelist_rbtree_cmp(int(*fptr)(const void *, const void *))
Check function pointer whitelist for rbtree cmp callback values.
Definition: fptr_wlist.c:219
dt_frame_read_buf::control_frame
int control_frame
Set to 1 if this is a control frame, 0 otherwise (ie data frame).
Definition: dtstream.h:109
fatal
static void fatal(const char *str)
fatal exit
Definition: anchor-update.c:58
sldns_b64_ntop_calculate_size
size_t sldns_b64_ntop_calculate_size(size_t srcsize)
calculates the size needed to store the result of b64_ntop
Definition: parseutil.c:607
iter_mark_pside_cycle_targets
void iter_mark_pside_cycle_targets(struct module_qstate *qstate, struct delegpt *dp)
Mark targets that result in a dependency cycle as done, so they will not get selected as targets.
Definition: iter_utils.c:716
VAL_FINDKEY_STATE
@ VAL_FINDKEY_STATE
find the proper keys for validation, follow trust chain
Definition: validator.h:135
errinf_origin
void errinf_origin(struct module_qstate *qstate, struct sock_list *origin)
Append text to error info: from 1.2.3.4.
Definition: config_file.c:2404
ub_ctx::seed_rnd
struct ub_randstate * seed_rnd
random state used to seed new random state structures
Definition: context.h:118
mesh_detect_cycle
int mesh_detect_cycle(struct module_qstate *qstate, struct query_info *qinfo, uint16_t flags, int prime, int valrec)
Find cycle; see if the given mesh is in the targets sub, or sub-sub, ...
Definition: mesh.c:1784
ce_response::ce_rr
int ce_rr
NSEC3 record that proved ce.
Definition: val_nsec3.c:86
perform_arith
static double perform_arith(double x, char op, double y, double *res)
perform arithmetic operator
Definition: replay.c:702
zone_example_com
static const char * zone_example_com
auth zone for test
Definition: unitauth.c:68
tcp_req_info_handle_writedone
void tcp_req_info_handle_writedone(struct tcp_req_info *req)
Handle write done of the last result packet.
Definition: listen_dnsport.c:1783
recv_one
static void recv_one(int fd, int udp, SSL *ssl, sldns_buffer *buf)
receive DNS datagram over TCP and print it
Definition: streamtcp.c:201
INIT_REQUEST_3_STATE
@ INIT_REQUEST_3_STATE
Stub priming events reactivate here, most other events pass through this naturally as the 3rd part of...
Definition: iterator.h:187
msg_cache_remove
void msg_cache_remove(struct module_env *env, uint8_t *qname, size_t qnamelen, uint16_t qtype, uint16_t qclass, uint16_t flags)
Remove entry from the message cache.
Definition: dns.c:115
sldns_tsig_errors
struct sldns_struct_lookup_table * sldns_tsig_errors
tsig errors are the rcodes with extra (higher) values
Definition: wire2str.c:197
print_neg_cache
static void print_neg_cache(struct val_neg_cache *neg)
debug printout of neg cache
Definition: unitneg.c:54
alloc_cache::lock
lock_quick_type lock
lock, only used for the super.
Definition: alloc.h:74
dns64_operate
void dns64_operate(struct module_qstate *qstate, enum module_ev event, int id, struct outbound_entry *outbound)
dns64 operate on a query
Definition: dns64.c:670
acl_list_insert
static struct acl_addr * acl_list_insert(struct acl_list *acl, struct sockaddr_storage *addr, socklen_t addrlen, int net, enum acl_access control, int complain_duplicates)
insert new address into acl_list structure
Definition: acl_list.c:77
usage
static void usage(char *argv[])
usage information for asynclook
Definition: asynclook.c:97
lruhash_remove
void lruhash_remove(struct lruhash *table, hashvalue_type hash, void *key)
Remove entry from hashtable.
Definition: lruhash.c:378
LDNS_RR_TYPE_RT
@ LDNS_RR_TYPE_RT
RFC1183.
Definition: rrdef.h:125
mesh_area_find
struct mesh_state * mesh_area_find(struct mesh_area *mesh, struct respip_client_info *cinfo, struct query_info *qinfo, uint16_t qflags, int prime, int valrec)
Find a mesh state in the mesh area.
Definition: mesh.c:1425
lookup_reg_int
static int lookup_reg_int(const char *key, const char *name)
Obtain registry integer (if it exists).
Definition: win_svc.c:199
iter_deinit
void iter_deinit(struct module_env *env, int id)
iterator deinit
Definition: iterator.c:112
rbtree_rotate_left
static void rbtree_rotate_left(rbtree_type *rbtree, rbnode_type *node)
rotate subtree left (to preserve redblack property)
Definition: rbtree.c:108
local_zone_enter_defaults
int local_zone_enter_defaults(struct local_zones *zones, struct config_file *cfg)
enter default zones
Definition: localzone.c:782
module_event_pass
@ module_event_pass
query passed by other module
Definition: module.h:557
lookinfo::name
char * name
name to look up
Definition: asynclook.c:84
entry::match_ttl
uint8_t match_ttl
match ttls in the packet
Definition: testpkts.h:188
addr_to_str
void addr_to_str(struct sockaddr_storage *addr, socklen_t addrlen, char *buf, size_t len)
Put address into string, works for IPv4 and IPv6.
Definition: net_help.c:733
parse_var_line
static int parse_var_line(char *line, struct val_anchors *anchors, struct trust_anchor **anchor)
Parse variable from trustanchor header.
Definition: autotrust.c:849
synthesize_aaaa
static void synthesize_aaaa(const uint8_t prefix_addr[], size_t prefix_addr_len, int prefix_net, const uint8_t a[], size_t a_len, uint8_t aaaa[], size_t aaaa_len)
Synthesize an IPv6 address based on an IPv4 address and the DNS64 prefix.
Definition: dns64.c:295
infra_host
int infra_host(struct infra_cache *infra, struct sockaddr_storage *addr, socklen_t addrlen, uint8_t *nm, size_t nmlen, time_t timenow, int *edns_vs, uint8_t *edns_lame_known, int *to)
Find host information to send a packet.
Definition: infra.c:437
ub_server_stats::num_neg_cache_noerror
long long num_neg_cache_noerror
number of times neg cache records were used to generate NOERROR responses.
Definition: unbound.h:779
comm_timer::ev_timer
struct internal_timer * ev_timer
the internal event stuff (derived)
Definition: netevent.h:323
nsec3_get_nextowner
int nsec3_get_nextowner(struct ub_packed_rrset_key *rrset, int r, uint8_t **next, size_t *nextlen)
Return nsec3 RR next hashed owner name.
Definition: val_nsec3.c:222
ub_event_del
int ub_event_del(struct ub_event *ev)
Deactivate the event.
Definition: ub_event.c:393
worker_err_ratelimit
static int worker_err_ratelimit(struct worker *worker, int err)
ratelimit error replies
Definition: worker.c:308
sldns_wire2str_opcode_print
int sldns_wire2str_opcode_print(char **str, size_t *str_len, int opcode)
Print host format opcode to string.
Definition: wire2str.c:862
sldns_file_parse_state::prev_rr_len
size_t prev_rr_len
length of the previous domain name, in bytes.
Definition: str2wire.h:226
rr_parse
Data stored for an RR during parsing.
Definition: msgparse.h:181
val_has_signed_nsecs
int val_has_signed_nsecs(struct reply_info *rep, char **reason)
check if has dnssec info, and if it has signed nsecs.
Definition: val_utils.c:1111
comm_point::http_temp
struct sldns_buffer * http_temp
http temp buffer (shared buffer for temporary work)
Definition: netevent.h:216
ds_get_digest_algo
int ds_get_digest_algo(struct ub_packed_rrset_key *ds_rrset, size_t ds_idx)
Get DS RR digest algorithm.
Definition: val_sigcrypt.c:217
log_ident_set_or_default
void log_ident_set_or_default(const char *identity)
Set identity to print if there is an identity, otherwise set the default.
Definition: log.c:195
test_thr::table
struct lruhash * table
hash table
Definition: unitlruhash.c:427
do_keyrem
static void do_keyrem(struct module_env *env, struct autr_ta *anchor, int *c)
Event: KeyRem.
Definition: autotrust.c:1762
sldns_wire2str_tsigerror_scan
int sldns_wire2str_tsigerror_scan(uint8_t **data, size_t *data_len, char **str, size_t *str_len)
Scan wireformat tsigerror field to string, with user buffers.
Definition: wire2str.c:1723
respip_always_refuse
@ respip_always_refuse
answer with 'refused' response
Definition: localzone.h:552
EDNS_ADVERTISED_VERSION
#define EDNS_ADVERTISED_VERSION
Advertised version of EDNS capabilities.
Definition: net_help.h:82
ipset_env
Definition: ipset.h:39
addr_to_str
void addr_to_str(struct sockaddr_storage *addr, socklen_t addrlen, char *buf, size_t len)
Put address into string, works for IPv4 and IPv6.
Definition: net_help.c:733
process_ds_response
static void process_ds_response(struct module_qstate *qstate, struct val_qstate *vq, int id, int rcode, struct dns_msg *msg, struct query_info *qinfo, struct sock_list *origin)
Process DS response.
Definition: validator.c:2878
parse_create_rrset
static int parse_create_rrset(sldns_buffer *pkt, struct rrset_parse *pset, struct packed_rrset_data **data, struct regional *region)
create rrset return 0 on failure
Definition: msgreply.c:311
pythonmod_inform_super
void pythonmod_inform_super(struct module_qstate *qstate, int id, struct module_qstate *super)
python module
Definition: pythonmod.c:476
ext_thr_info
struct for extended thread info
Definition: asynclook.c:172
rbtree_rotate_right
static void rbtree_rotate_right(rbtree_type *rbtree, rbnode_type *node)
rotate subtree right (to preserve redblack property)
Definition: rbtree.c:135
ssl_handle_read
static int ssl_handle_read(struct comm_point *c)
continue ssl handshake
Definition: netevent.c:1186
delegpt_mark_neg
void delegpt_mark_neg(struct delegpt_ns *ns, uint16_t qtype)
Mark negative return in delegation point for specific nameserver.
Definition: iter_delegpt.c:485
config_file::max_ttl
int max_ttl
the number of seconds maximal TTL used for RRsets and messages
Definition: config_file.h:272
autr_ta::fetched
uint8_t fetched
fresh TA was seen
Definition: autotrust.h:81
sldns_wire2str_rr_scan
int sldns_wire2str_rr_scan(uint8_t **data, size_t *data_len, char **str, size_t *str_len, uint8_t *pkt, size_t pktlen, int *comprloop)
Scan wireformat rr to string, with user buffers.
Definition: wire2str.c:452
iter_hints_stub::node
struct name_tree_node node
tree sorted by name, class
Definition: iter_hints.h:70
mesh_state_delete
void mesh_state_delete(struct module_qstate *qstate)
Delete mesh state, cleanup and also rbtrees and so on.
Definition: mesh.c:907
rr_is_selfsigned_revoked
static int rr_is_selfsigned_revoked(struct module_env *env, struct val_env *ve, struct ub_packed_rrset_key *dnskey_rrset, size_t i, struct module_qstate *qstate)
Is rr self-signed revoked key.
Definition: autotrust.c:1298
run_daemon
static void run_daemon(const char *cfgfile, int cmdline_verbose, int debug_mode, int need_pidfile)
Run the daemon.
Definition: unbound.c:644
read_fixed
static int read_fixed(RES *ssl, sldns_buffer *buf, const char *str)
check fixed text on line
Definition: cachedump.c:313
az_generate_referral_answer
static int az_generate_referral_answer(struct auth_zone *z, struct regional *region, struct dns_msg *msg, struct auth_data *ce, struct auth_rrset *rrset)
generate answer for referral answer
Definition: authzone.c:2998
tempno
static int tempno
number of tmpfiles
Definition: unitauth.c:460
order_id
keep track of lock id in lock-verify application
Definition: unbound-dnstap-socket.c:1561
anchor_store_new_key
static struct trust_anchor * anchor_store_new_key(struct val_anchors *anchors, uint8_t *name, uint16_t type, uint16_t dclass, uint8_t *rdata, size_t rdata_len)
This routine adds a new RR to a trust anchor.
Definition: val_anchor.c:304
cmdcmp
static int cmdcmp(char *p, const char *cmd, size_t len)
check for name with end-of-string, space or tab after it
Definition: remote.c:2889
handle_keydigest
static void handle_keydigest(struct xml_data *data, const XML_Char **atts)
XML handle the KeyDigest start tag, check validity periods.
Definition: unbound-anchor.c:1368
repinfo_copy_rrsets
static int repinfo_copy_rrsets(struct reply_info *dest, struct reply_info *from, struct regional *region)
copy rrsets from replyinfo to dest replyinfo
Definition: msgreply.c:665
comm_timer_delete
void comm_timer_delete(struct comm_timer *timer)
delete timer.
Definition: fake_event.c:1525
auth_xfer::task_probe
struct auth_probe * task_probe
task for SOA probe.
Definition: authzone.h:222
ecs_is_whitelisted
int ecs_is_whitelisted(struct ecs_whitelist *whitelist, struct sockaddr_storage *addr, socklen_t addrlen, uint8_t *qname, size_t qname_len, uint16_t qclass)
See if an address or domain is whitelisted.
comm_point_local_handle_callback
void comm_point_local_handle_callback(int fd, short event, void *arg)
This routine is published for checks and tests, and is only used internally.
Definition: netevent.c:2484
key_entry_key::key_class
uint16_t key_class
class of the key, host byteorder
Definition: val_kentry.h:63
ds_key_algo_is_supported
int ds_key_algo_is_supported(struct ub_packed_rrset_key *ds_rrset, size_t ds_idx)
See if DS key algorithm is supported.
Definition: val_sigcrypt.c:366
pythonmod_env::module
PyObject * module
Python module.
Definition: pythonmod.c:85
pythonmod_init
int pythonmod_init(struct module_env *env, int id)
python module init
Definition: pythonmod.c:250
dnstap_io
static void * dnstap_io(void *arg)
the IO thread function for the DNSTAP IO
Definition: dtstream.c:2029
setup_config
static void setup_config(FILE *in, int *lineno, int *pass_argc, char *pass_argv[])
process config elements
Definition: testbound.c:254
lz_enter_zone_tags
static int lz_enter_zone_tags(struct local_zones *zones, struct config_file *cfg)
enter local-zone-tag info
Definition: localzone.c:1013
waiting_tcp_get_mem
static size_t waiting_tcp_get_mem(struct waiting_tcp *w)
get memory used by waiting tcp entry (in use or not)
Definition: outside_network.c:2454
module_funcs_avail
static fbgetfunctype * module_funcs_avail(void)
The list of module func blocks.
Definition: modstack.c:173
ub_ctx_create_event
struct ub_ctx * ub_ctx_create_event(struct event_base *eb)
Create a resolving and validation context.
Definition: libunbound.c:211
testcount
int testcount
number of tests done
Definition: unitmain.c:70
fake_timer::tv
struct timeval tv
when the timer expires
Definition: replay.h:391
replay_moment::variable
char * variable
macro name, for assign.
Definition: replay.h:233
daemon::use_response_ip
int use_response_ip
some response-ip tags or actions are configured if true
Definition: daemon.h:134
nsec3_covers
int nsec3_covers(uint8_t *zone, struct nsec3_cached_hash *hash, struct ub_packed_rrset_key *rrset, int rr, struct sldns_buffer *buf)
nsec3Covers Given a hash and a candidate NSEC3Record, determine if that NSEC3Record covers the hash.
Definition: val_nsec3.c:769
lruhash::size_mask
int size_mask
size bitmask - since size is a power of 2
Definition: lruhash.h:166
tcl_addr::limit
uint32_t limit
connection limit on this netblock
Definition: tcp_conn_limit.h:73
iter_init
int iter_init(struct module_env *env, int id)
iterator init
Definition: iterator.c:78
autr_global_create
struct autr_global_data * autr_global_create(void)
Create new global 5011 data structure.
Definition: autotrust.c:74
config_file::dnscrypt_shared_secret_cache_size
size_t dnscrypt_shared_secret_cache_size
memory size in bytes for dnscrypt shared secrets cache
Definition: config_file.h:572
perfinfo::quiet
int quiet
quiet mode?
Definition: perf.c:98
tcp_req_info::spool_buffer
struct sldns_buffer * spool_buffer
the buffer to use to spool reply from mesh into, it can then be copied to the result list and written...
Definition: listen_dnsport.h:252
rbtree_find_less_equal
int rbtree_find_less_equal(rbtree_type *rbtree, const void *key, rbnode_type **result)
Find, but match does not have to be exact.
Definition: rbtree.c:511
sldns_wire2str_edns_option_code_print
int sldns_wire2str_edns_option_code_print(char **s, size_t *slen, uint16_t opcode)
Print host format EDNS0 option to string.
Definition: wire2str.c:899
val_env
Global state for the validator.
Definition: validator.h:80
nsec_at_apex
static int nsec_at_apex(sldns_buffer *pkt)
See if next rrset is nsec at zone apex.
Definition: msgparse.c:110
respip_deny
@ respip_deny
don't answer
Definition: localzone.h:540
get_qtype
static sldns_rr_type get_qtype(uint8_t *pkt, size_t pktlen)
get qtype from packet
Definition: testpkts.c:702
processFindKey
static int processFindKey(struct module_qstate *qstate, struct val_qstate *vq, int id)
Process the FINDKEY state.
Definition: validator.c:1671
sldns_struct_rr_descriptor::_maximum
uint8_t _maximum
Maximum number of rdata fields in the RRs of this type.
Definition: rrdef.h:458
rrset_cache_adjust
struct rrset_cache * rrset_cache_adjust(struct rrset_cache *r, struct config_file *cfg, struct alloc_cache *alloc)
Adjust settings of the cache to settings from the config file.
Definition: rrset.c:81
val_neg_cache::use
size_t use
current memory in use (bytes)
Definition: val_neg.h:78
dtio_tap_callback
void dtio_tap_callback(int fd, short bits, void *arg)
callback for unbound-dnstap-socket
addr_is_ip6
int addr_is_ip6(struct sockaddr_storage *addr, socklen_t len)
Checkout address family.
Definition: net_help.c:668
val_neg_dlvlookup
int val_neg_dlvlookup(struct val_neg_cache *neg, uint8_t *qname, size_t len, uint16_t qclass, struct rrset_cache *rrset_cache, time_t now)
Perform a DLV style lookup During the lookup, we could find out that data has expired.
Definition: val_neg.c:968
config_file::trust_anchor_list
struct config_strlist * trust_anchor_list
list of trustanchor keys, linked list
Definition: config_file.h:329
config_file::prefer_ip4
int prefer_ip4
prefer ip4 upstream queries.
Definition: config_file.h:89
auth_zones_apply_cfg
int auth_zones_apply_cfg(struct auth_zones *az, struct config_file *cfg, int setup, int *is_rpz)
Apply configuration to auth zones.
Definition: authzone.c:2002
dname_get_shared_topdomain
uint8_t * dname_get_shared_topdomain(uint8_t *d1, uint8_t *d2)
Get the shared topdomain between two names.
Definition: dname.c:872
str_char_print
static int str_char_print(char **s, size_t *sl, uint8_t c)
printout escaped TYPE_STR character
Definition: wire2str.c:1122
MAX_PTR_QNAME_IPV4
#define MAX_PTR_QNAME_IPV4
Maximum length of a domain name in a PTR query in the .in-addr.arpa tree.
Definition: dns64.c:70
test_thr_main
static void * test_thr_main(void *arg)
main routine for threaded hash table test
Definition: unitslabhash.c:311
config_str2list::next
struct config_str2list * next
next item in list
Definition: config_file.h:733
key_entry_copy
struct key_entry_key * key_entry_copy(struct key_entry_key *kkey)
Copy a key entry, malloced.
Definition: val_kentry.c:155
testadd
static void testadd(struct lruhash *table, testdata_type *ref[])
test adding a random element
Definition: unitlruhash.c:235
config_delviews
void config_delviews(struct config_view *list)
Delete items in config view list.
Definition: config_file.c:1385
iter_qstate::dnssec_lame_query
int dnssec_lame_query
We are expecting dnssec information, but we also know the server is DNSSEC lame.
Definition: iterator.h:360
anchors_delfunc
static void anchors_delfunc(rbnode_type *elem, void *ATTR_UNUSED(arg))
destroy locks in tree and delete autotrust anchors
Definition: val_anchor.c:116
th_buck
Bucket of time history information.
Definition: timehist.h:51
nsec3_cached_hash::dname_len
size_t dname_len
length of the dname
Definition: val_nsec3.h:238
local_data::node
rbnode_type node
rbtree node, key is name only
Definition: localzone.h:165
replay_var_compare
int replay_var_compare(const void *a, const void *b)
compare two replay_vars
Definition: replay.c:556
sldns_str2wire_dname_buf_origin
int sldns_str2wire_dname_buf_origin(const char *str, uint8_t *buf, size_t *len, uint8_t *origin, size_t origin_len)
Same as sldns_str2wire_dname_buf, but concatenates origin if the domain name is relative (does not en...
Definition: str2wire.c:144
assemble_iterate_ds
static int assemble_iterate_ds(struct autr_ta **list, uint8_t **rr, size_t *rr_len, size_t *dname_len)
iterator for DSes from keylist.
Definition: autotrust.c:555
lruhash_test
void lruhash_test(void)
unit test lruhashtable implementation
Definition: unitlruhash.c:480
libworker_event_done_cb
void libworker_event_done_cb(void *arg, int rcode, sldns_buffer *buf, enum sec_status s, char *why_bogus, int was_ratelimited)
mesh callback with event results
Definition: libworker.c:637
copy_clear
int copy_clear(uint8_t *dst, size_t dstlen, uint8_t *src, size_t srclen, size_t n)
copy the first n BITS from src to dst iff both src and dst are large enough, return 0 on succes
comm_point_http_handle_callback
void comm_point_http_handle_callback(int fd, short event, void *arg)
This routine is published for checks and tests, and is only used internally.
Definition: netevent.c:2441
val_env::nsec3_keysize
size_t * nsec3_keysize
NSEC3 maximum iteration count per signing key size.
Definition: validator.h:113
ipv4_to_ptr
static size_t ipv4_to_ptr(uint32_t ipv4, char ptr[], size_t nm_len)
Builds the PTR query name corresponding to an IPv4 address.
Definition: dns64.c:225
addr_to_additional
static void addr_to_additional(struct ub_packed_rrset_key *rrset, struct regional *region, struct dns_msg *msg, time_t now)
add addr to additional section
Definition: dns.c:228
module_func_block::get_mem
size_t(* get_mem)(struct module_env *env, int id)
How much memory is the module specific data using.
Definition: module.h:738
ub_resolve_event
int ub_resolve_event(struct ub_ctx *ctx, const char *name, int rrtype, int rrclass, void *mydata, ub_event_callback_type callback, int *async_id)
Perform resolution and validation of the target name.
Definition: libunbound.c:724
stop_flush_info::dtio
struct dt_io_thread * dtio
the dtio
Definition: dtstream.c:1573
val_qstate::dlv_status
dlv_status
status of DLV lookup.
Definition: validator.h:235
comm_point::comm_ssl_shake_hs_write
@ comm_ssl_shake_hs_write
ssl_read wants to write
Definition: netevent.h:204
rtt_notimeout
int rtt_notimeout(const struct rtt_info *rtt)
RTT for valid responses.
Definition: rtt.c:119
autr_point_delete
void autr_point_delete(struct trust_anchor *tp)
Delete autr anchor, deletes the autr data but does not do unlinking from trees, caller does that.
Definition: autotrust.c:390
tube_close_write
void tube_close_write(struct tube *tube)
Close write part of the pipe.
Definition: tube.c:108
sldns_buffer_set_capacity
int sldns_buffer_set_capacity(sldns_buffer *buffer, size_t capacity)
changes the buffer's capacity.
Definition: sbuffer.c:74
fd_set_nonblock
int fd_set_nonblock(int s)
Set fd nonblocking.
Definition: net_help.c:121
dtio_setup_cmd
static void dtio_setup_cmd(struct dt_io_thread *dtio)
setup the cmd event for dnstap io
Definition: dtstream.c:1536
dns64_env::prefix_addrlen
socklen_t prefix_addrlen
This is always sizeof(sockaddr_in6).
Definition: dns64.c:125
incoming_ssl_fd
void * incoming_ssl_fd(void *sslctx, int fd)
accept a new fd and wrap it in a BIO in SSL
Definition: net_help.c:1205
tap_data::data_done
size_t data_done
have we read the data, and how many bytes of it
Definition: unbound-dnstap-socket.c:121
rrset_array_unlock_touch
void rrset_array_unlock_touch(struct rrset_cache *r, struct regional *scratch, struct rrset_ref *ref, size_t count)
Unlock array (sorted) of rrset references and at the same time touch LRU on the rrsets.
Definition: rrset.c:337
val_nsec3.h
tcp_proxy::answerlist
struct tcp_send_list * answerlist
list of answer items to send to client
Definition: delayer.c:134
INFRA_BYTES_NAME
#define INFRA_BYTES_NAME
bytes per zonename reserved in the hostcache, dnamelen(zonename.com.)
Definition: infra.h:190
rrset_check_sec_status
void rrset_check_sec_status(struct rrset_cache *r, struct ub_packed_rrset_key *rrset, time_t now)
Looks up security status of an rrset.
Definition: rrset.c:405
dt_io_thread_unregister_queue
void dt_io_thread_unregister_queue(struct dt_io_thread *dtio, struct dt_msg_queue *mq)
Unregister queue from io thread.
Definition: dtstream.c:384
config_file::version
char * version
version, package version returned if "".
Definition: config_file.h:321
infra_host
int infra_host(struct infra_cache *infra, struct sockaddr_storage *addr, socklen_t addrlen, uint8_t *name, size_t namelen, time_t timenow, int *edns_vs, uint8_t *edns_lame_known, int *to)
Find host information to send a packet.
Definition: infra.c:437
xfr_probe_send_or_end
static void xfr_probe_send_or_end(struct auth_xfer *xfr, struct module_env *env)
move to sending the probe packets, next if fails.
Definition: authzone.c:6316
dnsc_shared_secrets_sizefunc
size_t dnsc_shared_secrets_sizefunc(void *k, void *ATTR_UNUSED(d))
Definition: dnscrypt.c:1031
dns64_env
This structure contains module configuration information.
Definition: dns64.c:109
LDNS_RR_TYPE_MAILA
@ LDNS_RR_TYPE_MAILA
A request for mail agent RRs (Obsolete - see MX)
Definition: rrdef.h:222
compress_tree_node::parent
struct compress_tree_node * parent
the parent node - not for tree, but zone parent.
Definition: msgencode.c:84
LDNS_RR_TYPE_NSAP_PTR
@ LDNS_RR_TYPE_NSAP_PTR
RFC1348.
Definition: rrdef.h:129
msgreply_sizefunc
size_t msgreply_sizefunc(void *k, void *d)
calculate size of struct query_info + reply_info
Definition: msgreply.c:598
acl_addr::tag_actions
uint8_t * tag_actions
array per tagnumber of localzonetype(in one byte).
Definition: acl_list.h:98
addr_tree_node
Tree of IP addresses.
Definition: dnstree.h:77
sldns_bskipcs
void sldns_bskipcs(struct sldns_buffer *buffer, const char *s)
skips all of the characters in the given string in the buffer, moving the position to the first chara...
Definition: parse.c:396
ub_fd
int ub_fd(struct ub_ctx *ctx)
Get file descriptor.
Definition: libunbound.c:511
worker::err_limit_count
unsigned int err_limit_count
ratelimit for errors, packet count
Definition: worker.h:110
comm_point::tcp_keepalive
int tcp_keepalive
if set, tcp keepalive is enabled on this connection
Definition: netevent.h:261
LDNS_RR_TYPE_MX
@ LDNS_RR_TYPE_MX
mail exchange
Definition: rrdef.h:113
do_datas_remove
static void do_datas_remove(RES *ssl, struct local_zones *zones)
Do the local_datas_remove command.
Definition: remote.c:1364
dname_test
void dname_test(void)
unit test dname handling functions
Definition: unitdname.c:861
config_file::ratelimit
int ratelimit
ratelimit for domains.
Definition: config_file.h:535
rr_comment_dnskey
static int rr_comment_dnskey(char **s, size_t *slen, uint8_t *rr, size_t rrlen, size_t dname_off)
print rr comment for type DNSKEY
Definition: wire2str.c:581
RESPONSE_TYPE_CNAME
@ RESPONSE_TYPE_CNAME
'cname' means that the response is a cname without the final answer, and thus must be restarted.
Definition: iter_resptype.h:72
daemon_remote_start_accept
void daemon_remote_start_accept(struct daemon_remote *rc)
Stop accept handlers for TCP (until enabled again)
Definition: remote.c:436
make_sock
static int make_sock(int stype, const char *ifname, const char *port, struct addrinfo *hints, int v6only, int *noip6, size_t rcv, size_t snd, int *reuseport, int transparent, int tcp_mss, int freebind, int use_systemd, int dscp)
Create socket from getaddrinfo results.
Definition: listen_dnsport.c:1010
rrsig_get_signer
static void rrsig_get_signer(uint8_t *data, size_t len, uint8_t **sname, size_t *slen)
Get signer name from RRSIG.
Definition: val_utils.c:134
check_xfer_packet
static int check_xfer_packet(sldns_buffer *pkt, struct auth_xfer *xfr, int *gonextonfail, int *transferdone)
check if xfer (AXFR or IXFR) packet is OK.
Definition: authzone.c:5415
config_stub::isfirst
int isfirst
if forward-first is set (failover to without if fails)
Definition: config_file.h:644
daemon_remote
The remote control tool state.
Definition: remote.h:89
lruhash_compfunc_type
int(* lruhash_compfunc_type)(void *, void *)
type of function that compares two keys.
Definition: lruhash.h:130
thread_start
static void * thread_start(void *arg)
Function to start one thread.
Definition: daemon.c:500
dname_count_size_labels
int dname_count_size_labels(uint8_t *dname, size_t *size)
Count labels and dname length both, for uncompressed dname in memory.
Definition: dname.c:446
subnet_env::num_msg_nocache
size_t num_msg_nocache
number of messages not from cache
Definition: subnetmod.h:68
infra_data::rtt
struct rtt_info rtt
round trip times for timeout calculation
Definition: infra.h:82
sldns_wire2str_type
char * sldns_wire2str_type(uint16_t rrtype)
Convert wire RR type to a string, 'MX', 'TYPE1234'...
Definition: wire2str.c:217
dtio_control_stop_send
static int dtio_control_stop_send(struct stop_flush_info *info)
send the stop control, return true if completed the frame.
Definition: dtstream.c:1595
ub_event_vmt::add_signal
int(* add_signal)(struct ub_event *, struct timeval *)
Activate a signal event (not called by libunbound).
Definition: unbound-event.h:147
tcl_addr::count
uint32_t count
current connection count on this netblock
Definition: tcp_conn_limit.h:75
val_neg_data
Data element for aggressive negative caching.
Definition: val_neg.h:142
RET_ERR
#define RET_ERR(e, off)
return an error
Definition: str2wire.c:29
listen_sslctx_setup
int listen_sslctx_setup(void *ctxt)
Set SSL_OP_NOxxx options on SSL context to disable bad crypto.
Definition: net_help.c:888
views_print
void views_print(struct views *v)
Debug helper.
Definition: view.c:244
sldns_wire2str_rr_scan
int sldns_wire2str_rr_scan(uint8_t **d, size_t *dlen, char **s, size_t *slen, uint8_t *pkt, size_t pktlen, int *comprloop)
Scan wireformat rr to string, with user buffers.
Definition: wire2str.c:452
auth_zone::delete_next
struct auth_zone * delete_next
deletelist pointer, unused normally except during delete
Definition: authzone.h:140
iter_hints_stub::dp
struct delegpt * dp
delegation point with hint information for this stub.
Definition: iter_hints.h:72
cfg_parse_local_zone
int cfg_parse_local_zone(struct config_file *cfg, const char *val)
Parse local-zone directive into two strings and register it in the config.
Definition: config_file.c:2192
resolve_name
static struct ip_list * resolve_name(const char *host, int port, const char *res_conf, const char *root_hints, const char *debugconf, const char *srcaddr, int ip4only, int ip6only)
Resolve a domain name (even though the resolver is down and there is no trust anchor).
Definition: unbound-anchor.c:634
forward_request
static int forward_request(struct module_qstate *qstate, struct iter_qstate *iq)
See if the query needs forwarding.
Definition: iterator.c:1185
daemon_stop_others
static void daemon_stop_others(struct daemon *daemon)
Stop the other threads.
Definition: daemon.c:551
load_msg
static int load_msg(RES *ssl, sldns_buffer *buf, struct worker *worker)
load a msg entry
Definition: cachedump.c:623
config_auth::urls
struct config_strlist * urls
list of urls
Definition: config_file.h:662
libworker_create_event
struct libworker * libworker_create_event(struct ub_ctx *ctx, struct ub_event_base *eb)
create worker for event-based interface.
Definition: libworker.c:266
timeval_divide
static void timeval_divide(struct timeval *avg, const struct timeval *sum, long long d)
divide sum of timers to get average
Definition: remote.c:129
val_blacklist
void val_blacklist(struct sock_list **blacklist, struct regional *region, struct sock_list *origin, int cross)
Add existing list to blacklist.
Definition: val_utils.c:1088
sldns_wire2str_type_scan
int sldns_wire2str_type_scan(uint8_t **data, size_t *data_len, char **str, size_t *str_len)
Scan wireformat rr type to string, with user buffers.
Definition: wire2str.c:921
UB_AFTERFINAL
@ UB_AFTERFINAL
cfg change after finalize()
Definition: context.h:197
soa_find_minttl
static time_t soa_find_minttl(struct rr_parse *rr)
find the minimumttl in the rdata of SOA record
Definition: msgreply.c:169
do_infra_rtt
static void do_infra_rtt(struct replay_runtime *runtime)
Store RTT in infra cache.
Definition: fake_event.c:684
DEFAULT_DNS64_PREFIX
static const char DEFAULT_DNS64_PREFIX[]
This is the default DNS64 prefix that is used whent he dns64 module is listed in module-config but wh...
Definition: dns64.c:65
dup_prefix
static char * dup_prefix(char *str, size_t num)
dup_prefix : create string from initial part of other string, malloced
Definition: authzone.c:6805
addrnode::parent_edge
struct addredge * parent_edge
edge between this node and parent
Definition: addrtree.h:101
testlookup
static void testlookup(struct slabhash *table, testdata_type *ref[])
test adding a random element
Definition: unitslabhash.c:132
val_neg_data::labs
int labs
labels in name
Definition: val_neg.h:150
tap_data::len_done
int len_done
have we read the length, and how many bytes of it
Definition: unbound-dnstap-socket.c:119
ipset_init
int ipset_init(struct module_env *env, int id)
Init the ipset module.
Definition: ipset.c:226
config_file::insecure_lan_zones
int insecure_lan_zones
insecure lan zones (don't validate AS112 zones)
Definition: config_file.h:411
log_crypto_err_code
void log_crypto_err_code(const char *str, unsigned long err)
Log libcrypto error from errcode with descriptive string, calls log_err.
Definition: net_help.c:843
fake_pending::next
struct fake_pending * next
next in pending list
Definition: replay.h:349
packed_rrset_ptr_fixup
void packed_rrset_ptr_fixup(struct packed_rrset_data *data)
Fixup pointers in fixed data packed_rrset_data blob.
Definition: packed_rrset.c:178
UB_EV_WRITE
#define UB_EV_WRITE
event fd writable
Definition: unbound-event.h:71
stats_timeval_add
static void stats_timeval_add(long long *d_sec, long long *d_usec, long long add_sec, long long add_usec)
add timers and the values do not overflow or become negative
Definition: stats.c:75
server_stats_add
void server_stats_add(struct ub_stats_info *total, struct ub_stats_info *a)
Addup stat blocks.
Definition: stats.c:396
config_file::ip_ratelimit_slabs
size_t ip_ratelimit_slabs
number of slabs for ip_ratelimit cache
Definition: config_file.h:528
delegpt_ns::lame
uint8_t lame
If the name is parent-side only and thus dispreferred.
Definition: iter_delegpt.h:118
lruhash::array
struct lruhash_bin * array
lookup array of bins
Definition: lruhash.h:168
lookinfo::err
int err
error code from libunbound
Definition: asynclook.c:88
get_rr_nameclass
static int get_rr_nameclass(const char *str, uint8_t **nm, uint16_t *dclass, uint16_t *dtype)
return name and class of rr; parses string
Definition: localzone.c:261
log_rrlist_position
static void log_rrlist_position(const char *label, struct auth_chunk *rr_chunk, uint8_t *rr_dname, uint16_t rr_type, size_t rr_counter)
print log message where we are in parsing the zone transfer
Definition: authzone.c:4515
invalidateQueryInCache
void invalidateQueryInCache(struct module_qstate *qstate, struct query_info *qinfo)
Invalidate the message associated with query_info stored in message cache.
Definition: pythonmod_utils.c:75
ub_event_vmt::del_bits
void(* del_bits)(struct ub_event *, short)
Configure the event so it will not longer fire on given bits The event will be deactivated before thi...
Definition: unbound-event.h:131
del_empty_term
static void del_empty_term(struct local_zone *z, struct local_data *d, uint8_t *name, size_t len, int labs)
delete empty terminals from tree when final data is deleted
Definition: localzone.c:1931
iter_qstate::ns_prepend_last
struct iter_prep_list * ns_prepend_last
Last element of the authority prepend list.
Definition: iterator.h:267
anchor_find
struct trust_anchor * anchor_find(struct val_anchors *anchors, uint8_t *name, int namelabs, size_t namelen, uint16_t dclass)
Find a trust anchor.
Definition: val_anchor.c:197
S_STR
#define S_STR(str, var)
put string into variable
Definition: config_file.c:421
val_classification_to_string
const char * val_classification_to_string(enum val_classification subtype)
Get string to denote the classification result.
Definition: val_utils.c:1062
ub_event_base_loopexit
int ub_event_base_loopexit(struct ub_event_base *)
exit that loop
Definition: ub_event.c:284
cachedump.h
comm_timer_create
struct comm_timer * comm_timer_create(struct comm_base *base, void(*cb)(void *), void *cb_arg)
create timer.
Definition: netevent.c:3289
sldns_struct_lookup_table
A general purpose lookup table.
Definition: parseutil.h:27
addr_is_ip4mapped
int addr_is_ip4mapped(struct sockaddr_storage *addr, socklen_t addrlen)
See if sockaddr is an ipv6 mapped ipv4 address, "::ffff:0.0.0.0".
Definition: net_help.c:746
worker_probe_timer_cb
void worker_probe_timer_cb(void *arg)
probe timer callback handler
Definition: worker.c:1687
LDNS_RR_TYPE_NULL
@ LDNS_RR_TYPE_NULL
a null RR (EXPERIMENTAL)
Definition: rrdef.h:103
print_root_fwds
static int print_root_fwds(RES *ssl, struct iter_forwards *fwds, uint8_t *root)
print root forwards
Definition: remote.c:1975
key_entry_data::isbad
uint8_t isbad
if the key is bad: Bogus or malformed
Definition: val_kentry.h:88
acl_addr::taglen
size_t taglen
length of the taglist (in bytes)
Definition: acl_list.h:96
order_lock::visited
int visited
if lock has been visited (all smaller locks have been compared to this lock), only need to compare th...
Definition: lock_verify.c:86
internal_event
The internal event structure for keeping ub_event info for the event.
Definition: netevent.c:104
mesh_query_done
void mesh_query_done(struct mesh_state *mstate)
Query state is done, send messages to reply entries.
Definition: mesh.c:1297
timeval_smaller
static int timeval_smaller(const struct timeval *x, const struct timeval *y)
histogram compare of time values
Definition: timehist.c:119
ratelimit_list_arg::all
int all
all or only ratelimited
Definition: remote.c:2789
infra_data::probedelay
time_t probedelay
time in seconds (absolute) when probing re-commences, 0 disabled
Definition: infra.h:80
sldns_wire2str_rr_comment_buf
int sldns_wire2str_rr_comment_buf(uint8_t *rr, size_t rrlen, size_t dname_len, char *s, size_t slen)
This creates the comment to print after the RR.
Definition: wire2str.c:279
mesh_cb::qid
uint16_t qid
id of query, in network byteorder.
Definition: mesh.h:252
tap_data::id
char * id
string that identifies the socket (or NULL), like IP address
Definition: unbound-dnstap-socket.c:117
hex_buffer2wire
static sldns_buffer * hex_buffer2wire(sldns_buffer *data_buffer)
convert hex buffer to binary buffer
Definition: testpkts.c:342
sldns_str2wire_dname
uint8_t * sldns_str2wire_dname(const char *str, size_t *len)
Convert text string into dname wireformat.
Definition: str2wire.c:170
nsec_has_type
int nsec_has_type(struct ub_packed_rrset_key *nsec, uint16_t type)
Check if type is present in the NSEC typemap.
Definition: val_nsec.c:97
ub_server_stats::num_query_dnscrypt_crypted_malformed
long long num_query_dnscrypt_crypted_malformed
number of malformed encrypted queries
Definition: unbound.h:764
SERVE_EXPIRED
int SERVE_EXPIRED
If we serve expired entries and prefetch them.
Definition: msgreply.c:65
delkey
static void delkey(struct slabhash_testkey *k)
delete key
Definition: unitlruhash.c:53
tube_close_read
void tube_close_read(struct tube *tube)
Close read part of the pipe.
Definition: tube.c:100
inplace_cb_reply_cache_call
int inplace_cb_reply_cache_call(struct module_env *env, struct query_info *qinfo, struct module_qstate *qstate, struct reply_info *rep, int rcode, struct edns_data *edns, struct comm_reply *repinfo, struct regional *region)
Call the registered functions in the inplace_cb_reply_cache linked list.
Definition: msgreply.c:1066
auth_zone_parse_notify_serial
int auth_zone_parse_notify_serial(sldns_buffer *pkt, uint32_t *serial)
process notify packet and read serial number from SOA.
Definition: authzone.c:3410
sig_quit
int sig_quit
do we have to quit
Definition: unbound-dnstap-socket.c:1203
ub_event_base_loopexit
int ub_event_base_loopexit(struct ub_event_base *base)
exit that loop
Definition: ub_event.c:284
val_find_DS
struct dns_msg * val_find_DS(struct module_env *env, uint8_t *nm, size_t nmlen, uint16_t c, struct regional *region, uint8_t *topname)
Find DS denial message in cache.
Definition: val_utils.c:1135
ipsecmod_clear
void ipsecmod_clear(struct module_qstate *qstate, int id)
clear the ipsecmod query-specific contents out of qstate
dt_io_thread::threadnum
int threadnum
the thread number for the dtio thread, must be first to cast thread arg to int* in checklock code.
Definition: dtstream.h:118
dtio_write_buf
static int dtio_write_buf(struct dt_io_thread *dtio, uint8_t *buf, size_t len)
write buffer to output.
Definition: dtstream.c:730
print_uptime
static int print_uptime(RES *ssl, struct worker *worker, int reset)
print uptime stats
Definition: remote.c:870
module_env::mesh
struct mesh_area * mesh
mesh area with query state dependencies
Definition: module.h:475
adjustline
static void adjustline(char *line, struct entry *e, struct reply_packet *pkt)
parse ADJUST line
Definition: testpkts.c:226
auth_probe::id
uint16_t id
dns id of packet in flight
Definition: authzone.h:339
ub_result
The validation and resolution results.
Definition: unbound.h:123
comm_point::max_tcp_count
int max_tcp_count
the number of TCP handlers for this tcp-accept socket
Definition: netevent.h:180
fake_commpoint
fake commpoint, stores information
Definition: fake_event.c:73
ctx_query::w
struct libworker * w
store libworker that is handling this query
Definition: context.h:172
read_tcl_list
static int read_tcl_list(struct tcl_list *tcl, struct config_file *cfg)
read tcl_list config
Definition: tcp_conn_limit.c:132
http_parse_add_rr
static int http_parse_add_rr(struct auth_xfer *xfr, struct auth_zone *z, sldns_buffer *buf, struct sldns_file_parse_state *pstate)
for http download, parse and add RR to zone
Definition: authzone.c:4380
modstack_desetup
void modstack_desetup(struct module_stack *stack, struct module_env *env)
Desetup the modules, deinit, delete.
Definition: modstack.c:248
ctx_logfile_overridden
int ctx_logfile_overridden
store that the logfile has a debug override
Definition: libunbound.c:83
test_thr::num
int num
thread num, first entry.
Definition: unitlruhash.c:423
module_event_reply
@ module_event_reply
reply inbound from server
Definition: module.h:559
delegpt::dp_type_mlc
uint8_t dp_type_mlc
for assertions on type of delegpt
Definition: iter_delegpt.h:83
val_neg_zone_take_inuse
void val_neg_zone_take_inuse(struct val_neg_zone *zone)
take a zone into use.
Definition: val_neg.c:518
infra_ratelimit_exceeded
int infra_ratelimit_exceeded(struct infra_cache *infra, uint8_t *name, size_t namelen, time_t timenow)
See if the query rate counter for a delegation point is exceeded.
Definition: infra.c:973
config_file::dnscrypt_provider_cert_rotated
struct config_strlist * dnscrypt_provider_cert_rotated
dnscrypt provider certs 1.cert which have been rotated and should not be advertised through DNS's pro...
Definition: config_file.h:570
edns_option::opt_code
uint16_t opt_code
type of this edns option
Definition: msgparse.h:237
config_file::max_negative_ttl
int max_negative_ttl
the number of seconds maximal negative TTL for SOA in auth
Definition: config_file.h:276
grab_nsec
static struct ub_packed_rrset_key * grab_nsec(struct rrset_cache *rrset_cache, uint8_t *qname, size_t qname_len, uint16_t qtype, uint16_t qclass, uint32_t flags, struct regional *region, int checkbit, uint16_t checktype, time_t now)
See if rrset exists in rrset cache.
Definition: val_neg.c:1161
auth_zones_delete
void auth_zones_delete(struct auth_zones *az)
Delete auth zones structure.
Definition: authzone.c:2124
config_get_option_collate
int config_get_option_collate(struct config_file *cfg, const char *opt, char **str)
Get an option and collate results into string.
Definition: config_file.c:788
do_forward_add
static void do_forward_add(RES *ssl, struct worker *worker, char *args)
do the forward_add command
Definition: remote.c:2132
sldns_struct_rr_descriptor::_compress
sldns_rr_compress _compress
Specifies whether compression can be used for dnames in this RR type.
Definition: rrdef.h:464
rrset_trust_ans_noAA
@ rrset_trust_ans_noAA
Data from the answer section of a non-authoritative answer.
Definition: packed_rrset.h:153
iter_stub_fwd_no_cache
int iter_stub_fwd_no_cache(struct module_qstate *qstate, struct query_info *qinf)
Lookup if no_cache is set in stub or fwd.
Definition: iter_utils.c:1393
optind
int optind
getopt global, in case header files fail to declare it.
config_file::control_port
int control_port
port number for the control port
Definition: config_file.h:440
verbosity_value
verbosity_value
verbosity definition for compat
Definition: testpkts.c:45
algo_needs::needs
uint8_t needs[ALGO_NEEDS_MAX]
the algorithms (8-bit) with each a number.
Definition: val_sigcrypt.h:69
dynlibmod_env::dynamic_library
void * dynamic_library
dynamic library handle
Definition: dynlibmod.h:118
rrset_markdel
void rrset_markdel(void *key)
mark rrset to be deleted, set id=0
Definition: rrset.c:53
NUM_ID_TRIES
#define NUM_ID_TRIES
How many times to try to find an unused query-id-number for async.
Definition: context.c:122
apply_http
static int apply_http(struct auth_xfer *xfr, struct auth_zone *z, struct sldns_buffer *scratch_buffer)
apply HTTP to zone in memory.
Definition: authzone.c:4794
process_one_header
static int process_one_header(char *buf, size_t *clen, int *chunked)
process header line, check rcode and keeping track of size
Definition: unbound-anchor.c:859
RESPONSE_TYPE_LAME
@ RESPONSE_TYPE_LAME
'lame' means that this particular response indicates that the nameserver knew nothing about the quest...
Definition: iter_resptype.h:84
nsec3_get_params
int nsec3_get_params(struct ub_packed_rrset_key *rrset, int r, int *algo, size_t *iter, uint8_t **salt, size_t *saltlen)
Get NSEC3 parameters out of rr.
Definition: val_nsec3.c:209
local_zones_apply_cfg
int local_zones_apply_cfg(struct local_zones *zones, struct config_file *cfg)
Apply config settings; setup the local authoritative data.
Definition: localzone.c:1052
nsec3_get_iter
static size_t nsec3_get_iter(struct ub_packed_rrset_key *rrset, int r)
return nsec3 RR iteration count
Definition: val_nsec3.c:173
lru_remove
void lru_remove(struct lruhash *table, struct lruhash_entry *entry)
Remove entry from lru list.
Definition: lruhash.c:277
basedir
static char * basedir(char *fname)
get base dir of a fname
Definition: unbound-checkconf.c:441
respip_view_conf_actions_test
static void respip_view_conf_actions_test(void)
Per-view respip actions test; apply raw configuration with two views and verify that actions are as e...
Definition: unitmain.c:636
az_generate_positive_answer
static int az_generate_positive_answer(struct auth_zone *z, struct regional *region, struct dns_msg *msg, struct auth_data *node, struct auth_rrset *rrset)
generate answer for positive answer
Definition: authzone.c:2879
serviced_query::serviced_query_TCP_EDNS_fallback
@ serviced_query_TCP_EDNS_fallback
probe to test TCP noEDNS0 (EDNS gives FORMERRorNOTIMP)
Definition: outside_network.h:371
check_ub_res
static void check_ub_res(int r)
print error if any
Definition: unbound-host.c:410
do_reload
static void do_reload(RES *ssl, struct worker *worker)
do the reload command
Definition: remote.c:687
ub_wait
int ub_wait(struct ub_ctx *ctx)
Wait for a context to finish with results.
Definition: libunbound.c:626
rbtree_delete
rbnode_type * rbtree_delete(rbtree_type *rbtree, const void *key)
Delete element from tree.
Definition: rbtree.c:329
dynlibmod_env::func_get_mem
func_get_mem_t func_get_mem
Module get_mem function.
Definition: dynlibmod.h:130
dnsc_nonce_cache_key_hash
static uint32_t dnsc_nonce_cache_key_hash(const uint8_t nonce[crypto_box_HALF_NONCEBYTES], const uint8_t magic_query[DNSCRYPT_MAGIC_HEADER_LEN], const uint8_t pk[crypto_box_PUBLICKEYBYTES])
Generate a key hash suitable to find a nonce in slabhash.
Definition: dnscrypt.c:159
view::respip_set
struct respip_set * respip_set
response-ip configuration data for this view
Definition: view.h:76
addrnode::elem
void * elem
Payload of node, may be NULL.
Definition: addrtree.h:93
dns_cache_find_delegation
struct delegpt * dns_cache_find_delegation(struct module_env *env, uint8_t *qname, size_t qnamelen, uint16_t qtype, uint16_t qclass, struct regional *region, struct dns_msg **msg, time_t now)
Find a delegation from the cache.
Definition: dns.c:462
print_any_answers
static void print_any_answers(int fd, int udp, SSL *ssl, sldns_buffer *buf, int *num_answers, int wait_all)
see if we can receive any results
Definition: streamtcp.c:289
sldns_wire2str_atma_scan
int sldns_wire2str_atma_scan(uint8_t **d, size_t *dl, char **s, size_t *sl)
Scan wireformat ATMA field to string, with user buffers.
Definition: wire2str.c:1538
config_view::next
struct config_view * next
next in list
Definition: config_file.h:696
views_create
struct views * views_create(void)
Create views storage.
Definition: view.c:57
fill_res
static int fill_res(struct ub_result *res, struct ub_packed_rrset_key *answer, uint8_t *finalcname, struct query_info *rq, struct reply_info *rep)
fill data into result
Definition: libworker.c:440
ecs_whitelist::region
struct regional * region
regional for allocation
Definition: subnet-whitelist.h:55
sldns_rcodes
sldns_lookup_table * sldns_rcodes
Response codes.
Definition: wire2str.c:101
tcp_proxy::querylist
struct tcp_send_list * querylist
list of query items to send to server
Definition: delayer.c:130
daemon_cleanup
void daemon_cleanup(struct daemon *daemon)
Close off the worker thread information.
Definition: daemon.c:696
dname_valid
size_t dname_valid(uint8_t *dname, size_t maxlen)
Determine if dname in memory is correct.
Definition: dname.c:74
auth_nextprobe::next_probe
time_t next_probe
Timeout for next probe (for SOA)
Definition: authzone.h:292
respip_get_funcblock
struct module_func_block * respip_get_funcblock(void)
Get the response-ip function block.
Definition: respip.c:1281
listen_list::next
struct listen_list * next
next in list
Definition: listen_dnsport.h:75
msg_parse::id
uint16_t id
id from message, network format.
Definition: msgparse.h:97
deldata
static void deldata(struct slabhash_testdata *d)
delete data
Definition: unitlruhash.c:56
waiting_tcp::pkt_len
size_t pkt_len
length of query packet.
Definition: outside_network.h:292
do_macro_arith
static char * do_macro_arith(char *orig, size_t remain, char **arithstart)
do macro arithmetic on two numbers and operand
Definition: replay.c:727
tap_data::len
size_t len
length of this frame
Definition: unbound-dnstap-socket.c:129
skip_whites
static void skip_whites(const char **p)
skip whitespace
Definition: readhex.c:49
sldns_wire2str_edns_option_print
int sldns_wire2str_edns_option_print(char **s, size_t *sl, uint16_t option_code, uint8_t *optdata, size_t optlen)
Print an EDNS option as OPT: VALUE.
Definition: wire2str.c:1943
serviced_encode
static void serviced_encode(struct serviced_query *sq, sldns_buffer *buff, int with_edns)
put serviced query into a buffer
Definition: outside_network.c:1583
VAL_CLASS_POSITIVE
@ VAL_CLASS_POSITIVE
A positive, direct, response.
Definition: val_utils.h:67
entry::match_transport
enum transport_type match_transport
match on UDP/TCP
Definition: testpkts.h:198
ctx_query::msg
uint8_t * msg
answer message, result from resolver lookup.
Definition: context.h:166
nsec3_calc_hash
static int nsec3_calc_hash(struct regional *region, sldns_buffer *buf, struct nsec3_cached_hash *c)
perform hash of name
Definition: val_nsec3.c:571
do_log_reopen
static void do_log_reopen(RES *ssl, struct worker *worker)
do the log_reopen command
Definition: remote.c:2502
local_data
Local data.
Definition: localzone.h:163
replay_moment::repevt_front_reply
@ repevt_front_reply
test fails if reply to query does not match
Definition: replay.h:196
tube_wait
int tube_wait(struct tube *tube)
Wait for data to be ready for reading on the tube.
Definition: tube.c:418
addrtree.h
MIN_PENDINGCOUNT
#define MIN_PENDINGCOUNT
number of times a key must be seen before it can become valid
Definition: autotrust.c:69
config_parser_state::filename
char * filename
name of file being parser
Definition: config_file.h:1203
RRSET_ROUNDROBIN
int RRSET_ROUNDROBIN
rrset order roundrobin
Definition: net_help.c:74
auth_zones_startprobesequence
int auth_zones_startprobesequence(struct auth_zones *az, struct module_env *env, uint8_t *nm, size_t nmlen, uint16_t dclass)
for the zone and if not already going, starts the probe sequence.
Definition: authzone.c:3593
python_inplace_cb_query_generic
int python_inplace_cb_query_generic(struct query_info *qinfo, uint16_t flags, struct module_qstate *qstate, struct sockaddr_storage *addr, socklen_t addrlen, uint8_t *zone, size_t zonelen, struct regional *region, int id, void *python_callback)
Declared here for fptr_wlist access.
ub_ctx::dothread
int dothread
do threading (instead of forking) for async resolution
Definition: context.h:94
regional_alloc_zero
void * regional_alloc_zero(struct regional *r, size_t size)
Allocate size bytes of memory inside regional that are initialized to 0.
Definition: regional.c:171
sec_status_bogus
@ sec_status_bogus
BOGUS means that the object (RRset or message) failed to validate (according to local policy),...
Definition: packed_rrset.h:181
SignedCert
Definition: cert.h:17
rrset_array_unlock
void rrset_array_unlock(struct rrset_ref *ref, size_t count)
Unlock array (sorted) of rrset references.
Definition: rrset.c:326
alloc_cache
Structure that provides allocation.
Definition: alloc.h:72
config_file::private_address
struct config_strlist * private_address
strip away these private addrs from answers, no DNS Rebinding
Definition: config_file.h:266
rrinternal_get_quoted
static int rrinternal_get_quoted(sldns_buffer *strbuf, const char **delimiters, sldns_rdf_type rdftype)
see if rdata is quoted
Definition: str2wire.c:367
do_print
static void do_print(struct ub_result *result, char *file)
print result to file
Definition: anchor-update.c:86
anchors_add_insecure
int anchors_add_insecure(struct val_anchors *anchors, uint16_t c, uint8_t *nm)
Add insecure point trust anchor.
Definition: val_anchor.c:1216
worker_handle_request
int worker_handle_request(struct comm_point *c, void *arg, int error, struct comm_reply *repinfo)
handles callbacks from listening event interface
Definition: worker.c:1087
pending::sq
struct serviced_query * sq
the corresponding serviced_query
Definition: outside_network.h:239
auth_zone_get_serial
int auth_zone_get_serial(struct auth_zone *z, uint32_t *serial)
find serial number of zone or false if none (no SOA record)
Definition: authzone.c:1765
do_buf_insert
static int do_buf_insert(char *buf, size_t remain, char *after, char *inserted)
insert new stuff at start of buffer
Definition: replay.c:611
fbgetfunctype
struct module_func_block *(* fbgetfunctype)(void)
func block get function type
Definition: modstack.c:169
log_info
void log_info(const char *format,...) ATTR_FORMAT(printf
Log informational message.
rbtree_type::cmp
int(* cmp)(const void *, const void *)
Key compare function.
Definition: rbtree.h:87
LDNS_RR_TYPE_TXT
@ LDNS_RR_TYPE_TXT
text strings
Definition: rrdef.h:115
log_ident_set_or_default
void log_ident_set_or_default(const char *identity)
Set identity to print if there is an identity, otherwise set the default.
Definition: log.c:195
rrset_parse::dname
uint8_t * dname
start of (possibly compressed) dname in packet
Definition: msgparse.h:153
ds_get_key_algo
int ds_get_key_algo(struct ub_packed_rrset_key *k, size_t idx)
Get DS RR key algorithm.
Definition: val_sigcrypt.c:206
libworker_bg
int libworker_bg(struct ub_ctx *ctx)
Create a background worker.
Definition: libworker.c:383
dname_count_labels
int dname_count_labels(uint8_t *dname)
Count the number of labels in an uncompressed dname in memory.
Definition: dname.c:431
file_name_is_safe
static int file_name_is_safe(char *s)
check a file name for safety
Definition: petal.c:316
inhibit_zero
static const int inhibit_zero
if true, inhibits a lot of =0 lines from the stats output
Definition: remote.c:109
load_rrset
static int load_rrset(RES *ssl, sldns_buffer *buf, struct worker *worker)
load an rrset entry
Definition: cachedump.c:438
log_ident_revert_to_default
void log_ident_revert_to_default()
Revert identity to print, back to the recorded default value.
Definition: log.c:190
respip_inform_deny
@ respip_inform_deny
log query source and don't answer query
Definition: localzone.h:546
response_type_from_cache
enum response_type response_type_from_cache(struct dns_msg *msg, struct query_info *request)
Classifies a response message from cache based on the current request.
Definition: iter_resptype.c:52
module_event_moddone
@ module_event_moddone
next module is done, and its reply is awaiting you
Definition: module.h:565
worker_handle_request
int worker_handle_request(struct comm_point *c, void *arg, int error, struct comm_reply *repinfo)
handles callbacks from listening event interface
Definition: worker.c:1087
ub_event_del_bits
void ub_event_del_bits(struct ub_event *ev, short bits)
Configure the event so it will not longer fire on given bits.
Definition: ub_event_pluggable.c:555
fake_event.h
config_read
int config_read(struct config_file *cfg, const char *filename, const char *chroot)
Read the config file from the specified filename.
Definition: config_file.c:1182
ssl_print_vmsg
static int ssl_print_vmsg(RES *ssl, const char *format, va_list args)
print text over the ssl connection
Definition: remote.c:592
do_view_list_local_data
static void do_view_list_local_data(RES *ssl, struct worker *worker, char *arg)
do the view_list_local_data command
Definition: remote.c:2768
test_threaded_table
static void test_threaded_table(struct lruhash *table)
test hash table access by multiple threads
Definition: unitlruhash.c:462
LDNS_RR_TYPE_NIMLOC
@ LDNS_RR_TYPE_NIMLOC
draft-ietf-nimrod-dns-01.txt
Definition: rrdef.h:147
dt_io_thread::tls_use_sni
int tls_use_sni
if SNI will be used for TLS connections.
Definition: dtstream.h:134
auth_xfer_create
struct auth_xfer * auth_xfer_create(struct auth_zones *az, struct auth_zone *z)
Create auth_xfer structure.
Definition: authzone.c:6771
setup_sigalg
static void setup_sigalg(struct ub_packed_rrset_key *dnskey, uint8_t *sigalg)
setup sig alg list from dnskey
Definition: unitverify.c:159
rr_comment_rrsig
static int rr_comment_rrsig(char **s, size_t *slen, uint8_t *rr, size_t rrlen, size_t dname_off)
print rr comment for type RRSIG
Definition: wire2str.c:619
keysets::owner
char * owner
owner name
Definition: signit.c:57
val_find_best_signer
static void val_find_best_signer(struct ub_packed_rrset_key *rrset, struct query_info *qinf, uint8_t **signer_name, size_t *signer_len, int *matchcount)
Find best signer name in this set of rrsigs.
Definition: val_utils.c:186
replay_range::addr
struct sockaddr_storage addr
address of where this range is served.
Definition: replay.h:252
inplace_cb_query_response_func_type
int inplace_cb_query_response_func_type(struct module_qstate *qstate, struct dns_msg *response, int id, void *cb_args)
Inplace callback function called after parsing query response.
Definition: module.h:306
do_view_data_add
static void do_view_data_add(RES *ssl, struct worker *worker, char *arg)
Add new RR data to view.
Definition: remote.c:1439
auth_xfer::notify_serial
uint32_t notify_serial
serial number of the notify
Definition: authzone.h:241
key_cache_obtain
struct key_entry_key * key_cache_obtain(struct key_cache *kcache, uint8_t *name, size_t namelen, uint16_t key_class, struct regional *region, time_t now)
Lookup key entry in the cache.
Definition: val_kcache.c:128
autr_point_data::file
char * file
file to store the trust point in.
Definition: autotrust.h:92
wire2str.h
wire2str.h - txt presentation of RRs
iter_msg_from_zone
int iter_msg_from_zone(struct dns_msg *msg, struct delegpt *dp, enum response_type type, uint16_t dclass)
See if a message is known to be from a certain zone.
Definition: iter_utils.c:858
mesh_serve_expired_lookup
struct dns_msg * mesh_serve_expired_lookup(struct module_qstate *qstate, struct query_info *lookup_qinfo)
Try to get a (expired) cached answer.
Definition: mesh.c:363
config_file::dnscrypt_nonce_cache_slabs
size_t dnscrypt_nonce_cache_slabs
number of slabs for dnscrypt nonces cache
Definition: config_file.h:578
ALGO_NEEDS_MAX
#define ALGO_NEEDS_MAX
number of entries in algorithm needs array
Definition: val_sigcrypt.h:57
log_file
void log_file(FILE *f)
Set logging to go to the specified file *.
Definition: log.c:160
iter_state_to_string
const char * iter_state_to_string(enum iter_state state)
Get iterator state as a string.
Definition: iterator.c:3954
ub_ctx::qq_pipe
struct tube * qq_pipe
the query write pipe
Definition: context.h:70
canonical_compare_byfield
static int canonical_compare_byfield(struct packed_rrset_data *d, const sldns_rr_descriptor *desc, size_t i, size_t j)
Compare two RR for canonical order, in a field-style sweep.
Definition: val_sigcrypt.c:656
tcp_req_info_start_write_buf
static void tcp_req_info_start_write_buf(struct tcp_req_info *req, uint8_t *buf, size_t len)
Send given buffer and setup to write.
Definition: listen_dnsport.c:1737
config_file::do_ip4
int do_ip4
do ip4 query support.
Definition: config_file.h:85
module_env::neg_cache
struct val_neg_cache * neg_cache
negative cache, configured by the validator.
Definition: module.h:494
dtio_channel_command
enum @1 dtio_channel_command
DTIO command channel commands.
unbound-event.h
auth_data::namelabs
int namelabs
number of labels in name
Definition: authzone.h:159
error_encode
void error_encode(sldns_buffer *buf, int r, struct query_info *qinfo, uint16_t qid, uint16_t qflags, struct edns_data *edns)
Encode an error.
Definition: msgencode.c:910
hints_delete_stub
void hints_delete_stub(struct iter_hints *hints, uint16_t c, uint8_t *nm)
Remove stub from hints structure.
Definition: iter_hints.c:543
ip_rate_key::addrlen
socklen_t addrlen
length of address
Definition: infra.h:164
nsec3_calc_b32
static int nsec3_calc_b32(struct regional *region, sldns_buffer *buf, struct nsec3_cached_hash *c)
perform b32 encoding of hash
Definition: val_nsec3.c:610
delkey
static void delkey(struct slabhash_testkey *k)
delete key
Definition: unitslabhash.c:52
edns_opt_copy_alloc
struct edns_option * edns_opt_copy_alloc(struct edns_option *list)
Copy edns option list allocated with malloc.
Definition: msgreply.c:1217
sock_list::addr
struct sockaddr_storage addr
sockaddr
Definition: module.h:580
do_insecure_add
static void do_insecure_add(RES *ssl, struct worker *worker, char *arg)
do the insecure_add command
Definition: remote.c:2236
respip_deinit
void respip_deinit(struct module_env *env, int id)
response-ip deinit
Definition: respip.c:558
ub_ctx_set_option
int ub_ctx_set_option(struct ub_ctx *ctx, const char *opt, const char *val)
Set an option for the context.
Definition: libunbound.c:345
anchor_find_key
static struct ta_key * anchor_find_key(struct trust_anchor *ta, uint8_t *rdata, size_t rdata_len, uint16_t type)
find trustanchor key by exact data match
Definition: val_anchor.c:260
O_MEM
#define O_MEM(opt, str, var)
compare and print memorysize option
Definition: config_file.c:851
auth_xfer_transfer_timer_callback
void auth_xfer_transfer_timer_callback(void *arg)
callback for the task_transfer timer
Definition: authzone.c:5784
fptr_whitelist_event
int fptr_whitelist_event(void(*fptr)(int, short, void *))
Check function pointer whitelist for event structure callback values.
Definition: fptr_wlist.c:164
pkt_strict_sub
static int pkt_strict_sub(sldns_buffer *pkt, uint8_t *sname, uint8_t *dr)
check if DNAME applies to a name
Definition: iter_scrub.c:309
mesh_new_prefetch
void mesh_new_prefetch(struct mesh_area *mesh, struct query_info *qinfo, uint16_t qflags, time_t leeway)
New prefetch message.
Definition: mesh.c:750
LDNS_RDF_TYPE_HIP
@ LDNS_RDF_TYPE_HIP
Represents the Public Key Algorithm, HIT and Public Key fields for the HIP RR types.
Definition: rrdef.h:310
replay_runtime::answer_list
struct replay_answer * answer_list
List of answers to queries from clients.
Definition: replay.h:285
sldns_file_parse_state::origin_len
size_t origin_len
length of origin domain name, in bytes.
Definition: str2wire.h:222
parse_edns_from_pkt
int parse_edns_from_pkt(struct sldns_buffer *pkt, struct edns_data *edns, struct regional *region)
If EDNS data follows a query section, extract it and initialize edns struct.
Definition: msgparse.c:1062
sldns_buffer
implementation of buffers to ease operations
Definition: sbuffer.h:117
infra_data::timeout_A
uint8_t timeout_A
timeouts counter for type A
Definition: infra.h:102
LDNS_RDF_TYPE_EUI48
@ LDNS_RDF_TYPE_EUI48
6 * 8 bit hex numbers separated by dashes.
Definition: rrdef.h:337
packed_rrset_key::rrset_class
uint16_t rrset_class
the rrset class in network format
Definition: packed_rrset.h:96
NSEC3_OPTOUT
#define NSEC3_OPTOUT
Definition: val_nsec3.h:90
serviced_query::serviced_query_status
serviced_query_status
current status
Definition: outside_network.h:357
ub_server_stats::infra_cache_count
long long infra_cache_count
number of infra cache entries
Definition: unbound.h:753
reply_find_rrset_section_an
struct ub_packed_rrset_key * reply_find_rrset_section_an(struct reply_info *rep, uint8_t *name, size_t namelen, uint16_t type, uint16_t dclass)
Find rrset in reply, inside the answer section.
Definition: msgreply.c:771
sldns_wire2str_long_str_scan
int sldns_wire2str_long_str_scan(uint8_t **data, size_t *data_len, char **str, size_t *str_len)
Scan wireformat long_str field to string, with user buffers.
Definition: wire2str.c:1710
addr_tree_init
void addr_tree_init(rbtree_type *tree)
Init addr tree to be empty.
Definition: dnstree.c:79
waiting_tcp::outnet
struct outside_network * outnet
the outside network it is part of
Definition: outside_network.h:279
nsec3_cached_hash::dname
uint8_t * dname
the name to convert
Definition: val_nsec3.h:236
packed_rrset_copy_region
struct ub_packed_rrset_key * packed_rrset_copy_region(struct ub_packed_rrset_key *key, struct regional *region, time_t now)
Allocate rrset in region - no more locks needed.
Definition: packed_rrset.c:326
RETVAL_OUTMEM
#define RETVAL_OUTMEM
return code that means the function ran out of memory.
Definition: msgencode.c:60
rrset_cache_remove
void rrset_cache_remove(struct rrset_cache *r, uint8_t *nm, size_t nmlen, uint16_t type, uint16_t dclass, uint32_t flags)
Remove an rrset from the cache, by name and type and flags.
Definition: rrset.c:441
load_cache
int load_cache(RES *ssl, struct worker *worker)
Load cache(s) from text.
Definition: cachedump.c:702
negative_del_msg
static void negative_del_msg(struct lruhash_entry *e, void *arg)
callback to delete negative and servfail messages
Definition: remote.c:1859
config_file::dnstap
int dnstap
true to enable dnstap support
Definition: config_file.h:483
ub_c_error_va_list
static void ub_c_error_va_list(const char *fmt, va_list args)
print error with file and line number
Definition: config_file.c:1620
wsvc_err2str
void wsvc_err2str(char *str, size_t len, const char *fixed, DWORD err)
Convert windows GetLastError() value to a neat string.
Definition: w_inst.c:46
val_fill_reply
void val_fill_reply(struct reply_info *chase, struct reply_info *orig, size_t skip, uint8_t *name, size_t len, uint8_t *signer)
Fill up the chased reply with the content from the original reply; as pointers to those rrsets.
Definition: val_utils.c:853
respip_always_transparent
@ respip_always_transparent
resolve normally, even when there is response-ip data
Definition: localzone.h:550
entry::match_noedns
uint8_t match_noedns
match absence of EDNS OPT record in query
Definition: testpkts.h:192
xml_data::cdigtype
BIO * cdigtype
the current anchor: DigestType
Definition: unbound-anchor.c:1214
table_grow
void table_grow(struct lruhash *table)
Grow the table lookup array.
Definition: lruhash.c:231
service_callback::cb
comm_point_callback_type * cb
callback function
Definition: outside_network.h:310
synth_cname_rrset
static struct rrset_parse * synth_cname_rrset(uint8_t **sname, size_t *snamelen, uint8_t *alias, size_t aliaslen, struct regional *region, struct msg_parse *msg, struct rrset_parse *rrset, struct rrset_parse *prev, struct rrset_parse *nx, sldns_buffer *pkt)
synthesize a CNAME rrset
Definition: iter_scrub.c:252
comm_point_http_handle_callback
void comm_point_http_handle_callback(int fd, short event, void *arg)
This routine is published for checks and tests, and is only used internally.
Definition: netevent.c:2441
config_file::dnstap_tls_server_name
char * dnstap_tls_server_name
dnstap tls server authentication name
Definition: config_file.h:493
comm_point_get_mem
size_t comm_point_get_mem(struct comm_point *c)
Get size of memory used by comm point.
Definition: netevent.c:3263
sock_list_find
int sock_list_find(struct sock_list *list, struct sockaddr_storage *addr, socklen_t len)
Find addr in list.
Definition: net_help.c:809
autr_point_data::next_probe_time
time_t next_probe_time
next probe time
Definition: autotrust.h:108
ctx_query::querynum
int querynum
query id number, key for node
Definition: context.h:152
timehist_insert
void timehist_insert(struct timehist *hist, struct timeval *tv)
Add time value to histogram.
Definition: timehist.c:134
get_do_flag
static int get_do_flag(uint8_t *pkt, size_t len)
return true if the DO flag is set
Definition: testpkts.c:873
main
int main(int argc, char **argv)
main program for streamtcp
Definition: streamtcp.c:419
tap_data::fd
int fd
the fd
Definition: unbound-dnstap-socket.c:107
sldns_wire2str_edns_nsid_print
int sldns_wire2str_edns_nsid_print(char **str, size_t *str_len, uint8_t *option_data, size_t option_len)
Print EDNS NSID option data to string.
Definition: wire2str.c:1797
view_cmp
int view_cmp(const void *v1, const void *v2)
Compare two view entries in rbtree.
Definition: view.c:48
need_to_update_rrset
static int need_to_update_rrset(void *nd, void *cd, time_t timenow, int equal, int ns)
see if rrset needs to be updated in the cache
Definition: rrset.c:125
parse_copy_decompress
static int parse_copy_decompress(sldns_buffer *pkt, struct msg_parse *msg, struct reply_info *rep, struct regional *region)
Copy and decompress rrs.
Definition: msgreply.c:413
alloc_cache::reg_list
struct regional * reg_list
linked list of regional blocks, using regional->next
Definition: alloc.h:97
dnskey_algo_id_is_supported
int dnskey_algo_id_is_supported(int id)
return true if DNSKEY algorithm id is supported
ub_ctx::queries
rbtree_type queries
Tree of outstanding queries.
Definition: context.h:139
load_qinfo
static char * load_qinfo(char *str, struct query_info *qinfo, struct regional *region)
read qinfo from next three words
Definition: cachedump.c:536
processInitRequest
static int processInitRequest(struct module_qstate *qstate, struct iter_qstate *iq, struct iter_env *ie, int id)
Process the initial part of the request handling.
Definition: iterator.c:1228
dtstream.h
auth_zones_apply_cfg
int auth_zones_apply_cfg(struct auth_zones *az, struct config_file *cfg, int setup, int *is_rpz)
Apply configuration to auth zones.
Definition: authzone.c:2002
infra_get_mem
size_t infra_get_mem(struct infra_cache *infra)
Get memory used by the infra cache.
Definition: infra.c:997
msg_parse::ns_rrsets
size_t ns_rrsets
count of RRsets per section.
Definition: msgparse.h:111
delegpt_ns::resolved
int resolved
If the name has been resolved.
Definition: iter_delegpt.h:108
logkey
static ub_thread_key_type logkey
pthread key for thread ids in logfile
Definition: log.c:70
slabhash_testkey
test structure contains test key
Definition: slabhash.h:205
worker_stat_timer_cb
void worker_stat_timer_cb(void *arg)
statistics timer callback handler
Definition: worker.c:1670
val_env::num_rrset_bogus
size_t num_rrset_bogus
number of times rrsets marked bogus
Definition: validator.h:125
cachedb_env::backend
struct cachedb_backend * backend
the backend routines
Definition: cachedb.h:55
rr_checks
static void rr_checks(char *wire_chk, char *txt_chk, char *txt_out, char *wire_out, char *back)
Check if results are correct.
Definition: unitldns.c:113
delegpt_log
void delegpt_log(enum verbosity_value v, struct delegpt *dp)
Print the delegation point to the log.
Definition: iter_delegpt.c:258
query_info::qtype
uint16_t qtype
qtype, host byte order
Definition: msgreply.h:79
sldns_buffer_write_u32_at
INLINE void sldns_buffer_write_u32_at(sldns_buffer *buffer, size_t at, uint32_t data)
writes the given 4 byte integer at the given position in the buffer
Definition: sbuffer.h:549
sldns_str2wire_rdf_buf
int sldns_str2wire_rdf_buf(const char *str, uint8_t *rd, size_t *len, sldns_rdf_type rdftype)
Convert one rdf in rdata to wireformat and parse from string.
Definition: str2wire.c:937
ip_list
list of IP addresses
Definition: unbound-anchor.c:162
worker_cmd_quit
@ worker_cmd_quit
make the worker quit
Definition: worker.h:69
internal_base::slow_accept_enabled
int slow_accept_enabled
true if slow_accept is enabled
Definition: netevent.c:124
q_ans::zone
const char * zone
zone to query (delegpt)
Definition: unitauth.c:58
label_compare_lower
static int label_compare_lower(uint8_t *lab1, uint8_t *lab2, size_t lablen)
compare a label lowercased
Definition: val_nsec3.c:680
memdup
void * memdup(void *data, size_t len)
Allocate memory and copy over contents.
Definition: net_help.c:177
daemon_remote_exec
void daemon_remote_exec(struct worker *worker)
Handle nonthreaded remote cmd execution.
Definition: remote.c:3074
log.h
lru_update
static void lru_update(struct addrtree *tree, struct addrnode *node)
Move node to the end of LRU list.
Definition: addrtree.c:199
msgreply_sizefunc
size_t msgreply_sizefunc(void *k, void *d)
calculate size of struct query_info + reply_info
Definition: msgreply.c:598
perfinfo::maxfd
int maxfd
max fd value in io ports
Definition: perf.c:114
sldns_str2wire_hip_buf
int sldns_str2wire_hip_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_HIP from string to wireformat.
Definition: str2wire.c:2052
lz_setup_implicit
static int lz_setup_implicit(struct local_zones *zones, struct config_file *cfg)
enter implicit transparent zone for local-data: without local-zone:
Definition: localzone.c:930
log_query_in
void log_query_in(const char *str, uint8_t *name, uint16_t type, uint16_t dclass)
Like log_nametypeclass, but logs with log_query for query logging.
Definition: net_help.c:513
replay_moment::repevt_back_query
@ repevt_back_query
test fails if query to the network does not match
Definition: replay.h:204
pythonmod_operate
void pythonmod_operate(struct module_qstate *qstate, enum module_ev event, int id, struct outbound_entry *outbound)
python module operate on a query
iter_add_prepend_auth
static int iter_add_prepend_auth(struct module_qstate *qstate, struct iter_qstate *iq, struct ub_packed_rrset_key *rrset)
Add rrset to AUTHORITY prepend list.
Definition: iterator.c:507
chunkline_remove_trailcomment
static void chunkline_remove_trailcomment(sldns_buffer *buf, size_t start)
remove trailing ;...
Definition: authzone.c:4175
RBTREE_FOR
#define RBTREE_FOR(node, type, rbtree)
Call with node=variable of struct* with rbnode_type as first element.
Definition: rbtree.h:173
ub_version
const char * ub_version(void)
Get a version string from the libunbound implementation.
Definition: libunbound.c:1380
val_state
val_state
State of the validator for a query.
Definition: validator.h:131
replay_runtime
Replay storage of runtime information.
Definition: replay.h:266
listen_type_udp_dnscrypt
@ listen_type_udp_dnscrypt
udp type + dnscrypt
Definition: listen_dnsport.h:93
iter_dns_store
void iter_dns_store(struct module_env *env, struct query_info *qinf, struct reply_info *rep, int is_referral, time_t leeway, int pside, struct regional *region, uint16_t flags)
Allocate a dns_msg with malloc/alloc structure and store in dns cache.
Definition: iter_utils.c:654
timehist::num
size_t num
number of buckets
Definition: timehist.h:65
packed_rrset_data::count
size_t count
number of rrs.
Definition: packed_rrset.h:240
addredge::str
addrkey_t * str
address of connected node
Definition: addrtree.h:110
rr_is_duplicate
static int rr_is_duplicate(struct packed_rrset_data *pd, uint8_t *rdata, size_t rdata_len)
check for RR duplicates
Definition: localzone.c:308
entry::match_answer
uint8_t match_answer
match answer section
Definition: testpkts.h:180
delegpt_addr::tls_auth_name
char * tls_auth_name
the TLS authentication name, (if not NULL) to use.
Definition: iter_delegpt.h:158
outside_network_delete
void outside_network_delete(struct outside_network *outnet)
Delete outside_network structure.
Definition: fake_event.c:1062
mesh_cb::buf
struct sldns_buffer * buf
buffer for reply
Definition: mesh.h:256
tcp_req_info::read_is_closed
int read_is_closed
read channel has closed, just write pending results
Definition: listen_dnsport.h:262
alloc_special_obtain
alloc_special_type * alloc_special_obtain(struct alloc_cache *alloc)
Get a new special_type element.
Definition: alloc.c:214
replay_range
Range of timesteps, and canned replies to matching queries.
Definition: replay.h:246
printstats
static void printstats(rbtree_type *tree)
print memory stats
Definition: memstats.c:226
do_ratelimit_list
static void do_ratelimit_list(RES *ssl, struct worker *worker, char *arg)
do the ratelimit_list command
Definition: remote.c:2834
config_view::local_data
struct config_strlist * local_data
local data RRs
Definition: config_file.h:702
sldns_wire2str_tsigerror_scan
int sldns_wire2str_tsigerror_scan(uint8_t **d, size_t *dl, char **s, size_t *sl)
Scan wireformat tsigerror field to string, with user buffers.
Definition: wire2str.c:1723
module_env::detect_cycle
int(* detect_cycle)(struct module_qstate *qstate, struct query_info *qinfo, uint16_t flags, int prime, int valrec)
Detect if adding a dependency for qstate on name,type,class will create a dependency cycle.
Definition: module.h:460
neg_create_zone
struct val_neg_zone * neg_create_zone(struct val_neg_cache *neg, uint8_t *nm, size_t nm_len, uint16_t dclass)
Create a new zone.
Definition: val_neg.c:530
unittest_wrapper_subnetmod_sizefunc
size_t unittest_wrapper_subnetmod_sizefunc(void *elemptr)
Wrappers for static functions to unit test.
add_server_nonce
static void add_server_nonce(uint8_t *nonce)
Add the server nonce part to once.
Definition: dnscrypt.c:443
config_deldblstrlist
void config_deldblstrlist(struct config_str2list *list)
Delete items in config double string list.
Definition: config_file.c:1296
tube_read_fd
int tube_read_fd(struct tube *tube)
Get FD that is readable when new information arrives.
Definition: tube.c:423
iter_forward_zone
Iterator forward servers for a particular zone.
Definition: iter_fwd.h:66
cfg_parse_local_zone
int cfg_parse_local_zone(struct config_file *cfg, const char *val)
Parse local-zone directive into two strings and register it in the config.
Definition: config_file.c:2192
dump_msg
static int dump_msg(RES *ssl, struct query_info *k, struct reply_info *d, time_t now)
dump message entry
Definition: cachedump.c:167
buf_to_hex
static void buf_to_hex(uint8_t *b, size_t blen, char *s, size_t slen)
print buffer to hex into string
Definition: unitldns.c:53
daemon::env
struct module_env * env
the module environment master value, copied and changed by threads
Definition: daemon.h:111
verbose
void verbose(enum verbosity_value level, const char *format,...) ATTR_FORMAT(printf
log a verbose message, pass the level for this message.
key_entry_get_rrset
struct ub_packed_rrset_key * key_entry_get_rrset(struct key_entry_key *kkey, struct regional *region)
Obtain rrset from a key entry, allocated in region.
Definition: val_kentry.c:342
ecs_whitelist::dname
rbtree_type dname
Tree of domain names for which Unbound will append an ECS option.
Definition: subnet-whitelist.h:66
codeline::func
char * func
the name of the function
Definition: memstats.c:58
dt_frame_read_buf::frame_len_done
size_t frame_len_done
Number of bytes that have been written to the frame_length field.
Definition: dtstream.h:106
dt_io_list_item
IO thread list of queues list item lists a worker queue that should be looked at and sent to the log ...
Definition: dtstream.h:227
UB_STATS_QTYPE_NUM
#define UB_STATS_QTYPE_NUM
number of qtype that is stored for in array
Definition: unbound.h:650
ecs_whitelist_create
struct ecs_whitelist * ecs_whitelist_create(void)
Create ecs_whitelist structure.
fptr_wlist.h
inplace_cb::cb
void * cb
Inplace callback routine.
Definition: module.h:231
rpz_apply_qname_trigger
int rpz_apply_qname_trigger(struct auth_zones *az, struct module_env *env, struct query_info *qinfo, struct edns_data *edns, sldns_buffer *buf, struct regional *temp, struct comm_reply *repinfo, uint8_t *taglist, size_t taglen, struct ub_server_stats *stats)
Walk over the RPZ zones to find and apply a QNAME trigger policy.
Definition: rpz.c:939
lruhash_traverse
void lruhash_traverse(struct lruhash *h, int wr, void(*func)(struct lruhash_entry *, void *), void *arg)
Traverse a lruhash.
Definition: lruhash.c:524
iter_get_funcblock
struct module_func_block * iter_get_funcblock(void)
Get the iterator function block.
Definition: iterator.c:3948
neg_setup_zone_node
static struct val_neg_zone * neg_setup_zone_node(uint8_t *nm, size_t nm_len, int labs, uint16_t dclass)
Create a single zone node.
Definition: val_neg.c:449
iter_qstate::minimise_count
int minimise_count
Count number of QNAME minimisation iterations.
Definition: iterator.h:397
probetree_cmp
int probetree_cmp(const void *x, const void *y)
probe tree compare function
Definition: autotrust.c:92
negative_del_rrset
static void negative_del_rrset(struct lruhash_entry *e, void *arg)
callback to delete negative and servfail rrsets
Definition: remote.c:1842
print_build_options
static void print_build_options(void)
print build options.
Definition: unbound.c:101
dnsc_handle_curved_request
int dnsc_handle_curved_request(struct dnsc_env *dnscenv, struct comm_reply *repinfo)
Definition: dnscrypt.c:884
unique_mesh_state
int unique_mesh_state(struct edns_option *list, struct module_env *env)
Check if an unique mesh state is required.
Definition: module.c:206
PTR_MAX_OFFSET
#define PTR_MAX_OFFSET
largest valid compression offset
Definition: msgparse.h:208
ub_ctx::env
struct module_env * env
module env master value
Definition: context.h:112
local_zone_transparent
@ local_zone_transparent
resolve normally
Definition: localzone.h:75
auth_data_delete
static void auth_data_delete(struct auth_data *n)
delete auth data domain node
Definition: authzone.c:362
dt_io_thread::stop_flush_event
void * stop_flush_event
in stop flush, this is nonNULL and references the stop_ev
Definition: dtstream.h:178
ub_ctx::bg_pid
pid_t bg_pid
pid of bg worker process
Definition: context.h:89
LDNS_RDF_TYPE_STR
@ LDNS_RDF_TYPE_STR
txt string
Definition: rrdef.h:280
tcp_proxy_delete
static void tcp_proxy_delete(struct tcp_proxy *p)
delete tcp proxy
Definition: delayer.c:533
worker_delete
void worker_delete(struct worker *worker)
Delete worker.
Definition: worker.c:1953
nsec3_do_prove_nodata
static enum sec_status nsec3_do_prove_nodata(struct module_env *env, struct nsec3_filter *flt, rbtree_type *ct, struct query_info *qinfo)
Do the nodata proof.
Definition: val_nsec3.c:1092
resp_addr_get_rrset
struct ub_packed_rrset_key * resp_addr_get_rrset(struct resp_addr *addr)
returns rrset portion of the specified node in the respip address tree; returns NULL for NULL input; ...
Definition: respip.c:1293
subnet_qstate::track_max_scope
int track_max_scope
keep track of longest received scope, set after receiving CNAME for incoming QNAME.
Definition: subnetmod.h:89
alloc_cache::cleanup
void(* cleanup)(void *)
what function to call to cleanup when last id is reached
Definition: alloc.h:88
comm_timer_disable
void comm_timer_disable(struct comm_timer *timer)
disable timer.
Definition: fake_event.c:1508
context_finalize
int context_finalize(struct ub_ctx *ctx)
finalize a context.
Definition: context.c:56
config_file::serve_expired_ttl_reset
int serve_expired_ttl_reset
reset serve expired TTL after failed update attempt
Definition: config_file.h:370
ub_stats_info
Statistics to send over the control pipe when asked This struct is made to be memcopied,...
Definition: unbound.h:801
mesh_state_create
struct mesh_state * mesh_state_create(struct module_env *env, struct query_info *qinfo, struct respip_client_info *cinfo, uint16_t qflags, int prime, int valrec)
Create and initialize a new mesh state and its query state Does not put the mesh state into rbtrees a...
Definition: mesh.c:770
edns_data::edns_version
uint8_t edns_version
The EDNS version number.
Definition: msgparse.h:221
ub_server_stats::max_query_list_size
long long max_query_list_size
max value of query list size reached.
Definition: unbound.h:679
sldns_str2period
uint32_t sldns_str2period(const char *nptr, const char **endptr)
converts a ttl value (like 5d2h) to a long.
Definition: parseutil.c:212
module_qstate::env
struct module_env * env
environment for this query
Definition: module.h:629
print_id
static int print_id(FILE *out, char *fname, uint8_t *nm, size_t nmlen, uint16_t dclass)
print ID to file
Definition: autotrust.c:1082
sldns_edns_flags
struct sldns_struct_lookup_table * sldns_edns_flags
EDNS flags.
Definition: wire2str.c:160
fstrm_create_control_frame_finish
void * fstrm_create_control_frame_finish(size_t *len)
This creates an FSTRM control frame of type FINISH.
Definition: dnstap_fstrm.c:151
print_longnum
static int print_longnum(RES *ssl, const char *desc, size_t x)
print long number
Definition: remote.c:778
pending::pkt_len
size_t pkt_len
length of query packet.
Definition: outside_network.h:249
msg_create
static struct dns_msg * msg_create(struct regional *region, struct query_info *qinfo)
create new dns_msg
Definition: authzone.c:110
rrset_parse::flags
uint32_t flags
the flags for the rrset, like for packedrrset
Definition: msgparse.h:161
key_cache_insert
void key_cache_insert(struct key_cache *kcache, struct key_entry_key *kkey, struct module_qstate *qstate)
Insert or update a key cache entry.
Definition: val_kcache.c:83
lruhash_entry::lru_prev
struct lruhash_entry * lru_prev
prev entry in lru chain.
Definition: lruhash.h:216
entry::copy_ednsdata_assume_clientsubnet
uint8_t copy_ednsdata_assume_clientsubnet
copy ednsdata to reply, assume it is clientsubnet and adjust scopemask to match sourcemask
Definition: testpkts.h:210
replay_runtime::sig_cb
void(* sig_cb)(int, void *)
signal handler callback
Definition: replay.h:310
verb
static int verb
verbosity for unbound-host app
Definition: unbound-host.c:79
ipsecmod_init
int ipsecmod_init(struct module_env *env, int id)
Init the ipsecmod module.
rpz_insert_response_ip_trigger
static int rpz_insert_response_ip_trigger(struct rpz *r, uint8_t *dname, size_t dnamelen, enum rpz_action a, uint16_t rrtype, uint16_t rrclass, uint32_t ttl, uint8_t *rdata, size_t rdata_len, uint8_t *rr, size_t rr_len)
Insert RR into RPZ's respip_set.
Definition: rpz.c:540
replay_moment::repevt_tempfile_check
@ repevt_tempfile_check
check a temp file
Definition: replay.h:208
perfinfo::dest
struct sockaddr_storage dest
destination
Definition: perf.c:84
iter_qstate::sent_count
int sent_count
number of queries fired off
Definition: iterator.h:310
regional::next
char * next
next chunk.
Definition: regional.h:66
respip_inform
@ respip_inform
log query source and answer query
Definition: localzone.h:544
log_reply_info
void log_reply_info(enum verbosity_value v, struct query_info *qinf, struct sockaddr_storage *addr, socklen_t addrlen, struct timeval dur, int cached, struct sldns_buffer *rmsg)
Print string with neat domain name, type, class, status code from, and size of a query response.
Definition: msgreply.c:843
do_status
static void do_status(RES *ssl, struct worker *worker)
do the status command
Definition: remote.c:2288
usage
static void usage(void)
Give petal usage, and exit (1).
Definition: petal.c:73
listen_port::next
struct listen_port * next
next in list
Definition: listen_dnsport.h:107
rr_transform
static void rr_transform(char *txt_in, char *wire1, char *txt_out, char *wire2, size_t bufs)
Transform input.
Definition: unitldns.c:75
local_zone::data
rbtree_type data
local data for this zone rbtree of struct local_data
Definition: localzone.h:155
zone_del_kcache
static void zone_del_kcache(struct lruhash_entry *e, void *arg)
callback to delete keys in zone
Definition: remote.c:1720
sldns_str2wire_dname
uint8_t * sldns_str2wire_dname(const char *str, size_t *len)
Convert text string into dname wireformat.
Definition: str2wire.c:170
sldns_wire2str_tsigtime_scan
int sldns_wire2str_tsigtime_scan(uint8_t **data, size_t *data_len, char **str, size_t *str_len)
Scan wireformat tsigtime field to string, with user buffers.
Definition: wire2str.c:1067
print_thread_stats
static int print_thread_stats(RES *ssl, int i, struct ub_stats_info *s)
print stats for one thread
Definition: remote.c:768
client_info_compare
static int client_info_compare(const struct respip_client_info *ci_a, const struct respip_client_info *ci_b)
Compare two response-ip client info entries for the purpose of mesh state compare.
Definition: mesh.c:149
dt_io_thread::event
void * event
event structure that the thread uses
Definition: dtstream.h:139
ub_event_base_free
void ub_event_base_free(struct ub_event_base *)
Free event base.
Definition: ub_event.c:263
dt_io_thread::fd
int fd
file descriptor that the thread writes to
Definition: dtstream.h:137
read_keys
static ldns_key_list * read_keys(int num, char *names[], struct keysets *set)
read all key files, exit on error
Definition: signit.c:125
reply_with_finish
static int reply_with_finish(int fd)
reply with FINISH control frame to bidirectional client, returns 0 on error
Definition: unbound-dnstap-socket.c:825
sldns_wire2str_edns_scan
int sldns_wire2str_edns_scan(uint8_t **data, size_t *data_len, char **str, size_t *str_len, uint8_t *pkt, size_t pktlen)
Scan wireformat EDNS OPT to string, with user buffers.
Definition: wire2str.c:2021
listen_sslctx_delete_ticket_keys
void listen_sslctx_delete_ticket_keys(void)
Free memory used for TLS session ticket keys.
Definition: net_help.c:1541
iter_donotq.h
addr_tree_init_parents
void addr_tree_init_parents(rbtree_type *tree)
Initialize parent pointers in addr tree.
Definition: dnstree.c:134
rrset_equal
static int rrset_equal(struct ub_packed_rrset_key *k1, struct ub_packed_rrset_key *k2)
check equality of two rrsets
Definition: iter_utils.c:912
ub_server_stats::tcp_accept_usage
long long tcp_accept_usage
usage of tcp accept list
Definition: unbound.h:739
config_file::val_log_squelch
int val_log_squelch
squelch val_log_level to log - this is library goes to callback
Definition: config_file.h:358
ALIGNMENT
#define ALIGNMENT
what size to align on; make sure a char* fits in it.
Definition: regional.c:53
get_random_data
static void get_random_data(char **fromp, char **top, char *zname)
get static pointer to random data names from and to
Definition: unitneg.c:113
local_zones_del_zone
void local_zones_del_zone(struct local_zones *zones, struct local_zone *z)
Delete a zone.
Definition: localzone.c:1866
alloc_set_id_cleanup
void alloc_set_id_cleanup(struct alloc_cache *alloc, void(*cleanup)(void *), void *arg)
Set cleanup on ID overflow callback function.
Definition: alloc.c:357
parse_edns_from_pkt
int parse_edns_from_pkt(sldns_buffer *pkt, struct edns_data *edns, struct regional *region)
If EDNS data follows a query section, extract it and initialize edns struct.
Definition: msgparse.c:1062
ub_event::magic
unsigned long magic
magic must be UB_EVENT_MAGIC (0x44d74d78)
Definition: unbound-event.h:168
delegpt
Delegation Point.
Definition: iter_delegpt.h:57
nsec3_get_nextowner_b32
size_t nsec3_get_nextowner_b32(struct ub_packed_rrset_key *rrset, int r, uint8_t *buf, size_t max)
Get next owner name, converted to base32 encoding and with the zone name (taken from the nsec3 owner ...
Definition: val_nsec3.c:268
auth_zone::fallback_enabled
int fallback_enabled
fallback to the internet on failure or ttl-expiry of auth zone
Definition: authzone.h:123
acl_refuse
@ acl_refuse
disallow access, send a polite 'REFUSED' reply
Definition: acl_list.h:58
module_qstate::minfo
void * minfo[MAX_MODULE]
module specific data for query.
Definition: module.h:627
outnet_comm_point_for_udp
struct comm_point * outnet_comm_point_for_udp(struct outside_network *outnet, comm_point_callback_type *cb, void *cb_arg, struct sockaddr_storage *to_addr, socklen_t to_addrlen)
Create udp commpoint suitable for sending packets to the destination.
Definition: outside_network.c:2268
new_entry
static struct lruhash_entry * new_entry(struct infra_cache *infra, struct sockaddr_storage *addr, socklen_t addrlen, uint8_t *name, size_t namelen, time_t tm)
Create and init a new entry for a host.
Definition: infra.c:407
listen_get_mem
size_t listen_get_mem(struct listen_dnsport *listen)
get memory size used by the listening structs
Definition: listen_dnsport.c:1552
unbound_mem_freed
size_t unbound_mem_freed
global debug value to keep track of total memory frees
Definition: alloc.c:367
dt_io_thread::cur_msg_done
size_t cur_msg_done
number of bytes written for the current message
Definition: dtstream.h:164
comm_signal_callback
void comm_signal_callback(int sig, short event, void *arg)
This routine is published for checks and tests, and is only used internally.
Definition: netevent.c:3387
val_qstate::state
enum val_state state
State of the validator module.
Definition: validator.h:151
local_rrset_remove_rr
int local_rrset_remove_rr(struct packed_rrset_data *pd, size_t index)
Remove RR from rrset that is created using localzone's rrset_insert_rr.
Definition: localzone.c:400
perf_encode
static void perf_encode(struct query_info *qi, struct reply_info *rep, uint16_t id, uint16_t flags, sldns_buffer *out, time_t timenow, struct edns_data *edns)
performance test message encoding
Definition: unitmsgparse.c:166
auth_chunk::data
uint8_t * data
the data from this chunk, this is what was received.
Definition: authzone.h:461
edns_known_options_init
int edns_known_options_init(struct module_env *env)
Initialize the edns known options by allocating the required space.
Definition: module.c:75
config_get_option_collate
int config_get_option_collate(struct config_file *cfg, const char *opt, char **str)
Get an option and collate results into string.
Definition: config_file.c:788
corner_cases
static void corner_cases(struct regional *r)
test regional corner cases, zero, one, end of structure
Definition: unitregional.c:48
libworker_do_cmd
static void libworker_do_cmd(struct libworker *w, uint8_t *msg, uint32_t len)
do control command coming into bg server
Definition: libworker.c:295
config_file::chrootdir
char * chrootdir
chrootdir, if not "" or chroot will be done
Definition: config_file.h:285
replay_runtime::exit_cleanly
int exit_cleanly
time to exit cleanly
Definition: replay.h:314
addrnode
Definition: addrtree.h:91
sldns_wire2str_tag_scan
int sldns_wire2str_tag_scan(uint8_t **data, size_t *data_len, char **str, size_t *str_len)
Scan wireformat TAG field to string, with user buffers.
Definition: wire2str.c:1691
tube::res_list
struct tube_res_list * res_list
list of outstanding results to be written back
Definition: tube.h:89
tcp_send_list
An item that has to be TCP relayed.
Definition: delayer.c:100
local_zone_find_data
struct local_data * local_zone_find_data(struct local_zone *z, uint8_t *nm, size_t nmlen, int nmlabs)
Find a data node by exact name for a local zone.
Definition: localzone.c:420
ub_resolve_free
void ub_resolve_free(struct ub_result *result)
Free storage associated with a result structure.
Definition: libunbound.c:870
libworker::rndstate
struct ub_randstate * rndstate
random() table for this worker.
Definition: libworker.h:88
nsec3_get_params
int nsec3_get_params(struct ub_packed_rrset_key *rrset, int r, int *algo, size_t *iter, uint8_t **salt, size_t *saltlen)
Get NSEC3 parameters out of rr.
Definition: val_nsec3.c:209
macro_print_debug
void macro_print_debug(rbtree_type *store)
Print macro variables stored as debug info.
Definition: replay.c:900
libworker::base
struct comm_base * base
the event base this worker works with
Definition: libworker.h:84
nsec3_hash_test
static void nsec3_hash_test(const char *fname)
Read file to test NSEC3 hash algo.
Definition: unitverify.c:463
get_tld_label
static uint8_t * get_tld_label(uint8_t *dname, size_t maxdnamelen)
Get the label that is just before the root label.
Definition: rpz.c:116
OUTBOUND_UDP_RETRY
#define OUTBOUND_UDP_RETRY
number of retries on outgoing UDP queries
Definition: outside_network.c:80
infra_test
static void infra_test(void)
test host cache
Definition: unitmain.c:458
respip_typetransparent
@ respip_typetransparent
gives response data (if any), else nodata answer.
Definition: localzone.h:570
iter_get_mem
size_t iter_get_mem(struct module_env *env, int id)
iterator alloc size routine
Definition: iterator.c:3929
ipset_operate
void ipset_operate(struct module_qstate *qstate, enum module_ev event, int id, struct outbound_entry *outbound)
Operate on an event on a query (in qstate).
Definition: ipset.c:288
tcp_req_info_handle_readdone
void tcp_req_info_handle_readdone(struct tcp_req_info *req)
Handle read done of a new request from the client.
Definition: listen_dnsport.c:1803
comm_point_stop_listening
void comm_point_stop_listening(struct comm_point *c)
Stop listening for input on the commpoint.
Definition: netevent.c:3195
compress_tree_node::labs
int labs
number of labels in domain name, kept to help compare func.
Definition: msgencode.c:88
LDNS_RR_TYPE_DNAME
@ LDNS_RR_TYPE_DNAME
RFC2672.
Definition: rrdef.h:161
auth_zones_setup_zones
static int auth_zones_setup_zones(struct auth_zones *az)
Setup all zones.
Definition: authzone.c:1833
iter_lookup_parent_NS_from_cache
int iter_lookup_parent_NS_from_cache(struct module_env *env, struct delegpt *dp, struct regional *region, struct query_info *qinfo)
Add parent NS record if that exists in the cache.
Definition: iter_utils.c:1167
NETEVENT_DONE
#define NETEVENT_DONE
to pass done transfer to callback function; http file is complete
Definition: netevent.h:89
val_clear
void val_clear(struct module_qstate *qstate, int id)
validator cleanup query state
Definition: validator.c:3245
sldns_wire2str_rdata_scan
int sldns_wire2str_rdata_scan(uint8_t **d, size_t *dlen, char **s, size_t *slen, uint16_t rrtype, uint8_t *pkt, size_t pktlen, int *comprloop)
Scan wireformat rdata to string, with user buffers.
Definition: wire2str.c:703
calc_zone_need
static size_t calc_zone_need(uint8_t *d, size_t len)
Calculate space needed for zone and all its parents.
Definition: val_neg.c:350
ub_signal_new
struct ub_event * ub_signal_new(struct ub_event_base *base, int fd, void(*cb)(int, short, void *), void *arg)
Create a new ub_event signal for the event base.
Definition: ub_event_pluggable.c:520
auth_chunk::len
size_t len
length of allocated data
Definition: authzone.h:463
pythonmod.h
rtt_test
static void rtt_test(void)
test RTT code
Definition: unitmain.c:411
comm_timer_set
void comm_timer_set(struct comm_timer *timer, struct timeval *tv)
reset timevalue for timer.
Definition: fake_event.c:1515
config_add_tag
int config_add_tag(struct config_file *cfg, const char *tag)
Add a tag name to the config.
Definition: config_file.c:1923
set_neg_cache_stats
static void set_neg_cache_stats(struct worker *worker, struct ub_server_stats *svr, int reset)
Set the neg cache stats.
Definition: stats.c:162
LDNS_RR_TYPE_SRV
@ LDNS_RR_TYPE_SRV
SRV record RFC2782.
Definition: rrdef.h:149
set_kiddo_parents
static void set_kiddo_parents(struct local_zone *z, struct local_zone *match, struct local_zone *newp)
iterate over the kiddies of the given name and set their parent ptr
Definition: localzone.c:1811
reply_info::padding
uint32_t padding
32 bit padding to pad struct member alignment to 64 bits.
Definition: msgreply.h:144
sldns_wire2str_type_scan
int sldns_wire2str_type_scan(uint8_t **d, size_t *dlen, char **s, size_t *slen)
Scan wireformat rr type to string, with user buffers.
Definition: wire2str.c:921
nsec3_prove_wildcard
enum sec_status nsec3_prove_wildcard(struct module_env *env, struct val_env *ve, struct ub_packed_rrset_key **list, size_t num, struct query_info *qinfo, struct key_entry_key *kkey, uint8_t *wc)
Prove that a positive wildcard match was appropriate (no direct match RRset).
Definition: val_nsec3.c:1243
daemon_delete
void daemon_delete(struct daemon *daemon)
Delete workers, close listening ports.
Definition: daemon.c:737
delegpt::namelen
size_t namelen
length of the delegation point name
Definition: iter_delegpt.h:61
do_service
static void do_service(char *addr, int port, char *key, char *cert)
provide ssl service
Definition: petal.c:572
config_file::min_ttl
int min_ttl
the number of seconds minimum TTL used for RRsets and messages
Definition: config_file.h:274
reply_packet::raw_ednsdata
struct sldns_buffer * raw_ednsdata
Additional EDNS data for matching queries.
Definition: testpkts.h:157
delegpt_count_targets
size_t delegpt_count_targets(struct delegpt *dp)
count total number of targets in dp
Definition: iter_delegpt.c:316
delegpt::result_list
struct delegpt_addr * result_list
the list of returned targets; subset of target_list
Definition: iter_delegpt.h:73
log_err
void void log_err(const char *format,...) ATTR_FORMAT(printf
Log error message.
edns_known_options_delete
void edns_known_options_delete(struct module_env *env)
Free the allocated space for the known edns options.
Definition: module.c:85
config_strlist
List of strings for config options.
Definition: config_file.h:721
serviced_gen_query
static void serviced_gen_query(sldns_buffer *buff, uint8_t *qname, size_t qnamelen, uint16_t qtype, uint16_t qclass, uint16_t flags)
create query for serviced queries
Definition: outside_network.c:1382
iter_qstate::refetch_glue
int refetch_glue
This is a flag that, if true, means that this query is for (re)fetching glue from a zone.
Definition: iterator.h:376
anchors_ds_unsupported
static size_t anchors_ds_unsupported(struct trust_anchor *ta)
Check DS algos for support, warn if not.
Definition: val_anchor.c:953
local_zones_create
struct local_zones * local_zones_create(void)
Create local zones storage.
Definition: localzone.c:60
ub_stats_info::mesh_replies_sum_wait_sec
long long mesh_replies_sum_wait_sec
mesh stats: sum of waiting times for the replies
Definition: unbound.h:816
anchors_init_parents_locked
void anchors_init_parents_locked(struct val_anchors *anchors)
Recalculate parent pointers.
Definition: val_anchor.c:155
remove_rr
static int remove_rr(const char *str, sldns_buffer *pkt, struct rrset_parse *rrset, struct rr_parse *prev, struct rr_parse **rr, struct sockaddr_storage *addr, socklen_t addrlen)
remove RR from msgparse RRset, return true if rrset is entirely bad
Definition: iter_priv.c:212
FSTRM_CONTROL_FRAME_READY
#define FSTRM_CONTROL_FRAME_READY
control frame value to denote the control frame READY
Definition: dnstap_fstrm.h:106
fptr_whitelist_print_func
int fptr_whitelist_print_func(void(*fptr)(char *, void *))
Check function pointer whitelist for config_get_option func values.
Definition: fptr_wlist.c:584
nsec3_cached_hash::rr
int rr
where are the parameters for conversion, this RR number in data
Definition: val_nsec3.h:234
nsec3_hash_to_b32
size_t nsec3_hash_to_b32(uint8_t *hash, size_t hashlen, uint8_t *zone, size_t zonelen, uint8_t *buf, size_t max)
Convert hash into base32 encoding and with the zone name appended.
Definition: val_nsec3.c:250
S_POW2
#define S_POW2(str, var)
put pow2 number into variable
Definition: config_file.c:418
dname_pkt_compare
int dname_pkt_compare(sldns_buffer *pkt, uint8_t *d1, uint8_t *d2)
Compare dnames in packet (compressed).
Definition: dname.c:233
massage_class
static int massage_class(const char *c)
massage input class
Definition: unbound-host.c:203
errinf
void errinf(struct module_qstate *qstate, const char *str)
Append text to the error info for validation.
Definition: config_file.c:2379
sldns_str2wire_cert_alg_buf
int sldns_str2wire_cert_alg_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_CERT_ALG from string to wireformat.
Definition: str2wire.c:1366
lock_ref::node
rbnode_type node
rbnode, key is an order_id ptr
Definition: lock_verify.c:92
RBTREE_NULL
#define RBTREE_NULL
The nullpointer, points to empty node.
Definition: rbtree.h:69
anchor_state_update
static void anchor_state_update(struct module_env *env, struct autr_ta *anchor, int *c)
Do statestable transition matrix for anchor.
Definition: autotrust.c:1793
rrset_ref::key
struct ub_packed_rrset_key * key
the key with lock, and ptr to packed data.
Definition: msgreply.h:106
val_nsec_proves_insecuredelegation
int val_nsec_proves_insecuredelegation(struct ub_packed_rrset_key *nsec, struct query_info *qinfo)
Determine if an nsec proves an insecure delegation towards the qname.
Definition: val_nsec.c:453
delegpt_find_addr
struct delegpt_addr * delegpt_find_addr(struct delegpt *dp, struct sockaddr_storage *addr, socklen_t addrlen)
Find address record in total list of delegation point.
Definition: iter_delegpt.c:146
query_info_compare
int query_info_compare(void *m1, void *m2)
Compare two queryinfo structures, on query and type, class.
Definition: msgreply.c:575
log_errno
static void log_errno(const char *str)
print errno
Definition: petal.c:93
ub_stats_info::mesh_num_states
long long mesh_num_states
mesh stats: current number of states
Definition: unbound.h:806
init_outgoing_availports
static void init_outgoing_availports(int *array, int num)
init ports possible for use
Definition: config_file.c:1521
reply_find_soa
static struct ub_packed_rrset_key * reply_find_soa(struct reply_info *rep)
find zone name of message, returns the SOA record
Definition: val_neg.c:566
libworker_bg
int libworker_bg(struct ub_ctx *ctx)
Create a background worker.
Definition: libworker.c:383
pending_node_del
static void pending_node_del(rbnode_type *node, void *arg)
helper pending delete
Definition: outside_network.c:877
sldns_str2wire_int16_data_buf
int sldns_str2wire_int16_data_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_INT16_DATA from string to wireformat.
Definition: str2wire.c:2102
ip_rate_list
static void ip_rate_list(struct lruhash_entry *e, void *arg)
list items in the ip_ratelimit table
Definition: remote.c:2816
VAL_FINISHED_STATE
@ VAL_FINISHED_STATE
finish up
Definition: validator.h:139
newkey
static testkey_type * newkey(int id)
allocate new key, fill in hash
Definition: unitlruhash.c:61
local_zone::parent
struct local_zone * parent
parent zone, if any.
Definition: localzone.h:122
config_file::username
char * username
username to change to, if not "".
Definition: config_file.h:287
adjust_host
static void adjust_host(char *host)
adjust host
Definition: petal.c:330
autr_permit_small_holddown
int autr_permit_small_holddown
for debug allow small timeout values for fast rollovers
Definition: config_file.c:78
read_entry
struct entry * read_entry(FILE *in, const char *name, struct sldns_file_parse_state *pstate, int skip_whitespace)
Read one entry from the data file.
Definition: testpkts.c:524
auth_zones::have_downstream
int have_downstream
do we have downstream enabled
Definition: authzone.h:80
comm_point::fd
int fd
file descriptor for communication point
Definition: netevent.h:160
worker::numports
int numports
number of ports for this worker
Definition: worker.h:100
BLACKLIST_PENALTY
#define BLACKLIST_PENALTY
penalty to validation failed blacklisted IPs
Definition: iter_utils.c:73
dns64_inform_super
void dns64_inform_super(struct module_qstate *qstate, int id, struct module_qstate *super)
This function is called when a sub-query finishes to inform the parent query.
Definition: dns64.c:935
tube::cmd_msg
uint8_t * cmd_msg
the current read command content, malloced, can be partially read
Definition: tube.h:81
val_qstate::dlv_lookup_name_len
size_t dlv_lookup_name_len
length of dlv lookup name
Definition: validator.h:228
xfr_probe_lookup_host
static int xfr_probe_lookup_host(struct auth_xfer *xfr, struct module_env *env)
lookup a host name for its addresses, if needed
Definition: authzone.c:6249
config_file::prefetch_key
int prefetch_key
if prefetching of DNSKEYs should be performed.
Definition: config_file.h:280
local_zone_typetransparent
@ local_zone_typetransparent
do not block types at localdata names
Definition: localzone.h:77
server_stats_reply
void server_stats_reply(struct worker *worker, int reset)
Send stats over comm tube in reply to query cmd.
Definition: stats.c:386
config_file::hide_trustanchor
int hide_trustanchor
do not report trustanchor (trustanchor.unbound)
Definition: config_file.h:317
extract_ipv4
static uint32_t extract_ipv4(const uint8_t ipv6[], size_t ipv6_len, const int offset)
Extract an IPv4 address embedded in the IPv6 address ipv6 at offset offset (in bits).
Definition: dns64.c:199
DNSCACHE_STORE_ZEROTTL
#define DNSCACHE_STORE_ZEROTTL
Flags to control behavior of dns_cache_store() and dns_cache_store_msg().
Definition: dns.h:56
config_file::dnscrypt_shared_secret_cache_slabs
size_t dnscrypt_shared_secret_cache_slabs
number of slabs for dnscrypt shared secrets cache
Definition: config_file.h:574
ds_get_keytag
uint16_t ds_get_keytag(struct ub_packed_rrset_key *ds_rrset, size_t ds_idx)
Get DS keytag, footprint value that matches the DNSKEY keytag it signs.
Definition: val_sigcrypt.c:228
ub_event_get_version
const char * ub_event_get_version(void)
Returns event-base type.
Definition: ub_event.c:146
mesh_state_attachment
int mesh_state_attachment(struct mesh_state *super, struct mesh_state *sub)
Setup attachment super/sub relation between super and sub mesh state.
Definition: mesh.c:1069
outbound_list.h
comm_point_raw_handle_callback
void comm_point_raw_handle_callback(int fd, short event, void *arg)
This routine is published for checks and tests, and is only used internally.
reply_packet
struct to keep a linked list of reply packets for a query
Definition: testpkts.h:149
revoke_dnskey
static void revoke_dnskey(struct autr_ta *ta, int off)
revoke a trust anchor
Definition: autotrust.c:1331
sldns_buffer::_limit
size_t _limit
The read/write limit.
Definition: sbuffer.h:122
nsec3_filter::fclass
uint16_t fclass
class of records for the NSEC3, only this class applies
Definition: val_nsec3.c:107
bin_init
void bin_init(struct lruhash_bin *array, size_t size)
init the hash bins for the table
Definition: lruhash.c:48
assemble_iterate_dnskey
static int assemble_iterate_dnskey(struct autr_ta **list, uint8_t **rr, size_t *rr_len, size_t *dname_len)
iterator for DNSKEYs from keylist.
Definition: autotrust.c:574
log_hex
void void void void log_hex(const char *msg, void *data, size_t length)
Log a hex-string to the log.
Definition: log.c:401
respip_deinit
void respip_deinit(struct module_env *env, int id)
response-ip deinit
Definition: respip.c:558
ub_result::answer_packet
void * answer_packet
The DNS answer packet.
Definition: unbound.h:158
fptr_whitelist_hash_deldatafunc
int fptr_whitelist_hash_deldatafunc(lruhash_deldatafunc_type fptr)
Check function pointer whitelist for lruhash deldata callback values.
Definition: fptr_wlist.c:303
algo_needs_init_dnskey_add
void algo_needs_init_dnskey_add(struct algo_needs *n, struct ub_packed_rrset_key *dnskey, uint8_t *sigalg)
Initialize algo needs structure, set algos from rrset as needed.
Definition: val_sigcrypt.c:389
ub_event_add_bits
void ub_event_add_bits(struct ub_event *, short bits)
Add event bits for this event to fire on.
Definition: ub_event.c:362
isip4
static int isip4(const char *nm, char **res)
determine if str is ip4 and put into reverse lookup format
Definition: unbound-host.c:117
th_buck::lower
struct timeval lower
lower bound
Definition: timehist.h:53
outside_network::svcd_overhead
size_t svcd_overhead
serviced_callbacks malloc overhead when processing multiple identical serviced queries to the same se...
Definition: outside_network.h:83
PREFETCH_TTL_CALC
#define PREFETCH_TTL_CALC(ttl)
calculate the prefetch TTL as 90% of original.
Definition: msgreply.h:63
proxy::addr_len
socklen_t addr_len
length of addr
Definition: delayer.c:84
PACKED_RRSET_SOA_NEG
#define PACKED_RRSET_SOA_NEG
this rrset is SOA and has the negative ttl (from nxdomain or nodata), this is set on SOA rrsets in th...
Definition: packed_rrset.h:59
pending_find_match
static int pending_find_match(struct replay_runtime *runtime, struct entry **entry, struct fake_pending *pend)
Find the range that matches this pending message.
Definition: fake_event.c:234
rrset_cache_update
int rrset_cache_update(struct rrset_cache *r, struct rrset_ref *ref, struct alloc_cache *alloc, time_t timenow)
Update an rrset in the rrset cache.
Definition: rrset.c:185
pkt_hash_rrset
hashvalue_type pkt_hash_rrset(sldns_buffer *pkt, uint8_t *dname, uint16_t type, uint16_t dclass, uint32_t rrset_flags)
Calculate hash value for rrset in packet.
Definition: msgparse.c:167
list_is_secure
static int list_is_secure(struct module_env *env, struct val_env *ve, struct ub_packed_rrset_key **list, size_t num, struct key_entry_key *kkey, char **reason, struct module_qstate *qstate)
test if list is all secure
Definition: val_nsec3.c:1290
iter_priv::n
rbtree_type n
Tree of the domains spans that are allowed to contain the blocked address spans.
Definition: iter_priv.h:70
ub_event_get_version
const char * ub_event_get_version(void)
Returns event-base type.
Definition: ub_event_pluggable.c:150
parse_cmdline
static void parse_cmdline(char *argv[], struct keysets *s)
read expi ince keytag owner from cmdline
Definition: signit.c:114
ub_packed_rrset_key::entry
struct lruhash_entry entry
entry into hashtable.
Definition: packed_rrset.h:113
iter_find_rrset_in_prepend_answer
static int iter_find_rrset_in_prepend_answer(struct iter_qstate *iq, struct ub_packed_rrset_key *rrset)
Find rrset in ANSWER prepend list.
Definition: iterator.c:459
comm_point::tcl_addr
struct tcl_addr * tcl_addr
the entry for the connection.
Definition: netevent.h:269
sldns_wire2str_header_scan
int sldns_wire2str_header_scan(uint8_t **data, size_t *data_len, char **str, size_t *str_len)
Scan wireformat packet header to string, with user buffers.
Definition: wire2str.c:663
rrinternal_get_type
static int rrinternal_get_type(sldns_buffer *strbuf, char *token, size_t token_len, int *not_there, uint16_t *tp)
read type
Definition: str2wire.c:293
autr_point_data::retry_time
time_t retry_time
when to retry if failed
Definition: autotrust.h:113
module_qstate::reply
struct comm_reply * reply
comm_reply contains server replies
Definition: module.h:608
entry::match_question
uint8_t match_question
match question section
Definition: testpkts.h:178
infra_ip_ratelimit
int infra_ip_ratelimit
ratelimit value for client ip addresses, in queries per second.
Definition: infra.c:68
config_strlist::next
struct config_strlist * next
next item in list
Definition: config_file.h:723
newdata
static testdata_type * newdata(int val)
new data el
Definition: unitlruhash.c:71
mesh_area::max_forever_states
size_t max_forever_states
max forever number of reply states to have
Definition: mesh.h:109
ub_event_add_bits
void ub_event_add_bits(struct ub_event *ev, short bits)
Add event bits for this event to fire on.
Definition: ub_event.c:362
ub_thread_blocksigs
void ub_thread_blocksigs(void)
block all signals, masks them away.
Definition: locks.c:51
config_file::keep_missing
unsigned int keep_missing
autotrust keep_missing time, in seconds.
Definition: config_file.h:383
comm_point::cb_arg
void * cb_arg
argument to pass to callback.
Definition: netevent.h:315
delegpt_add_addr
int delegpt_add_addr(struct delegpt *dp, struct regional *region, struct sockaddr_storage *addr, socklen_t addrlen, uint8_t bogus, uint8_t lame, char *tls_auth_name, int *additions)
Add address to the delegation point.
Definition: iter_delegpt.c:184
sldns_wire2str_dname_buf
int sldns_wire2str_dname_buf(uint8_t *d, size_t dlen, char *s, size_t slen)
Convert wire dname to a string, "example.com.".
Definition: wire2str.c:311
lruhash::lru_start
struct lruhash_entry * lru_start
the lru list, start and end, noncyclical double linked list.
Definition: lruhash.h:171
worker_check_request
static int worker_check_request(sldns_buffer *pkt, struct worker *worker)
check request sanity.
Definition: worker.c:328
val_nsec_proves_no_ds
static enum sec_status val_nsec_proves_no_ds(struct ub_packed_rrset_key *nsec, struct query_info *qinfo)
For an NSEC that matches the DS queried for, check absence of DS type.
Definition: val_nsec.c:149
resp_addr::action
enum respip_action action
action for this address span
Definition: respip.h:43
mesh_area::mods
struct module_stack mods
active module stack
Definition: mesh.h:84
MINIMISE_ONE_LAB
#define MINIMISE_ONE_LAB
number of labels from QNAME that are always send individually when using QNAME minimisation,...
Definition: iterator.h:84
alloc_reg_release
void alloc_reg_release(struct alloc_cache *alloc, struct regional *r)
Put regional for query states back into alloc cache.
Definition: alloc.c:342
q_ans
struct for query and answer checks
Definition: unitauth.c:56
mesh_run
void mesh_run(struct mesh_area *mesh, struct mesh_state *mstate, enum module_ev ev, struct outbound_entry *e)
Run the mesh.
Definition: mesh.c:1668
service_callback
Callback to party interested in serviced query results.
Definition: outside_network.h:306
tcp_proxy::querylast
struct tcp_send_list * querylast
last in query list
Definition: delayer.c:132
serve_expired_lookup_func_type
struct dns_msg * serve_expired_lookup_func_type(struct module_qstate *qstate, struct query_info *lookup_qinfo)
Function called when looking for (expired) cached answers during the serve expired logic.
Definition: module.h:317
sldns_wire2str_nsap_scan
int sldns_wire2str_nsap_scan(uint8_t **d, size_t *dl, char **s, size_t *sl)
Scan wireformat NSAP field to string, with user buffers.
Definition: wire2str.c:1533
slabhash_gettable
struct lruhash * slabhash_gettable(struct slabhash *table, hashvalue_type hash)
Get lruhash table for a given hash value.
Definition: slabhash.c:179
query_info_hash
hashvalue_type query_info_hash(struct query_info *q, uint16_t flags)
calculate hash value of query_info, lowercases the qname, uses CD flag for AAAA qtype
Definition: msgreply.c:627
context_serialize_answer
uint8_t * context_serialize_answer(struct ctx_query *q, int err, sldns_buffer *pkt, uint32_t *len)
Serialize a context_query result to hand back to user.
Definition: context.c:296
trust_anchor::node
rbnode_type node
rbtree node, key is this structure
Definition: val_anchor.h:96
alloc_clear_special
void alloc_clear_special(struct alloc_cache *alloc)
Free the special alloced items.
Definition: alloc.c:146
delegpt_no_ipv6
void delegpt_no_ipv6(struct delegpt *dp)
Register the fact that there is no ipv6 and thus AAAAs are not going to be queried for or be useful.
Definition: iter_delegpt.c:510
dnscrypt_server_curve
static int dnscrypt_server_curve(const dnsccert *cert, uint8_t client_nonce[crypto_box_HALF_NONCEBYTES], uint8_t nmkey[crypto_box_BEFORENMBYTES], struct sldns_buffer *buffer, uint8_t udp, size_t max_udp_size)
Encrypt a reply using the dnsccert that was used with the query.
Definition: dnscrypt.c:461
auth_zone::zonefile
char * zonefile
zonefile name (or NULL for no zonefile)
Definition: authzone.h:121
worker::scratchpad
struct regional * scratchpad
thread scratch regional
Definition: worker.h:121
timehist_insert
void timehist_insert(struct timehist *hist, struct timeval *tv)
Add time value to histogram.
Definition: timehist.c:134
comm_point::comm_ssl_shake_none
@ comm_ssl_shake_none
no handshake, it has been done
Definition: netevent.h:196
libworker_alloc_cleanup
void libworker_alloc_cleanup(void *arg)
cleanup the cache to remove all rrset IDs from it, arg is libworker
Definition: libworker.c:846
name_tree_compare
int name_tree_compare(const void *k1, const void *k2)
compare name tree nodes
Definition: dnstree.c:47
nsec3_unknown_flags
static int nsec3_unknown_flags(struct ub_packed_rrset_key *rrset, int r)
return if nsec3 RR has unknown flags
Definition: val_nsec3.c:122
hints_lookup_root
struct delegpt * hints_lookup_root(struct iter_hints *hints, uint16_t qclass)
Find root hints for the given class.
Definition: iter_hints.c:460
ub_ctx::bg_tid
ub_thread_type bg_tid
tid of bg worker thread
Definition: context.h:91
ub_ctx_add_ta
int ub_ctx_add_ta(struct ub_ctx *ctx, const char *ta)
Add a trust anchor to the given context.
Definition: libunbound.c:390
views_delete
void views_delete(struct views *v)
Delete views storage.
Definition: view.c:93
sldns_str2wire_b32_ext_buf
int sldns_str2wire_b32_ext_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_B32_EXT from string to wireformat.
Definition: str2wire.c:1222
edns_known_option
Known edns option.
Definition: module.h:215
autr_ta
Autotrust metadata for one trust anchor key.
Definition: autotrust.h:67
rrset_cache_lookup
struct ub_packed_rrset_key * rrset_cache_lookup(struct rrset_cache *r, uint8_t *qname, size_t qnamelen, uint16_t qtype, uint16_t qclass, uint32_t flags, time_t timenow, int wr)
Lookup rrset.
Definition: rrset.c:275
tap_socket_close
static void tap_socket_close(struct tap_socket *s)
close the tap socket
Definition: unbound-dnstap-socket.c:171
BIT_Z
#define BIT_Z
Z flag.
Definition: net_help.h:61
config_file::local_zones
struct config_str2list * local_zones
local zones config
Definition: config_file.h:395
log_crypto_err
void log_crypto_err(const char *str)
Log libcrypto error with descriptive string.
Definition: net_help.c:834
auth_zones::rpz_lock
lock_rw_type rpz_lock
rw lock for rpz linked list, needed when iterating or editing linked list.
Definition: authzone.h:89
infra_key
Host information kept for every server, per zone.
Definition: infra.h:58
config_file::dnstap_log_client_response_messages
int dnstap_log_client_response_messages
true to log dnstap CLIENT_RESPONSE message events
Definition: config_file.h:516
xml_convertdate
static time_t xml_convertdate(const char *str)
XML convert DateTime element to time_t.
Definition: unbound-anchor.c:1303
daemon_remote_exec
void daemon_remote_exec(struct worker *worker)
Handle nonthreaded remote cmd execution.
Definition: remote.c:3074
daemon_remote_clear
void daemon_remote_clear(struct daemon_remote *rc)
remote control state to clear up.
Definition: remote.c:231
http_moveover_buffer
static void http_moveover_buffer(sldns_buffer *buf)
move unread buffer to start and clear rest for putting the rest into it
Definition: netevent.c:1974
dstest_file
static void dstest_file(const char *fname)
verify DS matches DNSKEY from a file
Definition: unitverify.c:334
sldns_str2wire_hip_buf
int sldns_str2wire_hip_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_HIP from string to wireformat.
Definition: str2wire.c:2052
dnskey_get_pubkey
static void dnskey_get_pubkey(struct ub_packed_rrset_key *k, size_t idx, unsigned char **pk, unsigned int *pklen)
get public key rdata field from a dnskey RR and do some checks
Definition: val_sigcrypt.c:190
key_entry_hash
void key_entry_hash(struct key_entry_key *kk)
calculate hash for key entry
Definition: val_kentry.c:102
ub_ctx_create_ub_event
struct ub_ctx * ub_ctx_create_ub_event(struct ub_event_base *base)
Create a resolving and validation context.
Definition: libunbound.c:197
donotq_delete
void donotq_delete(struct iter_donotq *dq)
Delete donotqueryaddresses structure.
Definition: iter_donotq.c:67
tcl_list_insert
static struct tcl_addr * tcl_list_insert(struct tcl_list *tcl, struct sockaddr_storage *addr, socklen_t addrlen, int net, uint32_t limit, int complain_duplicates)
insert new address into tcl_list structure
Definition: tcp_conn_limit.c:87
local_rrset::rrset
struct ub_packed_rrset_key * rrset
RRset data item.
Definition: localzone.h:184
apply_edns_options
int apply_edns_options(struct edns_data *edns_out, struct edns_data *edns_in, struct config_file *cfg, struct comm_point *c, struct regional *region)
Apply common EDNS options.
Definition: edns.c:75
inplace_cb_edns_back_parsed_func_type
int inplace_cb_edns_back_parsed_func_type(struct module_qstate *qstate, int id, void *cb_args)
Inplace callback function called after parsing edns on query reply.
Definition: module.h:294
bin_split
void bin_split(struct lruhash *table, struct lruhash_bin *newa, int newmask)
Split hash bin into two new ones.
Definition: lruhash.c:117
sldns_wire2str_edns_ul_print
int sldns_wire2str_edns_ul_print(char **s, size_t *sl, uint8_t *data, size_t len)
Print EDNS UL option data to string.
Definition: wire2str.c:1782
sldns_strip_ws
char * sldns_strip_ws(char *line)
Strip whitespace from the start and the end of line.
Definition: str2wire.c:849
tcp_req_open_item::mesh_state
struct mesh_state * mesh_state
the mesh state
Definition: listen_dnsport.h:284
inplace_cb_delete
void inplace_cb_delete(struct module_env *env, enum inplace_cb_list_type type, int id)
Delete callback for specified type and module id.
Definition: module.c:157
sldns_str2wire_nsap_buf
int sldns_str2wire_nsap_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_NSAP from string to wireformat.
Definition: str2wire.c:1785
autr_read_file
int autr_read_file(struct val_anchors *anchors, const char *nm)
Read autotrust file.
Definition: autotrust.c:985
fptr_whitelist_modenv_detect_cycle
int fptr_whitelist_modenv_detect_cycle(int(*fptr)(struct module_qstate *qstate, struct query_info *qinfo, uint16_t flags, int prime, int valrec))
Check function pointer whitelist for module_env detect_cycle callback values.
Definition: fptr_wlist.c:380
create_tmp_file
static char * create_tmp_file(const char *s)
create temp file, return (malloced) name string, write contents to it
Definition: unitauth.c:480
msg_parse::ancount
uint16_t ancount
count of RRs, host format
Definition: msgparse.h:103
UB_STATS_RPZ_ACTION_NUM
#define UB_STATS_RPZ_ACTION_NUM
number of RPZ actions
Definition: unbound.h:660
module_env::key_cache
struct key_cache * key_cache
shared key cache
Definition: module.h:335
outside_network::tcp_wait_first
struct waiting_tcp * tcp_wait_first
list of tcp queries waiting for a buffer
Definition: outside_network.h:160
ub_event_base_free
void ub_event_base_free(struct ub_event_base *base)
Free event base.
Definition: ub_event.c:263
val_handle
static void val_handle(struct module_qstate *qstate, struct val_qstate *vq, struct val_env *ve, int id)
Handle validator state.
Definition: validator.c:2447
create_unbound_context
static struct ub_ctx * create_unbound_context(const char *res_conf, const char *root_hints, const char *debugconf, const char *srcaddr, int ip4only, int ip6only)
Create a new unbound context with the commandline settings applied.
Definition: unbound-anchor.c:279
query_info::qname_len
size_t qname_len
length of qname (including last 0 octet)
Definition: msgreply.h:77
mesh_new_client
void mesh_new_client(struct mesh_area *mesh, struct query_info *qinfo, struct respip_client_info *cinfo, uint16_t qflags, struct edns_data *edns, struct comm_reply *rep, uint16_t qid)
New query incoming from clients.
Definition: mesh.c:453
slabhash_gettable
struct lruhash * slabhash_gettable(struct slabhash *sl, hashvalue_type hash)
Get lruhash table for a given hash value.
Definition: slabhash.c:179
ub_ctx_data_remove
int ub_ctx_data_remove(struct ub_ctx *ctx, const char *data)
Remove localdata from the library local authority info.
Definition: libunbound.c:1362
worker::err_limit_time
time_t err_limit_time
ratelimit for errors, time value
Definition: worker.h:108
serviced_query::addrlen
socklen_t addrlen
length of addr field in use.
Definition: outside_network.h:349
service_main
static void service_main(DWORD argc, LPTSTR *argv)
The main function for the service.
Definition: win_svc.c:405
pending_list_delete
static void pending_list_delete(struct replay_runtime *runtime, struct fake_pending *pend)
Remove the item from the pending list.
Definition: fake_event.c:292
lru_front
void lru_front(struct lruhash *table, struct lruhash_entry *entry)
Put entry at front of lru.
Definition: lruhash.c:266
inplace_cb_reply_servfail_call
int inplace_cb_reply_servfail_call(struct module_env *env, struct query_info *qinfo, struct module_qstate *qstate, struct reply_info *rep, int rcode, struct edns_data *edns, struct comm_reply *repinfo, struct regional *region)
Call the registered functions in the inplace_cb_reply linked list.
Definition: msgreply.c:1086
comm_point::comm_tcp_accept
@ comm_tcp_accept
TCP accept socket - only creates handlers if readable.
Definition: netevent.h:229
local_zones_delete
void local_zones_delete(struct local_zones *zones)
Delete local zones storage.
Definition: localzone.c:82
addredge::parent_node
struct addrnode * parent_node
Parent node this ege is connected to.
Definition: addrtree.h:116
delegpt_find_ns
struct delegpt_ns * delegpt_find_ns(struct delegpt *dp, uint8_t *name, size_t namelen)
Find NS record in name list of delegation point.
Definition: iter_delegpt.c:132
count_chunks
static size_t count_chunks(struct regional *r)
reasonably slow, but stats and get_mem are not supposed to be fast count the number of chunks in use
Definition: regional.c:190
delegpt_addr::next_target
struct delegpt_addr * next_target
next delegation point in all targets list
Definition: iter_delegpt.h:138
receive_bytes
static ssize_t receive_bytes(struct dt_io_thread *dtio, void *buf, size_t len)
Receive bytes from dtio->fd, store in buffer.
Definition: dtstream.c:888
mesh_new_callback
int mesh_new_callback(struct mesh_area *mesh, struct query_info *qinfo, uint16_t qflags, struct edns_data *edns, sldns_buffer *buf, uint16_t qid, mesh_cb_func_type cb, void *cb_arg)
New query with callback.
Definition: mesh.c:598
subnetmod_operate
void subnetmod_operate(struct module_qstate *qstate, enum module_ev event, int id, struct outbound_entry *outbound)
subnet module operate on a query
print_result
static void print_result(struct lookinfo *info)
print result from lookup nicely
Definition: asynclook.c:115
worker_stop_accept
void worker_stop_accept(void *arg)
stop accept callback handler
Definition: worker.c:2043
delegpt_ns::got4
uint8_t got4
if the ipv4 address is in the delegpt, 0=not, 1=yes 2=negative, negative means it was done,...
Definition: iter_delegpt.h:111
comm_point_listen_for_rw
void comm_point_listen_for_rw(struct comm_point *c, int rd, int wr)
Stop listening and start listening again for reading or writing.
Definition: netevent.c:3249
worker_cmd_remote
@ worker_cmd_remote
execute remote control command
Definition: worker.h:75
nsec3_prove_nods
enum sec_status nsec3_prove_nods(struct module_env *env, struct val_env *ve, struct ub_packed_rrset_key **list, size_t num, struct query_info *qinfo, struct key_entry_key *kkey, char **reason, struct module_qstate *qstate)
Prove that a DS response either had no DS, or wasn't a delegation point.
Definition: val_nsec3.c:1317
priv_get_mem
size_t priv_get_mem(struct iter_priv *priv)
Get memory used by priv structure.
Definition: iter_priv.c:204
autr_ta::rr_len
size_t rr_len
length of rr
Definition: autotrust.h:73
main
int main(int argc, char *argv[])
main program
Definition: signit.c:273
sldns_b32_pton_extended_hex
int sldns_b32_pton_extended_hex(const char *src, size_t src_sz, uint8_t *dst, size_t dst_sz)
This function we get from ldns-compat or from base system it returns the number of data bytes stored ...
Definition: parseutil.c:601
dynlibmod_env::inplace_cb_delete_wrapped
inplace_cb_delete_wrapped_t inplace_cb_delete_wrapped
Wrapped inplace callback functions to circumvent callback whitelisting.
Definition: dynlibmod.h:132
query_info_clear
void query_info_clear(struct query_info *m)
clear out query info structure
Definition: msgreply.c:591
config_file::dnstap_tls_cert_bundle
char * dnstap_tls_cert_bundle
dnstap server cert bundle
Definition: config_file.h:495
infra_find_ip_ratedata
static struct lruhash_entry * infra_find_ip_ratedata(struct infra_cache *infra, struct comm_reply *repinfo, int wr)
find data item in array for ip addresses
Definition: infra.c:813
comm_point::comm_http
@ comm_http
HTTP handler socket.
Definition: netevent.h:233
xfr_transfer_start_list
static void xfr_transfer_start_list(struct auth_xfer *xfr, struct auth_master *spec)
start the iteration of the task_transfer list of masters
Definition: authzone.c:3813
az_find_ce
static int az_find_ce(struct auth_zone *z, struct query_info *qinfo, struct auth_data *node, int node_exact, struct auth_data **ce, struct auth_rrset **rrset)
Find the closest encloser, an name that exists and is above the qname.
Definition: authzone.c:2239
log_py_err
static void log_py_err(void)
log python error
Definition: pythonmod.c:122
fd_close
static void fd_close(int fd)
close the fd
Definition: unbound-anchor.c:715
daemon::listen_sslctx
void * listen_sslctx
ssl context for listening to dnstcp over ssl, and connecting ssl
Definition: daemon.h:99
delegpt_add_unused_targets
void delegpt_add_unused_targets(struct delegpt *dp)
Add all usable targets to the result list.
Definition: iter_delegpt.c:304
config_file::aggressive_nsec
int aggressive_nsec
use cached NSEC records to synthesise (negative) answers
Definition: config_file.h:362
sldns_str2wire_int8_buf
int sldns_str2wire_int8_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_INT8 from string to wireformat.
Definition: str2wire.c:1019
auth_xfer::name
uint8_t * name
zone name, in uncompressed wireformat
Definition: authzone.h:207
context_lookup_new_query
struct ctx_query * context_lookup_new_query(struct ub_ctx *ctx, uint8_t *p, uint32_t len)
Lookup query from new_query buffer.
Definition: context.c:278
query_info_parse
int query_info_parse(struct query_info *m, struct sldns_buffer *query)
Parse wire query into a queryinfo structure, return 0 on parse error.
Definition: msgreply.c:546
iter_prepend
static int iter_prepend(struct iter_qstate *iq, struct dns_msg *msg, struct regional *region)
prepend the prepend list in the answer and authority section of dns_msg
Definition: iterator.c:397
response_type_from_server
enum response_type response_type_from_server(int rdset, struct dns_msg *msg, struct query_info *request, struct delegpt *dp)
Classifies a response message (from the wire) based on the current request.
Definition: iter_resptype.c:107
fptr_whitelist_inplace_cb_edns_back_parsed
int fptr_whitelist_inplace_cb_edns_back_parsed(inplace_cb_edns_back_parsed_func_type *fptr)
Check function pointer whitelist for inplace_cb_edns_back_parsed func values.
Definition: fptr_wlist.c:648
sldns_wire2str_a_scan
int sldns_wire2str_a_scan(uint8_t **d, size_t *dl, char **s, size_t *sl)
Scan wireformat ip4 A field to string, with user buffers.
Definition: wire2str.c:1091
worker_start_accept
void worker_start_accept(void *arg)
start accept callback handler
Definition: worker.c:2035
delegpt::usable_list
struct delegpt_addr * usable_list
the list of usable targets; subset of target_list the items in this list are not part of the result l...
Definition: iter_delegpt.h:71
mesh_detach_subs
void mesh_detach_subs(struct module_qstate *qstate)
Detach-subqueries.
Definition: mesh.c:974
auth_transfer::cp
struct comm_point * cp
the transfer (TCP) to the master.
Definition: authzone.h:415
auth_xfer::task_transfer
struct auth_transfer * task_transfer
Task for transfer.
Definition: authzone.h:227
autr_probe_timer
time_t autr_probe_timer(struct module_env *env)
Process probe timer.
Definition: autotrust.c:2426
config_str2list
List of two strings for config options.
Definition: config_file.h:731
comm_point_http_handle_write
static int comm_point_http_handle_write(int fd, struct comm_point *c)
Handle http writing callback.
Definition: netevent.c:2392
ipsecmod_domain_is_whitelisted
int ipsecmod_domain_is_whitelisted(struct ipsecmod_env *ie, uint8_t *dname, size_t dname_len, uint16_t qclass)
See if a domain is whitelisted.
log_warn
void log_warn(const char *format,...)
implementation of log_warn
Definition: log.c:328
comm_point::tcp_do_close
int tcp_do_close
if set, the connection is closed on error, on timeout, and after read/write completes.
Definition: netevent.h:248
val_anchors
Trust anchor store.
Definition: val_anchor.h:60
libworker_dobg
static void * libworker_dobg(void *arg)
the background thread func
Definition: libworker.c:335
libworker_fg
int libworker_fg(struct ub_ctx *ctx, struct ctx_query *q)
Create a foreground worker.
Definition: libworker.c:584
entry
data structure to keep the canned queries in.
Definition: testpkts.h:166
autr_point_data::query_interval
time_t query_interval
when to query if !failed
Definition: autotrust.h:111
optind
int optind
getopt global, in case header files fail to declare it.
key_entry_copy_toregion
struct key_entry_key * key_entry_copy_toregion(struct key_entry_key *kkey, struct regional *region)
Copy a key entry, to be region-allocated.
Definition: val_kentry.c:111
local_zone
Local zone.
Definition: localzone.h:118
ub_resolve_free
void ub_resolve_free(struct ub_result *result)
Free storage associated with a result structure.
Definition: libunbound.c:870
sldns_str2wire_hex_buf
int sldns_str2wire_hex_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_HEX from string to wireformat.
Definition: str2wire.c:1248
local_zones::ztree
rbtree_type ztree
rbtree of struct local_zone
Definition: localzone.h:112
dname_canonical_compare
int dname_canonical_compare(uint8_t *d1, uint8_t *d2)
Canonical dname compare.
Definition: dname.c:864
OUTBOUND_MSG_RETRY
#define OUTBOUND_MSG_RETRY
number of retries on outgoing queries
Definition: iterator.h:98
processQueryTargets
static int processQueryTargets(struct module_qstate *qstate, struct iter_qstate *iq, struct iter_env *ie, int id)
This is the request event state where the request will be sent to one of its current query targets.
Definition: iterator.c:2148
cfg_strbytelist_insert
int cfg_strbytelist_insert(struct config_strbytelist **head, char *item, uint8_t *i2, size_t i2len)
Insert string into strbytelist.
Definition: config_file.c:1790
context_release_alloc
void context_release_alloc(struct ub_ctx *ctx, struct alloc_cache *alloc, int locking)
Release an alloc.
Definition: context.c:206
module_qstate::is_valrec
int is_valrec
if this is a validation recursion query that does not get validation itself
Definition: module.h:605
forwards_create
struct iter_forwards * forwards_create(void)
Create forwards.
Definition: iter_fwd.c:68
optarg
char * optarg
getopt global, in case header files fail to declare it.
reply_info::authoritative
uint8_t authoritative
This flag informs unbound the answer is authoritative and the AA flag should be preserved.
Definition: msgreply.h:133
module_qstate::ext_state
enum module_ext_state ext_state[MAX_MODULE]
module states
Definition: module.h:625
macro_store_create
rbtree_type * macro_store_create(void)
Create variable storage.
Definition: replay.c:564
outnet_tcp_connect
int outnet_tcp_connect(int s, struct sockaddr_storage *addr, socklen_t addrlen)
connect tcp connection to addr, 0 on failure
Definition: outside_network.c:270
chunk_rrlist_get_current
static int chunk_rrlist_get_current(struct auth_chunk *rr_chunk, int rr_num, size_t rr_pos, uint8_t **rr_dname, uint16_t *rr_type, uint16_t *rr_class, uint32_t *rr_ttl, uint16_t *rr_rdlen, uint8_t **rr_rdata, size_t *rr_nextpos)
RR iterator, get current RR information, false on parse error.
Definition: authzone.c:4473
do_stats
static void do_stats(RES *ssl, struct worker *worker, int reset)
do the stats command
Definition: remote.c:1094
parse_create_msg
int parse_create_msg(struct sldns_buffer *pkt, struct msg_parse *msg, struct alloc_cache *alloc, struct query_info *qinf, struct reply_info **rep, struct regional *region)
Allocate and decompress parsed message and rrsets.
Definition: msgreply.c:441
sldns_wire2str_rrquestion_scan
int sldns_wire2str_rrquestion_scan(uint8_t **d, size_t *dlen, char **s, size_t *slen, uint8_t *pkt, size_t pktlen, int *comprloop)
Scan wireformat question rr to string, with user buffers.
Definition: wire2str.c:523
ub_ctx_debugout
int ub_ctx_debugout(struct ub_ctx *ctx, void *out)
Set debug output (and error output) to the specified stream.
Definition: libunbound.c:475
delegpt_add_addr_mlc
int delegpt_add_addr_mlc(struct delegpt *dp, struct sockaddr_storage *addr, socklen_t addrlen, uint8_t bogus, uint8_t lame, char *tls_auth_name)
add an address to a malloced delegation point.
Definition: iter_delegpt.c:609
comm_point::ssl_shake_state
enum comm_point::@7 ssl_shake_state
handshake state for init and renegotiate
replay_range::next_range
struct replay_range * next_range
next in list of time ranges.
Definition: replay.h:260
sldns_b64_pton_calculate_size
size_t sldns_b64_pton_calculate_size(size_t srcsize)
calculates the size needed to store the result of sldns_b64_pton
Definition: parseutil.c:672
comm_point_send_reply
void comm_point_send_reply(struct comm_reply *repinfo)
Send reply.
Definition: fake_event.c:996
LDNS_RDF_TYPE_INT8
@ LDNS_RDF_TYPE_INT8
8 bits
Definition: rrdef.h:270
mesh_area::use_response_ip
int use_response_ip
If we need to use response ip (value passed from daemon)
Definition: mesh.h:153
sldns_wire2str_hip_scan
int sldns_wire2str_hip_scan(uint8_t **d, size_t *dl, char **s, size_t *sl)
Scan wireformat HIP (algo, HIT, pubkey) field to string, with user buffers.
Definition: wire2str.c:1603
negverbose
static int negverbose
verbose unit test for negative cache
Definition: unitneg.c:51
auth_packed_rrset_copy_region
static struct ub_packed_rrset_key * auth_packed_rrset_copy_region(struct auth_zone *z, struct auth_data *node, struct auth_rrset *rrset, struct regional *region, time_t adjust)
Copy rrset into region from domain-datanode and packet rrset.
Definition: authzone.c:168
sldns_wire2str_pkt_scan
int sldns_wire2str_pkt_scan(uint8_t **d, size_t *dlen, char **s, size_t *slen)
Scan wireformat packet to a string representation with user buffer It appends every RR with default c...
Definition: wire2str.c:367
sldns_b64_ntop_calculate_size
size_t sldns_b64_ntop_calculate_size(size_t srcsize)
calculates the size needed to store the result of b64_ntop
Definition: parseutil.c:607
perfinfo::destlen
socklen_t destlen
length of dest socket addr
Definition: perf.c:86
worker_delete
void worker_delete(struct worker *worker)
Delete worker.
Definition: worker.c:1953
packed_rrset_find_rr
int packed_rrset_find_rr(struct packed_rrset_data *d, uint8_t *rdata, size_t len, size_t *index)
Find RR index in packed rrset Raw comparison, does not canonicalize RDATA.
Definition: packed_rrset.c:392
iter_qstate::an_prepend_last
struct iter_prep_list * an_prepend_last
Last element of the prepend list.
Definition: iterator.h:259
config_view::local_zones
struct config_str2list * local_zones
local zones
Definition: config_file.h:700
MSG_GENERIC_INFO
#define MSG_GENERIC_INFO
from gen_msg.h - informational message record for windows message log
Definition: win_svc.h:57
main
int main(int argc, const char *argv[])
main program
Definition: memstats.c:243
worker_work
void worker_work(struct worker *worker)
Make worker work.
Definition: worker.c:1947
redis_backend
struct cachedb_backend redis_backend
the redis backend definition, contains callable functions and name string
auth_master_new
static struct auth_master * auth_master_new(struct auth_master ***list)
create new auth_master structure
Definition: authzone.c:6788
comm_base_timept
void comm_base_timept(struct comm_base *b, time_t **tt, struct timeval **tv)
Obtain two pointers.
Definition: fake_event.c:945
scrub_sanitize
static int scrub_sanitize(sldns_buffer *pkt, struct msg_parse *msg, struct query_info *qinfo, uint8_t *zonename, struct module_env *env, struct iter_env *ie)
Given a response event, remove suspect RRsets from the response.
Definition: iter_scrub.c:685
daemon_remote::accept_list
struct listen_list * accept_list
commpoints for accepting remote control connections
Definition: remote.h:93
set_auth_name_on_ssl
int set_auth_name_on_ssl(void *ssl, char *auth_name, int use_sni)
set the authname on an SSL structure, SSL* ssl
Definition: net_help.c:1263
edns_opt_list_remove
int edns_opt_list_remove(struct edns_option **list, uint16_t code)
Remove any option found on the edns option list that matches the code.
Definition: msgreply.c:1003
sldns_wire2str_edns_n3u_print
int sldns_wire2str_edns_n3u_print(char **str, size_t *str_len, uint8_t *option_data, size_t option_len)
Print EDNS N3U option data to string.
Definition: wire2str.c:1847
config_file::infra_cache_slabs
size_t infra_cache_slabs
number of slabs in the infra host cache
Definition: config_file.h:164
subnetmod_get_mem
size_t subnetmod_get_mem(struct module_env *env, int id)
subnet module alloc size routine
worker.h
print_remainder_hex
static int print_remainder_hex(const char *pref, uint8_t **d, size_t *dlen, char **s, size_t *slen)
print remainder of buffer in hex format with prefixed text
Definition: wire2str.c:356
msgparse_hashtable_lookup
struct rrset_parse * msgparse_hashtable_lookup(struct msg_parse *msg, sldns_buffer *pkt, hashvalue_type h, uint32_t rrset_flags, uint8_t *dname, size_t dnamelen, uint16_t type, uint16_t dclass)
Lookup in msg hashtable to find a rrset.
Definition: msgparse.c:221
worker_init
int worker_init(struct worker *worker, struct config_file *cfg, struct listen_port *ports, int do_sigs)
Initialize worker.
Definition: worker.c:1741
reply_info::serve_expired_ttl
time_t serve_expired_ttl
Reply TTL extended with serve expired TTL, to limit time to serve expired message.
Definition: msgreply.h:163
fptr_whitelist_mod_get_mem
int fptr_whitelist_mod_get_mem(size_t(*fptr)(struct module_env *env, int id))
Check function pointer whitelist for module get_mem call values.
Definition: fptr_wlist.c:532
listen_type_ssl
@ listen_type_ssl
ssl over tcp type
Definition: listen_dnsport.h:91
fptr_whitelist_alloc_cleanup
int fptr_whitelist_alloc_cleanup(void(*fptr)(void *))
Check function pointer whitelist for alloc clear on id overflow call values.
Definition: fptr_wlist.c:560
TCP_MAX_REQ_SIMULTANEOUS
#define TCP_MAX_REQ_SIMULTANEOUS
number of simultaneous requests a client can have
Definition: listen_dnsport.c:77
log_thread_get
int log_thread_get(void)
Get the thread id from logging system.
Definition: log.c:172
module_qstate::was_ratelimited
int was_ratelimited
whether the query (or a subquery) was ratelimited
Definition: module.h:652
tcl_addr_lookup
struct tcl_addr * tcl_addr_lookup(struct tcl_list *tcl, struct sockaddr_storage *addr, socklen_t addrlen)
Lookup address to see its TCP connection limit structure.
Definition: tcp_conn_limit.c:182
acl_list_delete
void acl_list_delete(struct acl_list *acl)
Delete acl structure.
Definition: acl_list.c:67
autr_ta_create
static struct autr_ta * autr_ta_create(uint8_t *rr, size_t rr_len, size_t dname_len)
create ta
Definition: autotrust.c:317
parse_ip_addr
static int parse_ip_addr(char *str, int port, struct sockaddr_storage *ret, socklen_t *l)
parse a text IP address into a sockaddr
Definition: petal.c:98
packed_rrset_data::rr_ttl
time_t * rr_ttl
ttl of every rr.
Definition: packed_rrset.h:250
auth_data::rrsets
struct auth_rrset * rrsets
the data rrsets, with different types, linked list.
Definition: authzone.h:165
val_new_getmsg
static struct val_qstate * val_new_getmsg(struct module_qstate *qstate, struct val_qstate *vq)
fill in message structure
Definition: validator.c:214
auth_zone
Auth zone.
Definition: authzone.h:96
sldns_wire2str_class_scan
int sldns_wire2str_class_scan(uint8_t **data, size_t *data_len, char **str, size_t *str_len)
Scan wireformat rr class to string, with user buffers.
Definition: wire2str.c:910
val_dlv_init
static int val_dlv_init(struct module_qstate *qstate, struct val_qstate *vq, struct val_env *ve, int id)
Init DLV check.
Definition: validator.c:2009
unittest_wrapper_addrtree_cmpbit
int unittest_wrapper_addrtree_cmpbit(const addrkey_t *key1, const addrkey_t *key2, addrlen_t n)
Wrappers for static functions to unit test.
Definition: addrtree.c:517
nsec3_hash_matches_owner
static int nsec3_hash_matches_owner(struct nsec3_filter *flt, struct nsec3_cached_hash *hash, struct ub_packed_rrset_key *s)
Compare a hashed name with the owner name of an NSEC3 RRset.
Definition: val_nsec3.c:703
dname_test_pkt_dname_len
static void dname_test_pkt_dname_len(sldns_buffer *buff)
test pkt_dname_len
Definition: unitdname.c:166
infra_data::ttl
time_t ttl
TTL value for this entry.
Definition: infra.h:77
config_file::tls_win_cert
int tls_win_cert
should the system certificate store get added to the cert bundle
Definition: config_file.h:122
pythonmod_inform_super
void pythonmod_inform_super(struct module_qstate *qstate, int id, struct module_qstate *super)
python module
Definition: pythonmod.c:476
outbound_list_insert
void outbound_list_insert(struct outbound_list *list, struct outbound_entry *e)
Insert new entry into the list.
Definition: outbound_list.c:68
stream_wait_max
size_t stream_wait_max
size (in bytes) of stream wait buffers max
Definition: config_file.c:80
reply_info_sortref
void reply_info_sortref(struct reply_info *rep)
Sorts the ref array.
Definition: msgreply.c:507
find_create_proxy
static struct proxy * find_create_proxy(struct sockaddr_storage *from, socklen_t from_len, fd_set *rorig, int *max, struct proxy **proxies, int serv_ip6, struct timeval *now, struct timeval *reuse_timeout)
find or else create proxy for this remote client
Definition: delayer.c:442
config_file::local_zones_disable_default
int local_zones_disable_default
do not add any default local zone
Definition: config_file.h:403
libworker::sslctx
void * sslctx
sslcontext for SSL wrapped DNS over TCP queries
Definition: libworker.h:90
config_file::infra_cache_numhosts
size_t infra_cache_numhosts
max number of hosts in the infra cache
Definition: config_file.h:166
processFinished
static int processFinished(struct module_qstate *qstate, struct iter_qstate *iq, int id)
This handles the final state for first-tier responses (i.e., responses to externally generated querie...
Definition: iterator.c:3517
processClassResponse
static void processClassResponse(struct module_qstate *qstate, int id, struct module_qstate *forq)
Process response for qclass=ANY queries for a particular class.
Definition: iterator.c:3357
fptr_whitelist_mod_inform_super
int fptr_whitelist_mod_inform_super(void(*fptr)(struct module_qstate *qstate, int id, struct module_qstate *super))
Check function pointer whitelist for module inform_super call values.
Definition: fptr_wlist.c:474
lz_exists
static int lz_exists(struct local_zones *zones, const char *name)
lookup a zone in rbtree; exact match only; SLOW due to parse
Definition: localzone.c:716
module_env::scratch_buffer
struct sldns_buffer * scratch_buffer
buffer for temporary usage.
Definition: module.h:467
config_file::dnscrypt_nonce_cache_size
size_t dnscrypt_nonce_cache_size
memory size in bytes for dnscrypt nonces cache
Definition: config_file.h:576
local_zones_create
struct local_zones * local_zones_create(void)
Create local zones storage.
Definition: localzone.c:60
worker_stop_accept
void worker_stop_accept(void *arg)
stop accept callback handler
Definition: worker.c:2043
nsec3_hash_to_b32
size_t nsec3_hash_to_b32(uint8_t *hash, size_t hashlen, uint8_t *zone, size_t zonelen, uint8_t *buf, size_t max)
Convert hash into base32 encoding and with the zone name appended.
Definition: val_nsec3.c:250
ub_packed_rrset_key::rk
struct packed_rrset_key rk
key data: dname, type and class
Definition: packed_rrset.h:124
module_qstate::region
struct regional * region
region for this query.
Definition: module.h:618
iter_qstate::dp_target_count
int dp_target_count
number of target lookups per delegation point.
Definition: iterator.h:319
perfinfo::qlist_len
size_t * qlist_len
list of query packets (length of a packet)
Definition: perf.c:125
xfr_transfer_disown
static void xfr_transfer_disown(struct auth_xfer *xfr)
disown task_transfer.
Definition: authzone.c:5049
sldns_wire2str_tag_scan
int sldns_wire2str_tag_scan(uint8_t **d, size_t *dl, char **s, size_t *sl)
Scan wireformat TAG field to string, with user buffers.
Definition: wire2str.c:1691
worker::cmd_com
struct comm_point * cmd_com
commpoint to listen to commands.
Definition: worker.h:104
sldns_wire2str_tsigtime_scan
int sldns_wire2str_tsigtime_scan(uint8_t **d, size_t *dl, char **s, size_t *sl)
Scan wireformat tsigtime field to string, with user buffers.
Definition: wire2str.c:1067
dtio_cmd_cb
void dtio_cmd_cb(int fd, short ATTR_UNUSED(bits), void *arg)
callback for the dnstap commandpipe, to stop the dnstap IO
Definition: dtstream.c:1473
ub_ctx::event_base_malloced
int event_base_malloced
true if the event_base is a pluggable base that is malloced with a user event base inside,...
Definition: context.h:124
query_info_compare
int query_info_compare(void *m1, void *m2)
Compare two queryinfo structures, on query and type, class.
Definition: msgreply.c:575
key_entry_deldatafunc
void key_entry_deldatafunc(void *data, void *userarg)
function for lruhash operation
tap_socket_setup
static int tap_socket_setup(struct tap_socket *s, struct ub_event_base *base)
setup socket on event base
Definition: unbound-dnstap-socket.c:338
ub_get_event_sys
void ub_get_event_sys(struct ub_event_base *base, const char **n, const char **s, const char **m)
Return the name, system and method for the pluggable event base.
Definition: ub_event.c:167
local_zone_nodefault
@ local_zone_nodefault
remove default AS112 blocking contents for zone nodefault is used in config not during service.
Definition: localzone.h:82
ds_key_algo_is_supported
int ds_key_algo_is_supported(struct ub_packed_rrset_key *ds_rrset, size_t ds_idx)
See if DS key algorithm is supported.
Definition: val_sigcrypt.c:366
FSTRM_CONTROL_FRAME_ACCEPT
#define FSTRM_CONTROL_FRAME_ACCEPT
control frame value to denote the control frame ACCEPT
Definition: dnstap_fstrm.h:100
algo_needs_num_missing
size_t algo_needs_num_missing(struct algo_needs *n)
See how many algorithms are missing (not bogus or secure, but not processed)
Definition: val_sigcrypt.c:466
auth_transfer::chunks_last
struct auth_chunk * chunks_last
last element in chunks list (to append new data at the end)
Definition: authzone.h:367
daemon::listening_port
int listening_port
port number that has ports opened.
Definition: daemon.h:84
rrset_parse::section
sldns_pkt_section section
which section was it found in: one of LDNS_SECTION_ANSWER, LDNS_SECTION_AUTHORITY,...
Definition: msgparse.h:151
local_zones
Authoritative local zones storage, shared.
Definition: localzone.h:108
service_stop_event
static WSAEVENT service_stop_event
global service stop event
Definition: win_svc.c:62
UB_NOMEM
@ UB_NOMEM
alloc failure
Definition: context.h:189
do_list_local_data
static void do_list_local_data(RES *ssl, struct worker *worker, struct local_zones *zones)
do the list_local_data command
Definition: remote.c:2713
reply_packet::next
struct reply_packet * next
next in list of reply packets, for TCP multiple pkts on wire
Definition: testpkts.h:151
lookup_reg_str
static char * lookup_reg_str(const char *key, const char *name)
Obtain registry string (if it exists).
Definition: win_svc.c:159
canonicalize_rdata
static void canonicalize_rdata(sldns_buffer *buf, struct ub_packed_rrset_key *rrset, size_t len)
Canonicalize Rdata in buffer.
Definition: val_sigcrypt.c:959
UB_SERVFAIL
@ UB_SERVFAIL
DNS service failed.
Definition: context.h:193
sldns_str2wire_class_buf
int sldns_str2wire_class_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_CLASS from string to wireformat.
Definition: str2wire.c:1352
infra_update_tcp_works
void infra_update_tcp_works(struct infra_cache *infra, struct sockaddr_storage *addr, socklen_t addrlen, uint8_t *nm, size_t nmlen)
Update information for the host, store that a TCP transaction works.
Definition: infra.c:544
domain_limit_data::node
struct name_tree_node node
key for rbtree, must be first in struct, name of domain
Definition: infra.h:133
sldns_buffer_position
INLINE size_t sldns_buffer_position(sldns_buffer *buffer)
returns the current position in the buffer (as a number of bytes)
Definition: sbuffer.h:233
reply_info_encode
int reply_info_encode(struct query_info *qinfo, struct reply_info *rep, uint16_t id, uint16_t flags, sldns_buffer *buffer, time_t timenow, struct regional *region, uint16_t udpsize, int dnssec, int minimise)
Regenerate the wireformat from the stored msg reply.
Definition: msgencode.c:667
serviced_create
static struct serviced_query * serviced_create(struct outside_network *outnet, sldns_buffer *buff, int dnssec, int want_dnssec, int nocaps, int tcp_upstream, int ssl_upstream, char *tls_auth_name, struct sockaddr_storage *addr, socklen_t addrlen, uint8_t *zone, size_t zonelen, int qtype, struct edns_option *opt_list)
Create new serviced entry.
Definition: outside_network.c:1418
MAX_ID_RETRY
#define MAX_ID_RETRY
number of times to retry making a random ID that is unique.
Definition: outside_network.c:76
fptr_whitelist_modenv_add_sub
int fptr_whitelist_modenv_add_sub(int(*fptr)(struct module_qstate *qstate, struct query_info *qinfo, uint16_t qflags, int prime, int valrec, struct module_qstate **newq, struct mesh_state **sub))
Check function pointer whitelist for module_env add_sub callback values.
Definition: fptr_wlist.c:363
comm_point::dtenv
struct dt_env * dtenv
the dnstap environment
Definition: netevent.h:222
pending::node
rbnode_type node
redblacktree entry, key is the pending struct(id, addr).
Definition: outside_network.h:219
setup_tcp_list
static void setup_tcp_list(struct main_tap_data *maindata, struct config_strlist_head *tcp_list)
setup tcp accept sockets
Definition: unbound-dnstap-socket.c:1170
iter_handle
static void iter_handle(struct module_qstate *qstate, struct iter_qstate *iq, struct iter_env *ie, int id)
Handle iterator state.
Definition: iterator.c:3616
libworker::thread_num
int thread_num
every worker has a unique thread_num.
Definition: libworker.h:70
rbtree_init
void rbtree_init(rbtree_type *rbtree, int(*cmpf)(const void *, const void *))
Init a new tree (malloced by caller) with given key compare function.
Definition: rbtree.c:95
views_apply_cfg
int views_apply_cfg(struct views *v, struct config_file *cfg)
Apply config settings; Takes care of locking.
Definition: view.c:144
sldns_rr_descriptor_maximum
size_t sldns_rr_descriptor_maximum(const sldns_rr_descriptor *descriptor)
returns the maximum number of rdata fields of the rr type this descriptor describes.
Definition: rrdef.c:660
pending::timeout
int timeout
timeout in msec
Definition: outside_network.h:245
local_zones_del_zone
void local_zones_del_zone(struct local_zones *zones, struct local_zone *zone)
Delete a zone.
Definition: localzone.c:1866
dnskey_verify_rrset_sig
enum sec_status dnskey_verify_rrset_sig(struct regional *region, sldns_buffer *buf, struct val_env *ve, time_t now, struct ub_packed_rrset_key *rrset, struct ub_packed_rrset_key *dnskey, size_t dnskey_idx, size_t sig_idx, struct rbtree_type **sortree, int *buf_canon, char **reason, sldns_pkt_section section, struct module_qstate *qstate)
verify rrset, with specific dnskey(from set), for a specific rrsig
Definition: val_sigcrypt.c:1376
key_entry_create_rrset
struct key_entry_key * key_entry_create_rrset(struct regional *region, uint8_t *name, size_t namelen, uint16_t dclass, struct ub_packed_rrset_key *rrset, uint8_t *sigalg, time_t now)
Create a key entry from an rrset, in the given region.
Definition: val_kentry.c:296
rpz_remove_rr
void rpz_remove_rr(struct rpz *r, size_t aznamelen, uint8_t *dname, size_t dnamelen, uint16_t rr_type, uint16_t rr_class, uint8_t *rdatawl, size_t rdatalen)
Delete policy matching RR, used for IXFR.
Definition: rpz.c:884
tcl_list_str_cfg
static int tcl_list_str_cfg(struct tcl_list *tcl, const char *str, const char *s2, int complain_duplicates)
apply tcl_list string
Definition: tcp_conn_limit.c:106
write_out
static int write_out(FILE *out, const char *str, size_t len)
write buffer to file and check return codes
Definition: authzone.c:1629
sldns_wirerr_get_class
uint16_t sldns_wirerr_get_class(uint8_t *rr, size_t len, size_t dname_len)
Get the class of the RR.
Definition: str2wire.c:805
nsec3_has_optout
int nsec3_has_optout(struct ub_packed_rrset_key *rrset, int r)
return if nsec3 RR has the optout flag
Definition: val_nsec3.c:133
NUMTHR
#define NUMTHR
number of threads to make in extended test
Definition: asynclook.c:168
rpz_delete
void rpz_delete(struct rpz *r)
Delete RPZ.
Definition: rpz.c:300
rrset_cache_adjust
struct rrset_cache * rrset_cache_adjust(struct rrset_cache *r, struct config_file *cfg, struct alloc_cache *alloc)
Adjust settings of the cache to settings from the config file.
Definition: rrset.c:81
zerottls
static void zerottls(uint8_t *pkt, size_t pktlen)
zero TTLs in packet
Definition: testpkts.c:889
addr_is_ip6
int addr_is_ip6(struct sockaddr_storage *addr, socklen_t len)
Checkout address family.
Definition: net_help.c:668
dtio_setup_base
static void dtio_setup_base(struct dt_io_thread *dtio, time_t *secs, struct timeval *now)
setup the event base for the dnstap io thread
Definition: dtstream.c:1524
infra_key::zonename
uint8_t * zonename
zone name in wireformat
Definition: infra.h:64
handle_cname_response
static int handle_cname_response(struct module_qstate *qstate, struct iter_qstate *iq, struct dns_msg *msg, uint8_t **mname, size_t *mname_len)
Given a CNAME response (defined as a response containing a CNAME or DNAME that does not answer the re...
Definition: iterator.c:539
generate_ns_check
static void generate_ns_check(struct module_qstate *qstate, struct iter_qstate *iq, int id)
Generate a NS check request to obtain authoritative information on an NS rrset.
Definition: iterator.c:1077
HASH_DEFAULT_MAXMEM
#define HASH_DEFAULT_MAXMEM
default max memory for hash arrays
Definition: lruhash.h:116
lruhash_sizefunc_type
size_t(* lruhash_sizefunc_type)(void *, void *)
Type of function that calculates the size of an entry.
Definition: lruhash.h:127
sldns_wire2str_hex_scan
int sldns_wire2str_hex_scan(uint8_t **data, size_t *data_len, char **str, size_t *str_len)
Scan wireformat hex field to string, with user buffers.
Definition: wire2str.c:1248
comm_point::do_not_close
int do_not_close
if set the connection is NOT closed on delete.
Definition: netevent.h:244
netblockdnametoaddr
int netblockdnametoaddr(uint8_t *dname, size_t dnamelen, struct sockaddr_storage *addr, socklen_t *addrlen, int *net, int *af)
RPZ format netblock to network byte order address and netblock example RPZ netblock format dnames:
Definition: net_help.c:396
local_zone::name
uint8_t * name
zone name, in uncompressed wireformat
Definition: localzone.h:125
sldns_wire2str_time_scan
int sldns_wire2str_time_scan(uint8_t **d, size_t *dl, char **s, size_t *sl)
Scan wireformat time field to string, with user buffers.
Definition: wire2str.c:1347
config_file::local_data
struct config_strlist * local_data
local data RRs configured
Definition: config_file.h:405
dnskey_calc_keytag
uint16_t dnskey_calc_keytag(struct ub_packed_rrset_key *dnskey_rrset, size_t dnskey_idx)
Get dnskey keytag, footprint value.
Definition: val_sigcrypt.c:373
perf_tv_smaller
static int perf_tv_smaller(struct timeval *t1, struct timeval *t2)
timeval compare, t1 < t2
Definition: perf.c:161
msg_ttl
static void msg_ttl(struct dns_msg *msg)
fix up msg->rep TTL and prefetch ttl
Definition: authzone.c:185
dynlibmod_env::fname
const char * fname
Dynamic library filename.
Definition: dynlibmod.h:116
algo_needs_init_dnskey_add
void algo_needs_init_dnskey_add(struct algo_needs *n, struct ub_packed_rrset_key *dnskey, uint8_t *sigalg)
Initialize algo needs structure, set algos from rrset as needed.
Definition: val_sigcrypt.c:389
delegpt_ns
Nameservers for a delegation point.
Definition: iter_delegpt.h:95
auth_transfer::scan_target
struct auth_master * scan_target
scan tries all the upstream masters.
Definition: authzone.h:382
config_file::acl_tags
struct config_strbytelist * acl_tags
list of aclname, tagbitlist
Definition: config_file.h:415
ub_ctx_finalize
static int ub_ctx_finalize(struct ub_ctx *ctx)
finalize the context, if not already finalized
Definition: libunbound.c:1262
fake_commpoint::cb_arg
void * cb_arg
the callback userarg, stored for usage
Definition: fake_event.c:86
print_stats
static int print_stats(RES *ssl, const char *nm, struct ub_stats_info *s)
print stats from statinfo
Definition: remote.c:709
alloc_cache::cleanup_arg
void * cleanup_arg
user arg for cleanup
Definition: alloc.h:90
dname_test_topdomain
static void dname_test_topdomain(void)
Test dname_get_shared_topdomain.
Definition: unitdname.c:731
S_STRLIST
#define S_STRLIST(str, var)
put string into strlist
Definition: config_file.c:424
lruhash_bin::lock
lock_quick_type lock
Lock for exclusive access to the linked list This lock makes deletion of items safe in this overflow ...
Definition: lruhash.h:191
outside_network::num_ip4
int num_ip4
number of outgoing IP4 interfaces
Definition: outside_network.h:113
iter_qstate::referral_count
int referral_count
the number of times this query as followed a referral.
Definition: iterator.h:307
dt_msg_queue
A message buffer with dnstap messages queued up.
Definition: dtstream.h:59
fptr_whitelist_modenv_send_query
int fptr_whitelist_modenv_send_query(struct outbound_entry *(*fptr)(struct query_info *qinfo, uint16_t flags, int dnssec, int want_dnssec, int nocaps, struct sockaddr_storage *addr, socklen_t addrlen, uint8_t *zone, size_t zonelen, int ssl_upstream, char *tls_auth_name, struct module_qstate *q))
whitelist env->send_query callbacks
Definition: fptr_wlist.c:334
nsec3_filter
Filter conditions for NSEC3 proof Used to iterate over the applicable NSEC3 RRs.
Definition: val_nsec3.c:97
tcp_req_info_add_meshstate
int tcp_req_info_add_meshstate(struct tcp_req_info *req, struct mesh_area *mesh, struct mesh_state *m)
Add mesh state to the tcp req list of open requests.
Definition: listen_dnsport.c:1855
module_env::worker
struct worker * worker
internal data for daemon - worker thread.
Definition: module.h:469
module_qstate::errinf
struct config_strlist * errinf
failure reason information if val-log-level is high
Definition: module.h:620
autr_global_delete
void autr_global_delete(struct autr_global_data *global)
Delete global 5011 data structure.
Definition: autotrust.c:84
config_file::unblock_lan_zones
int unblock_lan_zones
unblock lan zones (reverse lookups for AS112 zones)
Definition: config_file.h:409
infra_ip_ratelimit
int infra_ip_ratelimit
ip ratelimit, 0 is off
Definition: infra.c:68
delegpt_addr::next_result
struct delegpt_addr * next_result
next delegation point in results
Definition: iter_delegpt.h:134
service_cron
static struct comm_timer * service_cron
the cron callback
Definition: win_svc.c:72
replay_scenario::range_list
struct replay_range * range_list
List of matching answers.
Definition: replay.h:171
config_file::use_systemd
int use_systemd
Use systemd socket activation.
Definition: config_file.h:457
val_dsset_isusable
int val_dsset_isusable(struct ub_packed_rrset_key *ds_rrset)
Determine if DS rrset is usable for validator or not.
Definition: val_utils.c:724
module_qstate::edns_opts_back_in
struct edns_option * edns_opts_back_in
incoming edns options from the back end
Definition: module.h:642
PACKED_RRSET_NSEC_AT_APEX
#define PACKED_RRSET_NSEC_AT_APEX
this rrset is NSEC and is at zone apex (at child side of zonecut)
Definition: packed_rrset.h:53
sldns_buffer_free
void sldns_buffer_free(sldns_buffer *buffer)
frees the buffer.
Definition: sbuffer.c:138
outbound_entry::qstate
struct module_qstate * qstate
the module query state that sent it
Definition: outbound_list.h:69
subnet_qstate
Definition: subnetmod.h:76
zone_del_rrset
static void zone_del_rrset(struct lruhash_entry *e, void *arg)
callback to delete rrsets in a zone
Definition: remote.c:1685
RETVAL_OK
#define RETVAL_OK
return code that means all is peachy keen.
Definition: msgencode.c:64
sldns_calc_keytag_raw
uint16_t sldns_calc_keytag_raw(uint8_t *key, size_t keysize)
Calculates keytag of DNSSEC key, operates on wireformat rdata.
Definition: keyraw.c:106
process_request
static void process_request(struct module_qstate *qstate, struct iter_qstate *iq, struct iter_env *ie, int id)
This is the primary entry point for processing request events.
Definition: iterator.c:3669
ub_stats_info::mesh_num_reply_states
long long mesh_num_reply_states
mesh stats: current number of reply (user) states
Definition: unbound.h:808
ub_server_stats::qclass
long long qclass[UB_STATS_QCLASS_NUM]
qclass stats
Definition: unbound.h:689
advance_moment
static void advance_moment(struct replay_runtime *runtime)
Advance to the next moment.
Definition: fake_event.c:723
auth_zones
Authoritative zones, shared.
Definition: authzone.h:72
ub_stats_info::mesh_replies_sent
long long mesh_replies_sent
mesh stats: replies sent
Definition: unbound.h:814
sldns_str2wire_int16_buf
int sldns_str2wire_int16_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_INT16 from string to wireformat.
Definition: str2wire.c:1032
dt_io_list_item::next
struct dt_io_list_item * next
next in the list of buffers to inspect
Definition: dtstream.h:229
xfr_masterlist_free_addrs
static void xfr_masterlist_free_addrs(struct auth_master *list)
delete the looked up auth_addrs for all the masters in the list
Definition: authzone.c:3652
server_stats_insrcode
void server_stats_insrcode(struct ub_server_stats *stats, sldns_buffer *buf)
Add rcode for this query.
Definition: stats.c:514
execute_cmd
static void execute_cmd(struct daemon_remote *rc, RES *ssl, char *cmd, struct worker *worker)
execute a remote control command
Definition: remote.c:2896
redis.h
RTT_MIN_TIMEOUT
int RTT_MIN_TIMEOUT
min retransmit timeout value, in milliseconds
Definition: rtt.c:47
DTIO_COMMAND_STOP
@ DTIO_COMMAND_STOP
DTIO command channel stop.
Definition: dtstream.c:79
rrset_trust_sec_noglue
@ rrset_trust_sec_noglue
Data from a zone transfer, other than glue.
Definition: packed_rrset.h:162
addrtree::first
struct addrnode * first
first node in LRU list, first candidate to go
Definition: addrtree.h:86
codeline::free
uint64_t free
number of bytes freed
Definition: memstats.c:62
synth_dname_msg
static struct dns_msg * synth_dname_msg(struct ub_packed_rrset_key *rrset, struct regional *region, time_t now, struct query_info *q, enum sec_status *sec_status)
synthesize DNAME+CNAME response from cached DNAME item
Definition: dns.c:643
iter_mark_cycle_targets
void iter_mark_cycle_targets(struct module_qstate *qstate, struct delegpt *dp)
Mark targets that result in a dependency cycle as done, so they will not get selected as targets.
Definition: iter_utils.c:694
ub_ctx::log_out
FILE * log_out
what logfile to use instead
Definition: context.h:100
trust_anchor::dclass
uint16_t dclass
class of the trust anchor
Definition: val_anchor.h:122
dt_io_thread_register_queue
int dt_io_thread_register_queue(struct dt_io_thread *dtio, struct dt_msg_queue *mq)
Register a msg queue to the io thread.
Definition: dtstream.c:369
local_zones_tags_lookup
struct local_zone * local_zones_tags_lookup(struct local_zones *zones, uint8_t *name, size_t len, int labs, uint16_t dclass, uint16_t dtype, uint8_t *taglist, size_t taglen, int ignoretags)
Lookup zone that contains the given name, class and taglist.
Definition: localzone.c:1095
ce_response::nc_rr
int nc_rr
NSEC3 record that proved nc.
Definition: val_nsec3.c:90
setup_ssl
static SSL * setup_ssl(int s, SSL_CTX *ctx)
setup SSL connection to the client
Definition: petal.c:301
infra_key::namelen
size_t namelen
length of zonename
Definition: infra.h:66
val_env::kcache
struct key_cache * kcache
key cache; these are validated keys.
Definition: validator.h:83
MAX_NEG_TTL
time_t MAX_NEG_TTL
MAX Negative TTL, for SOA records in authority section.
Definition: msgreply.c:63
MAX_MINIMISE_COUNT
#define MAX_MINIMISE_COUNT
max number of QNAME minimisation iterations.
Definition: iterator.h:76
SERVE_EXPIRED_TTL
time_t SERVE_EXPIRED_TTL
Time to serve records after expiration.
Definition: msgreply.c:67
fptr_whitelist_mod_deinit
int fptr_whitelist_mod_deinit(void(*fptr)(struct module_env *env, int id))
Check function pointer whitelist for module deinit call values.
Definition: fptr_wlist.c:417
timeval_divide
static void timeval_divide(struct timeval *avg, const struct timeval *sum, size_t d)
divide sum of timers to get average
Definition: mesh.c:98
sldns_enum_edns_option
sldns_enum_edns_option
EDNS option codes.
Definition: rrdef.h:419
respip_operate
void respip_operate(struct module_qstate *qstate, enum module_ev event, int id, struct outbound_entry *outbound)
response-ip operate on a query
Definition: respip.c:1077
replay_range::end_step
int end_step
end step of time range.
Definition: replay.h:250
rrset_id_type
uint64_t rrset_id_type
type used to uniquely identify rrsets.
Definition: packed_rrset.h:46
lruhash_delete
void lruhash_delete(struct lruhash *table)
Delete hash table.
Definition: lruhash.c:153
pythonmod_clear
void pythonmod_clear(struct module_qstate *qstate, int id)
python module cleanup query state
Definition: pythonmod.c:549
val_env::nsec3_keyiter_count
int nsec3_keyiter_count
Number of entries in the NSEC3 maximum iteration count table.
Definition: validator.h:107
mainthr
PyThreadState * mainthr
Python main thread.
Definition: pythonmod.c:74
config_file::dnscrypt_secret_key
struct config_strlist * dnscrypt_secret_key
dnscrypt secret keys 1.key
Definition: config_file.h:564
qlist_parse_line
static int qlist_parse_line(sldns_buffer *buf, char *p)
parse a query line to a packet into buffer
Definition: perf.c:464
delegpt_add_target
int delegpt_add_target(struct delegpt *dp, struct regional *regional, uint8_t *name, size_t namelen, struct sockaddr_storage *addr, socklen_t addrlen, uint8_t bogus, uint8_t lame, int *additions)
Add target address to the delegation point.
Definition: iter_delegpt.c:162
module_func_block::clear
void(* clear)(struct module_qstate *qstate, int id)
clear module specific data
Definition: module.h:730
rrset_add_rr
static int rrset_add_rr(struct auth_rrset *rrset, uint32_t rr_ttl, uint8_t *rdata, size_t rdatalen, int insert_sig)
add RR to existing RRset.
Definition: authzone.c:790
del_info
Local info for deletion functions.
Definition: remote.c:1597
mesh_area::ans_bogus
size_t ans_bogus
(extended stats) bogus replies
Definition: mesh.h:126
respip_set_create
struct respip_set * respip_set_create(void)
Create response IP set.
Definition: respip.c:57
module_env::modinfo
void * modinfo[MAX_MODULE]
module specific data.
Definition: module.h:511
add_open
static int add_open(const char *ip, int nr, struct listen_port **list, int noproto_is_err, struct config_file *cfg)
Add and open a new control port.
Definition: remote.c:273
regional_free_all
void regional_free_all(struct regional *r)
Free all memory associated with regional.
Definition: regional.c:96
addredge::len
addrlen_t len
length in bits of str
Definition: addrtree.h:112
sldns_rr_descriptor_minimum
size_t sldns_rr_descriptor_minimum(const sldns_rr_descriptor *descriptor)
returns the minimum number of rdata fields of the rr type this descriptor describes.
Definition: rrdef.c:650
ALIGN_UP
#define ALIGN_UP(x, s)
increase size until it fits alignment of s bytes
Definition: regional.c:51
slabhash_test
void slabhash_test(void)
unit test slabhashtable implementation
Definition: unitslabhash.c:359
auth_xfer::notify_received
int notify_received
a notify was received, but a zone transfer or probe was already acted on.
Definition: authzone.h:237
libworker_create_event
struct libworker * libworker_create_event(struct ub_ctx *ctx, struct ub_event_base *eb)
create worker for event-based interface.
Definition: libworker.c:266
pending_tcp::next_free
struct pending_tcp * next_free
next in list of free tcp comm points, or NULL.
Definition: outside_network.h:257
port_if::inuse
int inuse
number of commpoints (and thus also ports) in use
Definition: outside_network.h:193
stream_wait_count
static size_t stream_wait_count
size (in bytes) of stream wait buffers
Definition: listen_dnsport.c:84
read_acl_list
static int read_acl_list(struct acl_list *acl, struct config_file *cfg)
read acl_list config
Definition: acl_list.c:333
worker_handle_service_reply
int worker_handle_service_reply(struct comm_point *c, void *arg, int error, struct comm_reply *reply_info)
process incoming serviced query replies from the network
Definition: worker.c:271
delegpt_create_mlc
struct delegpt * delegpt_create_mlc(uint8_t *name)
create malloced delegation point, with the given name
Definition: iter_delegpt.c:530
serviced_query::qbuf
uint8_t * qbuf
The query that needs to be answered.
Definition: outside_network.h:332
do_view_zone_remove
static void do_view_zone_remove(RES *ssl, struct worker *worker, char *arg)
Remove a zone from view.
Definition: remote.c:1416
signal_handling_playback
static void signal_handling_playback(struct worker *wrk)
Replay old signals.
Definition: daemon.c:181
pkt_hash_rrset_rest
static hashvalue_type pkt_hash_rrset_rest(hashvalue_type dname_h, uint16_t type, uint16_t dclass, uint32_t rrset_flags)
create a rrset hash from a partial dname hash
Definition: msgparse.c:194
hash_set_raninit
void hash_set_raninit(uint32_t v)
Set the randomisation initial value, set this before threads start, and before hashing stuff (because...
Definition: lookup3.c:76
ub_ctx::mods
struct module_stack mods
module stack
Definition: context.h:114
read_root_hints_list
static int read_root_hints_list(struct iter_hints *hints, struct config_file *cfg)
read root hints list
Definition: iter_hints.c:412
del_info::num_keys
size_t num_keys
number of key entries removed
Definition: remote.c:1613
record_sigh
static RETSIGTYPE record_sigh(int sig)
used when no other sighandling happens, so we don't die when multiple signals in quick succession are...
Definition: daemon.c:116
compress_tree_node::offset
size_t offset
offset in packet that points to this dname
Definition: msgencode.c:90
server_stats_add
void server_stats_add(struct ub_stats_info *total, struct ub_stats_info *a)
Addup stat blocks.
Definition: stats.c:396
regional_get_mem
size_t regional_get_mem(struct regional *r)
get total memory size in use by region
Definition: regional.c:230
nonce_cache_key::client_publickey
uint8_t client_publickey[crypto_box_PUBLICKEYBYTES]
the client public key
Definition: dnscrypt.c:70
O_YNO
#define O_YNO(opt, str, var)
compare and print yesno option
Definition: config_file.c:842
config_file::tcp_upstream
int tcp_upstream
tcp upstream queries (no UDP upstream queries)
Definition: config_file.h:97
waiting_tcp::tls_auth_name
char * tls_auth_name
ref to the tls_auth_name from the serviced_query
Definition: outside_network.h:300
query_info
Structure to store query information that makes answers to queries different.
Definition: msgreply.h:69
loc_parse_cm
static int loc_parse_cm(char *my_str, char **endstr, uint8_t *m, uint8_t *e)
read "<digits>[.<digits>][mM]" into mantissa exponent format for LOC type
Definition: str2wire.c:1491
port_if::pfxlen
int pfxlen
prefix length of network address (in bits), for randomisation.
Definition: outside_network.h:177
read_data_chunk
static char * read_data_chunk(SSL *ssl, size_t len)
read a data chunk
Definition: unbound-anchor.c:943
az_delete_deleted_zones
static void az_delete_deleted_zones(struct auth_zones *az)
find zones that are marked deleted and delete them.
Definition: authzone.c:1968
comm_point::http_is_chunked
int http_is_chunked
chunked transfer
Definition: netevent.h:214
module_env::now_tv
struct timeval * now_tv
time in microseconds.
Definition: module.h:483
local_data_answer
int local_data_answer(struct local_zone *z, struct module_env *env, struct query_info *qinfo, struct edns_data *edns, struct comm_reply *repinfo, sldns_buffer *buf, struct regional *temp, int labs, struct local_data **ldp, enum localzone_type lz_type, int tag, struct config_strlist **tag_datas, size_t tag_datas_size, char **tagname, int num_tags)
Get local data from local zone and encode answer.
Definition: localzone.c:1359
local_zone_cmp
int local_zone_cmp(const void *z1, const void *z2)
Compare two local_zone entries in rbtree.
Definition: localzone.c:105
daemon::mods
struct module_stack mods
stack of module callbacks
Definition: daemon.h:113
LDNS_SECTION_ANY_NOQUESTION
@ LDNS_SECTION_ANY_NOQUESTION
used to get all non-question rrs from a packet
Definition: pkthdr.h:124
local_zone_str2type
int local_zone_str2type(const char *type, enum localzone_type *t)
Parse the string into localzone type.
Definition: localzone.c:1771
iter_qstate::auth_zone_response
int auth_zone_response
True if the current response is from auth_zone.
Definition: iterator.h:406
msg_parse::qdcount
uint16_t qdcount
count of RRs, host format
Definition: msgparse.h:101
mod_get_mem
size_t mod_get_mem(struct module_env *env, const char *name)
fetch memory for a module by name, returns 0 if module not there
Definition: modstack.c:272
dns64.h
serviced_get_mem
size_t serviced_get_mem(struct serviced_query *sq)
Get memory size in use by serviced query while it is servicing callbacks.
Definition: outside_network.c:2536
IS_YES_OR_NO
#define IS_YES_OR_NO
check that the value passed is yes or no
Definition: config_file.c:394
connect_sslctx_create
void * connect_sslctx_create(char *key, char *pem, char *verifypem, int wincert)
create SSL connect context
Definition: net_help.c:1127
prime_root_key
static struct ub_result * prime_root_key(struct ub_ctx *ctx)
Prime the root key and return the result.
Definition: unbound-anchor.c:2104
sldns_str_vprint
int sldns_str_vprint(char **str, size_t *slen, const char *format, va_list args)
Print to string, move string along for next content.
Definition: wire2str.c:317
simpletest
static void simpletest(sldns_buffer *pkt, struct alloc_cache *alloc, sldns_buffer *out)
simple test of parsing
Definition: unitmsgparse.c:383
reply_info::an_numrrsets
size_t an_numrrsets
Number of RRsets in each section.
Definition: msgreply.h:176
service_deinit
static void service_deinit(struct daemon *daemon, struct config_file *cfg)
Deinit the service.
Definition: win_svc.c:387
nsec_has_type
int nsec_has_type(struct ub_packed_rrset_key *nsec, uint16_t type)
Check if type is present in the NSEC typemap.
Definition: val_nsec.c:97
traverse_postorder
void traverse_postorder(rbtree_type *tree, void(*func)(rbnode_type *, void *), void *arg)
Call function for all elements in the redblack tree, such that leaf elements are called before parent...
Definition: rbtree.c:622
dump_rrset_lruhash
static int dump_rrset_lruhash(RES *ssl, struct lruhash *h, time_t now)
dump lruhash rrset cache
Definition: cachedump.c:102
addr_tree_lookup
struct addr_tree_node * addr_tree_lookup(rbtree_type *tree, struct sockaddr_storage *addr, socklen_t addrlen)
Lookup closest encloser in addr tree.
Definition: dnstree.c:210
add_5011_probe_root
static void add_5011_probe_root(struct ub_ctx *ctx, const char *root_anchor_file)
add an autotrust anchor for the root to the context
Definition: unbound-anchor.c:2087
options_remote_is_address
int options_remote_is_address(struct config_file *cfg)
check if config for remote control turns on IP-address interface with certificates or a named pipe wi...
Definition: config_file.c:2499
addrnode::next
struct addrnode * next
next node in LRU list
Definition: addrtree.h:105
synth_cname_buf
static size_t synth_cname_buf(uint8_t *qname, size_t qname_len, size_t dname_len, uint8_t *dtarg, size_t dtarglen, uint8_t *buf, size_t buflen)
create synth cname target name in buffer, or fail if too long
Definition: authzone.c:2395
add_opts
static void add_opts(const char *args, int *pass_argc, char *pass_argv[])
Add options from string to passed argc.
Definition: testbound.c:116
outside_network::now_secs
time_t * now_secs
pointer to time in seconds
Definition: outside_network.h:74
reply_info::ttl
time_t ttl
TTL of the entire reply (for negative caching).
Definition: msgreply.h:151
load_msg_cache
static int load_msg_cache(RES *ssl, struct worker *worker)
load msg cache
Definition: cachedump.c:689
hints_add_stub
int hints_add_stub(struct iter_hints *hints, uint16_t c, struct delegpt *dp, int noprime)
Add stub to hints structure.
Definition: iter_hints.c:527
az_nsec3_find_exact
static struct auth_data * az_nsec3_find_exact(struct auth_zone *z, uint8_t *nm, size_t nmlen, int algo, size_t iter, uint8_t *salt, size_t saltlen)
Find exact match for hashed(nm, nmlen) NSEC3 record or NULL.
Definition: authzone.c:2733
priv_apply_cfg
int priv_apply_cfg(struct iter_priv *priv, struct config_file *cfg)
Process priv config.
Definition: iter_priv.c:147
rc_state
a busy control command connection, SSL state
Definition: remote.h:65
sldns_buffer_free
int void sldns_buffer_free(sldns_buffer *buffer)
frees the buffer.
Definition: sbuffer.c:138
test_slabhash_delkey
void test_slabhash_delkey(void *, void *)
test delkey for lruhash
libworker::env
struct module_env * env
copy of the module environment with worker local entries.
Definition: libworker.h:82
module_env::probe_timer
struct comm_timer * probe_timer
the 5011-probe timer (if any)
Definition: module.h:496
service_proxy
static void service_proxy(fd_set *rset, int retsock, struct proxy *proxies, sldns_buffer *pkt, struct timeval *now)
proxy return replies to clients
Definition: delayer.c:428
nsec3_find_closest_encloser
static int nsec3_find_closest_encloser(struct module_env *env, struct nsec3_filter *flt, rbtree_type *ct, struct query_info *qinfo, struct ce_response *ce)
findClosestEncloser Given a name and a list of NSEC3s, find the candidate closest encloser.
Definition: val_nsec3.c:875
ctx_query::cb_arg
void * cb_arg
for async query, the callback user arg
Definition: context.h:163
worker::cmd
struct tube * cmd
pipe, for commands for this worker
Definition: worker.h:90
proxy::next
struct proxy * next
next in proxylist
Definition: delayer.c:94
ssl_path_err
static void ssl_path_err(const char *s, const char *path)
exit with ssl error related to a file path
Definition: unbound-control.c:482
dname_subdomain_c
int dname_subdomain_c(uint8_t *d1, uint8_t *d2)
Counts labels.
Definition: dname.c:700
S_SIZET_OR_ZERO
#define S_SIZET_OR_ZERO(str, var)
put integer_or_zero into size_t
Definition: config_file.c:406
delete_replylist
void delete_replylist(struct reply_packet *replist)
delete the list of reply packets
Definition: testpkts.c:1698
update_events
static int update_events(struct module_env *env, struct val_env *ve, struct trust_anchor *tp, struct ub_packed_rrset_key *dnskey_rrset, int *changed)
Set update events.
Definition: autotrust.c:1614
sldns_wire2str_edns_dau_print
int sldns_wire2str_edns_dau_print(char **str, size_t *str_len, uint8_t *option_data, size_t option_len)
Print EDNS DAU option data to string.
Definition: wire2str.c:1817
ub_initstate
struct ub_randstate * ub_initstate(struct ub_randstate *from)
Initialize a random generator state for use.
config_delete
void config_delete(struct config_file *config)
Destroy the config file structure.
Definition: config_file.c:1421
libworker_fg
int libworker_fg(struct ub_ctx *ctx, struct ctx_query *q)
Create a foreground worker.
Definition: libworker.c:584
ub_ctx::num_async
size_t num_async
number of async queries outstanding
Definition: context.h:131
config_file::module_conf
char * module_conf
the module configuration string
Definition: config_file.h:324
fill_any
static struct dns_msg * fill_any(struct module_env *env, uint8_t *qname, size_t qnamelen, uint16_t qtype, uint16_t qclass, struct regional *region)
Fill TYPE_ANY response with some data from cache.
Definition: dns.c:736
print_stats_shm
static void print_stats_shm(const char *cfgfile)
print statistics from shm memory segment
Definition: unbound-control.c:431
key_cache_remove
void key_cache_remove(struct key_cache *kcache, uint8_t *name, size_t namelen, uint16_t key_class)
Remove an entry from the key cache.
Definition: val_kcache.c:162
name_tree_init_parents
void name_tree_init_parents(rbtree_type *tree)
Initialize parent pointers in name tree.
Definition: dnstree.c:140
primeResponseToKE
static struct key_entry_key * primeResponseToKE(struct ub_packed_rrset_key *dnskey_rrset, struct trust_anchor *ta, struct module_qstate *qstate, int id)
Evaluate the response to a priming request.
Definition: validator.c:2573
tcp_req_info_remove_mesh_state
void tcp_req_info_remove_mesh_state(struct tcp_req_info *req, struct mesh_state *m)
Remove mesh state entry from list in tcp_req_info.
Definition: listen_dnsport.c:1656
cfg_strbytelist_insert
int cfg_strbytelist_insert(struct config_strbytelist **head, char *item, uint8_t *i2, size_t i2len)
Insert string into strbytelist.
Definition: config_file.c:1790
az_nsec3_param
static int az_nsec3_param(struct auth_zone *z, int *algo, size_t *iter, uint8_t **salt, size_t *saltlen)
Find the NSEC3PARAM rrset (if any) and if true you have the parameters.
Definition: authzone.c:2583
auth_xfer_probe_timer_callback
void auth_xfer_probe_timer_callback(void *arg)
xfer probe timeout callback, part of task_probe
Definition: authzone.c:6122
config_file::ip_ratelimit_factor
int ip_ratelimit_factor
ip_ratelimit factor, 0 blocks all, 10 allows 1/10 of traffic
Definition: config_file.h:532
config_file::control_use_cert
int control_use_cert
if the use-cert option is set
Definition: config_file.h:438
autr_point_data
Autotrust metadata for a trust point.
Definition: autotrust.h:90
context_serialize_cancel
uint8_t * context_serialize_cancel(struct ctx_query *q, uint32_t *len)
Serialize a query cancellation.
Definition: context.c:375
stop_flush_info::stop_frame_len
size_t stop_frame_len
length of the stop frame
Definition: dtstream.c:1577
view.h
internal_base
Internal base structure, so that every thread has its own events.
Definition: netevent.c:114
auth_zone_cmp
int auth_zone_cmp(const void *z1, const void *z2)
compare auth_zones for sorted rbtree
Definition: authzone.c:307
infra_data::timeout_AAAA
uint8_t timeout_AAAA
timeouts counter for type AAAA
Definition: infra.h:104
iter_operate
void iter_operate(struct module_qstate *qstate, enum module_ev event, int id, struct outbound_entry *outbound)
iterator operate on a query
Definition: iterator.c:3867
auth_rrset_delete
static void auth_rrset_delete(struct auth_rrset *rrset)
delete auth rrset node
Definition: authzone.c:353
module_wait_module
@ module_wait_module
module is waiting for another module
Definition: module.h:539
comm_point::type
enum comm_point::comm_point_type type
variable with type of socket, UDP,TCP-accept,TCP,pipe
outnet_send_wait_udp
static void outnet_send_wait_udp(struct outside_network *outnet)
try to send waiting UDP queries
Definition: outside_network.c:511
auth_transfer::scan_specific
struct auth_master * scan_specific
once notified, or the timeout has been reached.
Definition: authzone.h:379
forwards_create
struct iter_forwards * forwards_create(void)
Create forwards.
Definition: iter_fwd.c:68
ub_event_set_fd
void ub_event_set_fd(struct ub_event *ev, int fd)
Change or set the file descriptor on the event.
Definition: ub_event.c:374
auth_nextprobe
The next probe task.
Definition: authzone.h:283
tap_socket_list_addevs
static int tap_socket_list_addevs(struct tap_socket_list *list, struct ub_event_base *base)
setup accept events
Definition: unbound-dnstap-socket.c:398
module_env::rrset_cache
struct rrset_cache * rrset_cache
shared rrset cache
Definition: module.h:331
log_query_info
void log_query_info(enum verbosity_value v, const char *str, struct query_info *qinf)
Print string with neat domain name, type, class from query info.
Definition: msgreply.c:883
acl_allow
@ acl_allow
allow full access for recursion (+RD) queries
Definition: acl_list.h:64
skip_to_special
static int skip_to_special(FILE *in, sldns_buffer *buf, int *line, int spec)
skip through file to { or ;
Definition: val_anchor.c:606
analyze_dname
static void analyze_dname(sldns_buffer *pkt)
analyze domain name in packet, possibly compressed
Definition: pktview.c:73
val_verify_DNSKEY_with_TA
enum sec_status val_verify_DNSKEY_with_TA(struct module_env *env, struct val_env *ve, struct ub_packed_rrset_key *dnskey_rrset, struct ub_packed_rrset_key *ta_ds, struct ub_packed_rrset_key *ta_dnskey, uint8_t *sigalg, char **reason, struct module_qstate *qstate)
Verify DNSKEYs with DS and DNSKEY rrset.
Definition: val_utils.c:585
LDNS_RR_CLASS_HS
@ LDNS_RR_CLASS_HS
Hesiod (Dyer 87)
Definition: rrdef.h:56
VAL_CLASS_UNKNOWN
@ VAL_CLASS_UNKNOWN
Not a recognized subtype.
Definition: val_utils.h:65
sldns_wire2str_cert_alg_scan
int sldns_wire2str_cert_alg_scan(uint8_t **data, size_t *data_len, char **str, size_t *str_len)
Scan wireformat cert_alg field to string, with user buffers.
Definition: wire2str.c:1320
dname_char_print
static int dname_char_print(char **s, size_t *slen, uint8_t c)
print and escape one character for a domain dname
Definition: wire2str.c:766
auth_zone::rpz
struct rpz * rpz
RPZ zones.
Definition: authzone.h:136
tap_socket::sslctx
SSL_CTX * sslctx
for a TLS socket, the tls context
Definition: unbound-dnstap-socket.c:157
auth_xfer::refresh
time_t refresh
refresh time (from SOA), time to wait with next_probe if everything is fine
Definition: authzone.h:262
comm_point_send_reply
void comm_point_send_reply(struct comm_reply *repinfo)
Send reply.
Definition: netevent.c:3135
delegpt_add_target_mlc
int delegpt_add_target_mlc(struct delegpt *dp, uint8_t *name, size_t namelen, struct sockaddr_storage *addr, socklen_t addrlen, uint8_t bogus, uint8_t lame)
Add target address to the delegation point.
Definition: iter_delegpt.c:649
daemon_cleanup
void daemon_cleanup(struct daemon *daemon)
Close off the worker thread information.
Definition: daemon.c:696
sldns_str2wire_atma_buf
int sldns_str2wire_atma_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_ATMA from string to wireformat.
Definition: str2wire.c:1819
dump_rrset_line
static int dump_rrset_line(RES *ssl, struct ub_packed_rrset_key *k, time_t now, size_t i)
dump one rrset zonefile line
Definition: cachedump.c:65
write_q
static void write_q(int fd, int udp, SSL *ssl, sldns_buffer *buf, uint16_t id, const char *strname, const char *strtype, const char *strclass)
write a query over the TCP fd
Definition: streamtcp.c:119
http_header_line
static char * http_header_line(sldns_buffer *buf)
return character string into buffer for header line, moves buffer past that line and puts zero termin...
Definition: netevent.c:1954
daemon_open_shared_ports
int daemon_open_shared_ports(struct daemon *daemon)
Open shared listening ports (if needed).
Definition: daemon.c:297
listen_list_delete
void listen_list_delete(struct listen_list *list)
delete listen_list of commpoints.
Definition: listen_dnsport.c:1411
decompress_rr_into_buffer
static int decompress_rr_into_buffer(struct sldns_buffer *buf, uint8_t *pkt, size_t pktlen, uint8_t *dname, uint16_t rr_type, uint16_t rr_class, uint32_t rr_ttl, uint8_t *rr_data, uint16_t rr_rdlen)
decompress an RR into the buffer where it'll be an uncompressed RR with uncompressed dname and uncomp...
Definition: authzone.c:1313
addrnode::prev
struct addrnode * prev
previous node in LRU list
Definition: addrtree.h:103
config_delstrlist
void config_delstrlist(struct config_strlist *p)
Delete items in config string list.
Definition: config_file.c:1284
testremove
static void testremove(struct slabhash *table, testdata_type *ref[])
test adding a random element
Definition: unitslabhash.c:121
dns_cache_prefetch_adjust
int dns_cache_prefetch_adjust(struct module_env *env, struct query_info *qinfo, time_t adjust, uint16_t flags)
Adjust the prefetch_ttl for a cached message.
Definition: dns.c:1025
config_file::disable_dnssec_lame_check
int disable_dnssec_lame_check
true to disable DNSSEC lameness check in iterator
Definition: config_file.h:523
pending_tcp::query
struct waiting_tcp * query
the query being serviced, NULL if the pending_tcp is unused.
Definition: outside_network.h:263
context_serialize_quit
uint8_t * context_serialize_quit(uint32_t *len)
Serialize a 'quit' command.
Definition: context.c:401
config_file::infra_cache_min_rtt
int infra_cache_min_rtt
min value for infra cache rtt
Definition: config_file.h:168
comm_signal_delete
void comm_signal_delete(struct comm_signal *comsig)
Delete the signal communication point.
Definition: fake_event.c:990
mesh_reply::qid
uint16_t qid
id of query, in network byteorder.
Definition: mesh.h:226
DTIO_RECONNECT_TIMEOUT_SLOW
#define DTIO_RECONNECT_TIMEOUT_SLOW
the msec to wait for reconnect slow, to stop busy spinning on reconnect
Definition: dtstream.c:70
xml_parse
static BIO * xml_parse(BIO *xml, time_t now)
Perform XML parsing of the root-anchors file Its format description can be read here https://data....
Definition: unbound-anchor.c:1599
MAX_NEG_TTL
time_t MAX_NEG_TTL
Maximum Negative TTL that is allowed.
Definition: msgreply.c:63
delegpt_addr::dnsseclame
uint8_t dnsseclame
if the address is dnsseclame, but this cannot be cached, this option is useful to mark the address dn...
Definition: iter_delegpt.h:156
config_file::server_key_file
char * server_key_file
private key file for server
Definition: config_file.h:442
do_dump_infra
static void do_dump_infra(RES *ssl, struct worker *worker)
do the dump_infra command
Definition: remote.c:2490
fptr_whitelist_comm_point
int fptr_whitelist_comm_point(comm_point_callback_type *fptr)
Check function pointer whitelist for comm_point callback values.
Definition: fptr_wlist.c:104
ub_stats_info::svr
struct ub_server_stats svr
the thread stats
Definition: unbound.h:803
context.h
regional_alloc_zero
void * regional_alloc_zero(struct regional *r, size_t size)
Allocate size bytes of memory inside regional that are initialized to 0.
Definition: regional.c:171
context_deserialize_cancel
struct ctx_query * context_deserialize_cancel(struct ub_ctx *ctx, uint8_t *p, uint32_t len)
Deserialize a cancel buffer.
Definition: context.c:388
neg_insert_data
void neg_insert_data(struct val_neg_cache *neg, struct val_neg_zone *zone, struct ub_packed_rrset_key *nsec)
Insert data into the data tree of a zone Does not do locking.
Definition: val_neg.c:748
proxy::addr
struct sockaddr_storage addr
remote address
Definition: delayer.c:82
config_file::dnstap_log_forwarder_response_messages
int dnstap_log_forwarder_response_messages
true to log dnstap FORWARDER_RESPONSE message events
Definition: config_file.h:520
replay_var::node
rbnode_type node
rbtree node.
Definition: replay.h:399
outside_network::now_tv
struct timeval * now_tv
pointer to time in microseconds
Definition: outside_network.h:76
delegpt::namelabs
int namelabs
number of labels in delegation point
Definition: iter_delegpt.h:63
alloc_cache::max_reg_blocks
size_t max_reg_blocks
how many regional blocks to keep back max
Definition: alloc.h:93
setup_and_run
static void setup_and_run(struct config_strlist_head *local_list, struct config_strlist_head *tcp_list, struct config_strlist_head *tls_list, char *server_key, char *server_cert, char *verifypem)
setup and run the server to listen to DNSTAP messages
Definition: unbound-dnstap-socket.c:1215
LDNS_RR_BUF_SIZE
#define LDNS_RR_BUF_SIZE
buffer to read an RR, cannot be larger than 64K because of packet size
Definition: str2wire.h:27
key_matches_a_ds
static int key_matches_a_ds(struct module_env *env, struct val_env *ve, struct ub_packed_rrset_key *dnskey_rrset, size_t key_idx, struct ub_packed_rrset_key *ds_rrset)
See if a DNSKEY is verified by one of the DSes.
Definition: autotrust.c:1570
auth_xfer::have_zone
int have_zone
do we have a zone (if 0, no zone data at all)
Definition: authzone.h:253
sldns_wire2str_eui48_scan
int sldns_wire2str_eui48_scan(uint8_t **data, size_t *data_len, char **str, size_t *str_len)
Scan wireformat EUI48 field to string, with user buffers.
Definition: wire2str.c:1666
UB_INITFAIL
@ UB_INITFAIL
initialization failed (bad settings)
Definition: context.h:199
sldns_hashes
struct sldns_struct_lookup_table * sldns_hashes
DS record hash algorithms.
Definition: wire2str.c:68
lruhash_bin::overflow_list
struct lruhash_entry * overflow_list
linked list of overflow entries
Definition: lruhash.h:193
dname_remove_labels
void dname_remove_labels(uint8_t **dname, size_t *len, int n)
Snip off first N labels from a dname, returning the parent zone.
Definition: dname.c:742
worker_handle_service_reply
int worker_handle_service_reply(struct comm_point *c, void *arg, int error, struct comm_reply *reply_info)
process incoming serviced query replies from the network
Definition: worker.c:271
expon_timeout_backoff
static void expon_timeout_backoff(struct replay_runtime *runtime)
perform exponential backoff on the timeout
Definition: fake_event.c:703
mesh_state_compare
int mesh_state_compare(const void *ap, const void *bp)
compare two mesh_states
Definition: mesh.c:196
nonce_cache_key
Definition: dnscrypt.c:64
setup_ssl
static SSL * setup_ssl(SSL_CTX *ctx, int fd)
setup SSL on the connection
Definition: unbound-control.c:627
logfile
static FILE * logfile
the file logged to.
Definition: log.c:66
get_file_size
static off_t get_file_size(const char *fname)
get size of file
Definition: memstats.c:179
type_rdata_compressable
static const sldns_rr_descriptor * type_rdata_compressable(struct ub_packed_rrset_key *key)
return true if type needs domain name compression in rdata
Definition: msgencode.c:356
tcpconnlimitchecks
static void tcpconnlimitchecks(struct config_file *cfg)
check tcp connection limit ips
Definition: unbound-checkconf.c:384
val_neg_zone::in_use
uint8_t in_use
if this element is in use, boolean
Definition: val_neg.h:128
local_zones_del_data
void local_zones_del_data(struct local_zones *zones, uint8_t *name, size_t len, int labs, uint16_t dclass)
Remove data from domain name in the tree.
Definition: localzone.c:1965
edns_option_is_known
struct edns_known_option * edns_option_is_known(uint16_t opt_code, struct module_env *env)
Check if an edns option is known.
Definition: module.c:184
send_ok
static void send_ok(RES *ssl)
send the OK to the control client
Definition: remote.c:671
spool_temp_file_name
static void spool_temp_file_name(int *lineno, FILE *cfg, char *id)
spool temp file name
Definition: testbound.c:157
auth_transfer::id
uint16_t id
dns id of AXFR query
Definition: authzone.h:412
auth_xfer_del
static void auth_xfer_del(rbnode_type *n, void *ATTR_UNUSED(arg))
helper traverse to delete xfer zones
Definition: authzone.c:2118
dns64_apply_cfg
static int dns64_apply_cfg(struct dns64_env *dns64_env, struct config_file *cfg)
This function applies the configuration found in the parsed configuration file cfg to this instance o...
Definition: dns64.c:363
listen_port
Single linked list to store shared ports that have been opened for use by all threads.
Definition: listen_dnsport.h:105
iter_env::donotq
struct iter_donotq * donotq
A set of inetaddrs that should never be queried.
Definition: iterator.h:117
forwards_get_mem
size_t forwards_get_mem(struct iter_forwards *fwd)
Get memory in use by forward storage.
Definition: iter_fwd.c:447
xml_endelem
static void xml_endelem(void *userData, const XML_Char *name)
XML end of element.
Definition: unbound-anchor.c:1518
pending::next_waiting
struct pending * next_waiting
next in waiting list.
Definition: outside_network.h:243
comm_point::tcp_free
struct comm_point * tcp_free
linked list of free tcp_handlers to use for new queries.
Definition: netevent.h:188
listen_cp_insert
static int listen_cp_insert(struct comm_point *c, struct listen_dnsport *front)
Add items to commpoint list in front.
Definition: listen_dnsport.c:1312
config_file::logfile
char * logfile
filename to log to.
Definition: config_file.h:291
lz_enter_zone_dname
static struct local_zone * lz_enter_zone_dname(struct local_zones *zones, uint8_t *nm, size_t len, int labs, enum localzone_type t, uint16_t c)
enter a new zone with allocated dname returns with WRlock
Definition: localzone.c:173
context_deserialize_answer
struct ctx_query * context_deserialize_answer(struct ub_ctx *ctx, uint8_t *p, uint32_t len, int *err)
Deserialize an answer buffer.
Definition: context.c:332
rrsig_rdata_get_type_covered
static uint16_t rrsig_rdata_get_type_covered(uint8_t *rdata, size_t rdatalen)
get rrsig type covered from rdata.
Definition: authzone.c:718
do_macro_variable
static char * do_macro_variable(rbtree_type *store, char *buf, size_t remain)
do macro variable
Definition: replay.c:657
create_synth_cname
static int create_synth_cname(uint8_t *qname, size_t qname_len, struct regional *region, struct auth_data *node, struct auth_rrset *dname, uint16_t dclass, struct ub_packed_rrset_key **cname)
create synthetic CNAME rrset for in a DNAME answer in region, false on alloc failure,...
Definition: authzone.c:2413
sldns_algorithms
struct sldns_struct_lookup_table * sldns_algorithms
Taken from RFC 2535, section 7.
Definition: wire2str.c:58
server_stats_querymiss
void server_stats_querymiss(struct ub_server_stats *stats, struct worker *worker)
add query if it missed the cache
Definition: stats.c:93
module_qstate::return_rcode
int return_rcode
the rcode, in case of error, instead of a reply message
Definition: module.h:612
serviced_query::last_rtt
int last_rtt
rtt of last message
Definition: outside_network.h:384
local_data_find_tag_action
enum localzone_type local_data_find_tag_action(const uint8_t *taglist, size_t taglen, const uint8_t *taglist2, size_t taglen2, const uint8_t *tagactions, size_t tagactionssize, enum localzone_type lzt, int *tag, char *const *tagname, int num_tags)
See if two sets of tag lists (in the form of bitmap) have the same tag that has an action.
Definition: localzone.c:1618
sockaddr_store_port
void sockaddr_store_port(struct sockaddr_storage *addr, socklen_t addrlen, int port)
store port number into sockaddr structure
Definition: net_help.c:469
val_neg_zone
Per Zone aggressive negative caching data.
Definition: val_neg.h:94
dtio_setup_ssl
static int dtio_setup_ssl(struct dt_io_thread *dtio)
setup the SSL structure for new connection
Definition: dtstream.c:1942
val_get_mem
size_t val_get_mem(struct module_env *env, int id)
Debug helper routine that assists worker in determining memory in use.
Definition: validator.c:3254
comm_base_internal
struct ub_event_base * comm_base_internal(struct comm_base *b)
Access internal data structure (for util/tube.c on windows)
Definition: netevent.c:268
replay_moment::repevt_time_passes
@ repevt_time_passes
time passes
Definition: replay.h:200
sldns_wire2str_ipseckey_scan
int sldns_wire2str_ipseckey_scan(uint8_t **data, size_t *data_len, char **str, size_t *str_len, uint8_t *pkt, size_t pktlen, int *comprloop)
Scan wireformat IPSECKEY field to string, with user buffers.
Definition: wire2str.c:1586
compress_tree_search
static int compress_tree_search(struct compress_tree_node **tree, uint8_t *dname, int labs, struct compress_tree_node **match, int *matchlabels, struct compress_tree_node ***insertpt)
Find domain name in tree, returns exact and closest match.
Definition: msgencode.c:107
val_verify_new_DNSKEYs
struct key_entry_key * val_verify_new_DNSKEYs(struct regional *region, struct module_env *env, struct val_env *ve, struct ub_packed_rrset_key *dnskey_rrset, struct ub_packed_rrset_key *ds_rrset, int downprot, char **reason, struct module_qstate *qstate)
Verify new DNSKEYs with DS rrset.
Definition: val_utils.c:559
auth_rrset::next
struct auth_rrset * next
next in list
Definition: authzone.h:173
cachedb_backend::name
const char * name
backend name
Definition: cachedb.h:73
local_zones::lock
lock_rw_type lock
lock on the localzone tree
Definition: localzone.h:110
ub_event_base_vmt::winsock_register_wsaevent
struct ub_event *(* winsock_register_wsaevent)(struct ub_event_base *, void *wsaevent, void(*cb)(int, short, void *), void *arg)
Create a new ub_event associated with the given wsaevent, (not called by libunbound)
Definition: unbound-event.h:105
auth_zones_create
struct auth_zones * auth_zones_create(void)
Create auth zones structure.
Definition: authzone.c:289
errinf_to_str_bogus
char * errinf_to_str_bogus(struct module_qstate *qstate)
Create error info in string.
Definition: config_file.c:2424
th_buck::upper
struct timeval upper
upper bound
Definition: timehist.h:55
tcl_addr::node
struct addr_tree_node node
node in address tree
Definition: tcp_conn_limit.h:69
fptr_whitelist_comm_signal
int fptr_whitelist_comm_signal(void(*fptr)(int, void *))
Check function pointer whitelist for comm_signal callback values.
Definition: fptr_wlist.c:145
pending::pkt
uint8_t * pkt
The query itself, the query packet to send.
Definition: outside_network.h:247
tls_session_ticket_key
Definition: net_help.c:79
reply_find_rrset_section_an
struct ub_packed_rrset_key * reply_find_rrset_section_an(struct reply_info *rep, uint8_t *name, size_t namelen, uint16_t type, uint16_t dclass)
Find rrset in reply, inside the answer section.
Definition: msgreply.c:771
subnet_qstate::ecs_server_in
struct ecs_data ecs_server_in
ecss data for server communication
Definition: subnetmod.h:83
alloc_get_mem
size_t alloc_get_mem(struct alloc_cache *alloc)
Get memory size of alloc cache, alloc structure including special types.
Definition: alloc.c:310
regional_destroy
void regional_destroy(struct regional *r)
Destroy regional.
Definition: regional.c:114
cfg_str2list_insert
int cfg_str2list_insert(struct config_str2list **head, char *item, char *i2)
Insert string into str2list.
Definition: config_file.c:1750
storeQueryInCache
int storeQueryInCache(struct module_qstate *qstate, struct query_info *qinfo, struct reply_info *msgrep, int is_referral)
Store the reply_info and query_info pair in message cache (qstate->msg_cache)
Definition: pythonmod_utils.c:59
module_stack
Stack of modules.
Definition: modstack.h:50
UB_SYNTAX
@ UB_SYNTAX
syntax error
Definition: context.h:191
lowercase_dname
static void lowercase_dname(uint8_t **p, size_t *remain)
lowercase domain name - does not follow compression pointers
Definition: testpkts.c:1045
sldns_lookup_by_name
sldns_lookup_table * sldns_lookup_by_name(sldns_lookup_table table[], const char *name)
Looks up the table entry by name, returns NULL if not found.
view::node
rbnode_type node
rbtree node, key is name
Definition: view.h:68
rrset_cache_remove
void rrset_cache_remove(struct rrset_cache *r, uint8_t *nm, size_t nmlen, uint16_t type, uint16_t dclass, uint32_t flags)
Remove an rrset from the cache, by name and type and flags.
Definition: rrset.c:441
dns_copy_msg
struct dns_msg * dns_copy_msg(struct dns_msg *from, struct regional *regional)
Copy a dns_msg to this regional.
Definition: iter_utils.c:638
dname_is_root
int dname_is_root(uint8_t *dname)
Returns true if the uncompressed wireformat dname is the root ".".
Definition: dname.c:718
edns_opt_list_append
int edns_opt_list_append(struct edns_option **list, uint16_t code, size_t len, uint8_t *data, struct regional *region)
Append edns option to edns option list.
Definition: msgreply.c:974
next_closer
static void next_closer(uint8_t *qname, size_t qnamelen, uint8_t *ce, uint8_t **nm, size_t *nmlen)
Given a qname and its proven closest encloser, calculate the "next closest" name.
Definition: val_nsec3.c:914
main_tap_data
main tap callback data
Definition: unbound-dnstap-socket.c:97
nsec3_hash_name
int nsec3_hash_name(rbtree_type *table, struct regional *region, struct sldns_buffer *buf, struct ub_packed_rrset_key *nsec3, int rr, uint8_t *dname, size_t dname_len, struct nsec3_cached_hash **hash)
Obtain the hash of an owner name.
Definition: val_nsec3.c:630
ipset_block
static struct module_func_block ipset_block
The ipset function block.
Definition: ipset.c:374
worker_stats_clear
void worker_stats_clear(struct worker *worker)
Init worker stats - includes server_stats_init, outside network and mesh.
Definition: worker.c:2027
ub_libevent_get_event_base
struct event_base * ub_libevent_get_event_base(struct ub_event_base *base)
Return the libevent base underlying the given ub_event_base.
Definition: ub_event_pluggable.c:410
inplace_cb_reply_call
int inplace_cb_reply_call(struct module_env *env, struct query_info *qinfo, struct module_qstate *qstate, struct reply_info *rep, int rcode, struct edns_data *edns, struct comm_reply *repinfo, struct regional *region)
Call the registered functions in the inplace_cb_reply linked list.
Definition: msgreply.c:1057
val_classify_response
enum val_classification val_classify_response(uint16_t query_flags, struct query_info *origqinf, struct query_info *qinf, struct reply_info *rep, size_t skip)
Given a response, classify ANSWER responses into a subtype.
Definition: val_utils.c:62
listen_list::com
struct comm_point * com
event info
Definition: listen_dnsport.h:77
ratelimit_list_arg::ssl
RES * ssl
the SSL to print to
Definition: remote.c:2787
lruhash.h
DTIO_RECONNECT_TIMEOUT_MIN
#define DTIO_RECONNECT_TIMEOUT_MIN
the msec to wait for reconnect (if not immediate, the first attempt)
Definition: dtstream.c:66
tempfile_check
static void tempfile_check(struct replay_runtime *runtime, struct replay_moment *mom)
check tempfile file contents
Definition: fake_event.c:631
local_zone_unset
@ local_zone_unset
unset type, used for unset tag_action elements
Definition: localzone.h:67
ub_event_base_vmt::dispatch
int(* dispatch)(struct ub_event_base *)
Run the event loop (not called by libunbound when using ub_resolve_event)
Definition: unbound-event.h:93
sec_status_to_string
const char * sec_status_to_string(enum sec_status s)
Get a printable string for a security status value.
Definition: packed_rrset.c:250
lru_demote
void lru_demote(struct lruhash *table, struct lruhash_entry *entry)
Demote entry, so it becomes the least recently used in the LRU list.
Definition: lruhash.c:553
libworker::back
struct outside_network * back
the backside outside network interface to the auth servers
Definition: libworker.h:86
authzone_test
void authzone_test(void)
test authzone code
Definition: unitauth.c:893
ixfr_start_serial
static int ixfr_start_serial(struct auth_chunk *rr_chunk, int rr_num, size_t rr_pos, uint8_t *rr_dname, uint16_t rr_type, uint16_t rr_class, uint32_t rr_ttl, uint16_t rr_rdlen, uint8_t *rr_rdata, size_t rr_nextpos, uint32_t transfer_serial, uint32_t xfr_serial)
check that start serial is OK for ixfr.
Definition: authzone.c:4538
val_qstate::dlv_insecure_at
uint8_t * dlv_insecure_at
Name at which chain of trust stopped with insecure, starting DLV DLV must result in chain going furth...
Definition: validator.h:231
sldns_edns_flags
sldns_lookup_table * sldns_edns_flags
EDNS flags.
Definition: wire2str.c:160
donotq_get_mem
size_t donotq_get_mem(struct iter_donotq *donotq)
Get memory used by donotqueryaddresses structure.
Definition: iter_donotq.c:149
fptr_whitelist_pending_tcp
int fptr_whitelist_pending_tcp(comm_point_callback_type *fptr)
Check function pointer whitelist for pending tcp callback values.
Definition: fptr_wlist.c:202
iter_donotq::region
struct regional * region
regional for allocation
Definition: iter_donotq.h:55
dtio_write_more_of_len
static int dtio_write_more_of_len(struct dt_io_thread *dtio)
write more of the length, preceding the data frame.
Definition: dtstream.c:815
comm_point_http_handle_read
static int comm_point_http_handle_read(int fd, struct comm_point *c)
Handle http reading callback.
Definition: netevent.c:2196
slabhash_testkey::entry
struct lruhash_entry entry
the entry
Definition: slabhash.h:209
LDNS_RR_TYPE_RRSIG
@ LDNS_RR_TYPE_RRSIG
DNSSEC.
Definition: rrdef.h:175
delegpt_from_message
struct delegpt * delegpt_from_message(struct dns_msg *msg, struct regional *region)
Create new delegation point from a dns message.
Definition: iter_delegpt.c:349
checklocks.h
testcode/checklocks.h - wrapper on locks that checks access.
config_auth::rpz_cname
char * rpz_cname
Always reply with this CNAME target if the cname override action is used.
Definition: config_file.h:688
ub_rrset_key_delete
void ub_rrset_key_delete(void *key, void *userdata)
Old key to be deleted.
Definition: packed_rrset.c:128
val_qstate::restart_count
int restart_count
The query restart count.
Definition: validator.h:161
replay_moment::mom_next
struct replay_moment * mom_next
Next replay moment in list of replay moments.
Definition: replay.h:187
LDNS_RR_TYPE_WKS
@ LDNS_RR_TYPE_WKS
a well known service description
Definition: rrdef.h:105
algo_needs_init_ds
void algo_needs_init_ds(struct algo_needs *n, struct ub_packed_rrset_key *ds, int fav_ds_algo, uint8_t *sigalg)
Initialize algo needs structure, set algos from rrset as needed.
Definition: val_sigcrypt.c:425
reply_find_final_cname_target
uint8_t * reply_find_final_cname_target(struct query_info *qinfo, struct reply_info *rep)
Find final cname target in reply, the one matching qinfo.
Definition: msgreply.c:725
sldns_str2wire_wks_buf
int sldns_str2wire_wks_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_WKS from string to wireformat.
Definition: str2wire.c:1704
tcp_callback_reader
static void tcp_callback_reader(struct comm_point *c)
do the callback when reading is done
Definition: netevent.c:1016
auth_transfer::on_ixfr_is_axfr
int on_ixfr_is_axfr
we are doing an IXFR but we detected an AXFR contents
Definition: authzone.h:406
ub_ctx_debuglevel
int ub_ctx_debuglevel(struct ub_ctx *ctx, int d)
Set debug verbosity for the context Output is directed to stderr.
Definition: libunbound.c:466
sldns_str2wire_b64_buf
int sldns_str2wire_b64_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_B64 from string to wireformat.
Definition: str2wire.c:1205
iter_merge_retry_counts
void iter_merge_retry_counts(struct delegpt *dp, struct delegpt *old)
Add retry counts from older delegpt to newer delegpt.
Definition: iter_utils.c:1299
packed_rrset_data
RRset data.
Definition: packed_rrset.h:235
xfr_probe_start_list
static void xfr_probe_start_list(struct auth_xfer *xfr, struct auth_master *spec)
start the iteration of the task_probe list of masters
Definition: authzone.c:3840
comm_point_create_tcp_handler
static struct comm_point * comm_point_create_tcp_handler(struct comm_base *base, struct comm_point *parent, size_t bufsize, struct sldns_buffer *spoolbuf, comm_point_callback_type *callback, void *callback_arg)
create a tcp handler with a parent
Definition: netevent.c:2633
iter_apply_cfg
int iter_apply_cfg(struct iter_env *iter_env, struct config_file *cfg)
Process config options and set iterator module state.
Definition: iter_utils.c:144
rrset_key_hash
hashvalue_type rrset_key_hash(struct packed_rrset_key *key)
Calculate hash value for a packed rrset key.
Definition: packed_rrset.c:163
BIT_CD
#define BIT_CD
DNS constants for uint16_t style flag manipulation.
Definition: net_help.h:57
inplace_cb_register
int inplace_cb_register(void *cb, enum inplace_cb_list_type type, void *cbarg, struct module_env *env, int id)
Register an inplace callback function.
Definition: module.c:127
iter_dns_store
void iter_dns_store(struct module_env *env, struct query_info *msgqinf, struct reply_info *msgrep, int is_referral, time_t leeway, int pside, struct regional *region, uint16_t flags)
Allocate a dns_msg with malloc/alloc structure and store in dns cache.
Definition: iter_utils.c:654
auth_xfer::namelen
size_t namelen
length of zone name
Definition: authzone.h:209
read_addrs
static int read_addrs(struct iter_priv *priv, struct config_file *cfg)
Read private-addr declarations from config.
Definition: iter_priv.c:78
ub_packed_rrset_heap_key
static struct ub_packed_rrset_key * ub_packed_rrset_heap_key(int iter(struct autr_ta **, uint8_t **, size_t *, size_t *), struct autr_ta *list)
Create a ub_packed_rrset_key allocated on the heap.
Definition: autotrust.c:626
verb_certs
static void verb_certs(const char *msg, STACK_OF(X509) *sk)
printout certificates in detail
Definition: unbound-anchor.c:337
ipsecmod_get_mem
size_t ipsecmod_get_mem(struct module_env *env, int id)
return memory estimate for the ipsecmod module
config_file
The configuration options.
Definition: config_file.h:68
filter_next
static struct ub_packed_rrset_key * filter_next(struct nsec3_filter *filter, size_t *rrsetnum, int *rrnum)
Iterate through NSEC3 list, per RR This routine gives the next RR in the list (or sets rrset null).
Definition: val_nsec3.c:327
val_mark_indeterminate
void val_mark_indeterminate(struct reply_info *rep, struct val_anchors *anchors, struct rrset_cache *r, struct module_env *env)
Mark all unchecked rrset entries not below a trust anchor as indeterminate.
Definition: val_utils.c:1011
fptr_whitelist_mod_operate
int fptr_whitelist_mod_operate(void(*fptr)(struct module_qstate *qstate, enum module_ev event, int id, struct outbound_entry *outbound))
Check function pointer whitelist for module operate call values.
Definition: fptr_wlist.c:445
local_zone_out
static void local_zone_out(struct local_zone *z)
print all RRsets in local zone
Definition: localzone.c:1164
sldns_get_errorstr_parse
const char * sldns_get_errorstr_parse(int e)
Get reference to a constant string for the (parse) error.
Definition: str2wire.c:840
comm_timer_get_mem
size_t comm_timer_get_mem(struct comm_timer *timer)
Get size of memory used by comm timer.
neg_find_zone
struct val_neg_zone * neg_find_zone(struct val_neg_cache *neg, uint8_t *nm, size_t len, uint16_t dclass)
Find the given zone, from the SOA owner name and class Does not do locking.
Definition: val_neg.c:280
tcp_conn_limit.h
infra_arg::infra
struct infra_cache * infra
the infra cache
Definition: remote.c:2433
val_chase_cname
int val_chase_cname(struct query_info *qchase, struct reply_info *rep, size_t *cname_skip)
Chase the cname to the next query name.
Definition: val_utils.c:811
check_holddown
static time_t check_holddown(struct module_env *env, struct autr_ta *ta, unsigned int holddown)
Check if the holddown time has already exceeded setting: add-holddown: add holddown timer setting: de...
Definition: autotrust.c:1680
remote_accept_callback
int remote_accept_callback(struct comm_point *, void *, int, struct comm_reply *)
handle remote control accept callbacks
dtio_open_output
static void dtio_open_output(struct dt_io_thread *dtio)
open the output channel
Definition: dtstream.c:1957
ub_server_stats::num_query_authzone_down
long long num_query_authzone_down
number of queries for unbound's auth_zones, downstream answers
Definition: unbound.h:776
ub_libevent_event_base
struct ub_event_base * ub_libevent_event_base(struct event_base *)
Return an ub_event_base constructed for the given libevent event base.
Definition: ub_event.c:241
comm_point::http_stored
size_t http_stored
http stored content in buffer
Definition: netevent.h:218
dnslook
static int dnslook(struct ub_ctx *ctx, char *q, int t, int c, int docname)
perform a lookup and printout return if domain existed
Definition: unbound-host.c:367
EDNS_FRAG_SIZE_IP4
#define EDNS_FRAG_SIZE_IP4
fallback size for fragmentation for EDNS in IPv4
Definition: outside_network.h:316
daemon_remote_open_accept
int daemon_remote_open_accept(struct daemon_remote *rc, struct listen_port *ports, struct worker *worker)
Setup comm points for accepting remote control connections.
Definition: remote.c:414
respip_static
@ respip_static
serves response data, else, nodata answer.
Definition: localzone.h:566
MSG_GENERIC_ERR
#define MSG_GENERIC_ERR
from gen_msg.h - error message record for windows message log
Definition: win_svc.h:61
lookup_serviced
static struct serviced_query * lookup_serviced(struct outside_network *outnet, sldns_buffer *buff, int dnssec, struct sockaddr_storage *addr, socklen_t addrlen, struct edns_option *opt_list)
lookup serviced query in serviced query rbtree
Definition: outside_network.c:1400
nonce_cache_key::nonce
uint8_t nonce[crypto_box_HALF_NONCEBYTES]
the nonce used by the client
Definition: dnscrypt.c:66
tcp_relay_read
static int tcp_relay_read(int s, struct tcp_send_list **first, struct tcp_send_list **last, struct timeval *now, struct timeval *delay, sldns_buffer *pkt)
relay TCP, read a part
Definition: delayer.c:642
bin_find_entry
struct lruhash_entry * bin_find_entry(struct lruhash *table, struct lruhash_bin *bin, hashvalue_type hash, void *key)
Find entry in hash bin.
Definition: lruhash.c:218
listening_ports_free
void listening_ports_free(struct listen_port *list)
Close and delete the (list of) listening ports.
Definition: listen_dnsport.c:1535
find_rrset_type
static struct ub_packed_rrset_key * find_rrset_type(struct reply_info *rep, uint16_t type)
find RRset in reply by type
Definition: unitverify.c:233
parse_int
static unsigned int parse_int(char *line, int *ret)
parse integer
Definition: autotrust.c:796
tube::sw
int sw
pipe end to write on
Definition: tube.h:68
moveover_rrsigs
static int moveover_rrsigs(sldns_buffer *pkt, struct regional *region, struct rrset_parse *sigset, struct rrset_parse *dataset, int duplicate)
move rrsigs from sigset to dataset
Definition: msgparse.c:341
issub
static int issub(const addrkey_t *s1, addrlen_t l1, const addrkey_t *s2, addrlen_t l2, addrlen_t skip)
Tests if s1 is a substring of s2.
Definition: addrtree.c:352
comm_reply::srctype
int srctype
return type 0 (none), 4(IP4), 6(IP6)
Definition: netevent.h:121
UB_NOERROR
@ UB_NOERROR
no error
Definition: context.h:184
internal_base::secs
time_t secs
seconds time pointer points here
Definition: netevent.c:118
config_del_strarray
static void config_del_strarray(char **array, int num)
delete string array
Definition: config_file.c:1396
val_neg_zone::len
size_t len
length of name
Definition: val_neg.h:100
http_zonefile_syntax_check
static int http_zonefile_syntax_check(struct auth_xfer *xfr, sldns_buffer *buf)
check syntax of chunklist zonefile, parse first RR, return false on failure and return a string in th...
Definition: authzone.c:4310
auth_zones::lock
lock_rw_type lock
lock on the authzone trees
Definition: authzone.h:74
ub_timer_add
int ub_timer_add(struct ub_event *, struct ub_event_base *, void(*cb)(int, short, void *), void *arg, struct timeval *)
Reconfigure and activate a timeout event.
Definition: ub_event.c:399
acl_list_create
struct acl_list * acl_list_create(void)
Create acl structure.
Definition: acl_list.c:52
dname_test_sigcount
static void dname_test_sigcount(void)
test dname_signame_label_count
Definition: unitdname.c:480
usage
static void usage(void)
Give unbound-host usage, and exit (1).
Definition: unbound-host.c:83
addrtree_delete
void addrtree_delete(struct addrtree *tree)
Free tree and all nodes below.
Definition: addrtree.c:275
acl_list_view_cfg
static int acl_list_view_cfg(struct acl_list *acl, const char *str, const char *str2, struct views *vs)
apply acl_view string
Definition: acl_list.c:177
config_file::serve_expired_reply_ttl
int serve_expired_reply_ttl
TTL for the serve expired replies.
Definition: config_file.h:372
key_ttl
static time_t key_ttl(struct ub_packed_rrset_key *k)
get TTL from DNSKEY rrset
Definition: autotrust.c:1461
regional_create_custom
struct regional * regional_create_custom(size_t size)
Create a new region, with custom settings.
Definition: regional.c:84
fptr_whitelist_stop_accept
int fptr_whitelist_stop_accept(void(*fptr)(void *))
Check function pointer whitelist for stop_accept callback values.
Definition: fptr_wlist.c:157
ssl_err
static void ssl_err(const char *s)
exit with ssl error
Definition: unbound-control.c:474
find_add_tp
static struct trust_anchor * find_add_tp(struct val_anchors *anchors, uint8_t *rr, size_t rr_len, size_t dname_len)
find or add a new trust point for autotrust
Definition: autotrust.c:416
sldns_wire2str_nsec3_next_owner_scan
int sldns_wire2str_nsec3_next_owner_scan(uint8_t **d, size_t *dl, char **s, size_t *sl)
Scan wireformat nsec3_next_owner field to string, with user buffers.
Definition: wire2str.c:1647
ub_ctx::finalized
int finalized
The context has been finalized This is after config when the first resolve is done.
Definition: context.h:84
rpz.h
readkeyword_bindfile
static int readkeyword_bindfile(FILE *in, sldns_buffer *buf, int *line, int comments)
Read a keyword skipping bind comments; spaces, specials, restkeywords.
Definition: val_anchor.c:531
sldns_wirerr_get_rdata
uint8_t * sldns_wirerr_get_rdata(uint8_t *rr, size_t len, size_t dname_len)
Get the rdata pointer of the RR.
Definition: str2wire.c:826
create_local_accept_sock
int create_local_accept_sock(const char *path, int *noproto, int use_systemd)
Create and bind local listening socket.
Definition: listen_dnsport.c:927
tcp_req_info::in_worker_handle
int in_worker_handle
are we in worker_handle function call (for recursion callback)
Definition: listen_dnsport.h:254
iter_ns_probability
int iter_ns_probability(struct ub_randstate *rnd, int n, int m)
Select randomly with n/m probability.
Definition: iter_utils.c:664
lruhash_entry
An entry into the hash table.
Definition: lruhash.h:203
dt_io_thread::want_to_exit
int want_to_exit
the io thread wants to exit
Definition: dtstream.h:175
ub_server_stats::qbit_AA
long long qbit_AA
number of queries with AA bit
Definition: unbound.h:705
auth_transfer::ixfr_fail
int ixfr_fail
failed ixfr transfer, retry with axfr (to the current master), the IXFR was 'REFUSED',...
Definition: authzone.h:395
do_newkey
static void do_newkey(struct module_env *env, struct autr_ta *anchor, int *c)
Event: NewKey.
Definition: autotrust.c:1720
read_donotq
static int read_donotq(struct iter_donotq *dq, struct config_file *cfg)
read donotq config
Definition: iter_donotq.c:111
DNS64_INTERNAL_QUERY
@ DNS64_INTERNAL_QUERY
Internally-generated query, no DNS64 processing.
Definition: dns64.c:76
mesh_area::jostle_max
struct timeval jostle_max
timeout for jostling.
Definition: mesh.h:150
delegpt_create
struct delegpt * delegpt_create(struct regional *regional)
Create new delegation point.
Definition: iter_delegpt.c:54
tcl_new_connection
int tcl_new_connection(struct tcl_addr *tcl)
Increment TCP connection count if found, provided the count was below the limit.
Definition: tcp_conn_limit.c:155
do_flush_infra
static void do_flush_infra(RES *ssl, struct worker *worker, char *arg)
flush infra cache
Definition: remote.c:1643
rpz_finish_config
void rpz_finish_config(struct rpz *r)
Prepare RPZ after procesing feed content.
Definition: rpz.c:328
key_cache::slab
struct slabhash * slab
uses slabhash for storage, type key_entry_key, key_entry_data
Definition: val_kcache.h:56
mod_get_mem
size_t mod_get_mem(struct module_env *env, const char *name)
fetch memory for a module by name, returns 0 if module not there
Definition: modstack.c:272
fake_commpoint::pending
struct fake_pending * pending
the pending entry for this commpoint (if any)
Definition: fake_event.c:90
worker_init
int worker_init(struct worker *worker, struct config_file *cfg, struct listen_port *ports, int do_sigs)
Initialize worker.
Definition: worker.c:1741
slabhash_remove
void slabhash_remove(struct slabhash *sl, hashvalue_type hash, void *key)
Remove entry from hashtable.
Definition: slabhash.c:128
synth_cname
static int synth_cname(uint8_t *qname, size_t qnamelen, struct rrset_parse *dname_rrset, uint8_t *alias, size_t *aliaslen, sldns_buffer *pkt)
Synthesize CNAME from DNAME, false if too long.
Definition: iter_scrub.c:226
sldns_wirerr_get_rdatawl
uint8_t * sldns_wirerr_get_rdatawl(uint8_t *rr, size_t len, size_t dname_len)
Get the rdata pointer of the RR.
Definition: str2wire.c:833
LDNS_RR_TYPE_SOA
@ LDNS_RR_TYPE_SOA
marks the start of a zone of authority
Definition: rrdef.h:95
hints_delete
void hints_delete(struct iter_hints *hints)
Delete hints.
Definition: iter_hints.c:82
listen_sslctx_create
void * listen_sslctx_create(char *key, char *pem, char *verifypem)
create SSL listen context
Definition: net_help.c:979
first_timer
static struct fake_timer * first_timer(struct replay_runtime *runtime)
fetch oldest timer in list that is enabled
Definition: replay.c:532
dtio_reconnect_clear
static void dtio_reconnect_clear(struct dt_io_thread *dtio)
clear the reconnect exponential backoff timer.
Definition: dtstream.c:539
dname_to_buf
static sldns_buffer * dname_to_buf(sldns_buffer *b, const char *str)
put dname into buffer
Definition: unitdname.c:50
dns64_init
int dns64_init(struct module_env *env, int id)
dns64 init
Definition: dns64.c:397
infra_set_lame
int infra_set_lame(struct infra_cache *infra, struct sockaddr_storage *addr, socklen_t addrlen, uint8_t *name, size_t namelen, time_t timenow, int dnsseclame, int reclame, uint16_t qtype)
Set a host to be lame for the given zone.
Definition: infra.c:506
mesh_serve_expired_callback
void mesh_serve_expired_callback(void *arg)
Callback for when the serve expired client timer has run out.
Definition: mesh.c:1881
log_dns_msg
void log_dns_msg(const char *str, struct query_info *qinfo, struct reply_info *rep)
Debug send the query info and reply info to the log in readable form.
Definition: msgreply.c:820
tcp_req_info_create
struct tcp_req_info * tcp_req_info_create(struct sldns_buffer *spoolbuf)
Create tcp request info structure that keeps track of open requests on the TCP channel that are resol...
Definition: listen_dnsport.c:1598
RRSET_SCRUB_OK
#define RRSET_SCRUB_OK
RRset flag used during scrubbing.
Definition: iter_scrub.c:59
local_zone_deny
@ local_zone_deny
drop query
Definition: localzone.h:69
MAX_REFERRAL_COUNT
#define MAX_REFERRAL_COUNT
max number of referrals.
Definition: iterator.h:66
rtt_info::rto
int rto
current RTO in use, in milliseconds
Definition: rtt.h:55
mesh_state_is_unique
int mesh_state_is_unique(struct mesh_state *mstate)
Check if the mesh state is unique.
Definition: mesh.c:849
ub_event_base_vmt::new_signal
struct ub_event *(* new_signal)(struct ub_event_base *, int fd, void(*cb)(int, short, void *), void *arg)
Instantiate a new signal associated with this event base, (not called by libunbound)
Definition: unbound-event.h:101
scrub_message
int scrub_message(sldns_buffer *pkt, struct msg_parse *msg, struct query_info *qinfo, uint8_t *zonename, struct regional *region, struct module_env *env, struct iter_env *ie)
Cleanup the passed dns message.
Definition: iter_scrub.c:806
dns_cache_prefetch_adjust
int dns_cache_prefetch_adjust(struct module_env *env, struct query_info *qinfo, time_t adjust, uint16_t flags)
Adjust the prefetch_ttl for a cached message.
Definition: dns.c:1025
fake_event_init
void fake_event_init(struct replay_scenario *scen)
Initialise fake event services.
Definition: fake_event.c:123
LDNS_RR_TYPE_X25
@ LDNS_RR_TYPE_X25
RFC1183.
Definition: rrdef.h:121
infra_rtt_update
int infra_rtt_update(struct infra_cache *infra, struct sockaddr_storage *addr, socklen_t addrlen, uint8_t *name, size_t namelen, int qtype, int roundtrip, int orig_rtt, time_t timenow)
Update rtt information for the host.
Definition: infra.c:562
dynlibmod_get_funcblock
struct module_func_block * dynlibmod_get_funcblock(void)
Get the module function block.
Definition: dynlibmod.c:298
log_buf
void log_buf(enum verbosity_value level, const char *msg, sldns_buffer *buf)
Easy alternative for log_hex, takes a sldns_buffer.
Definition: log.c:424
outnet_tcptimer
void outnet_tcptimer(void *arg)
callback for outgoing TCP timer event
Definition: outside_network.c:1286
usage
static void usage(void)
Give unbound-anchor usage, and exit (1).
Definition: unbound-anchor.c:175
nsectest
static void nsectest(void)
Test NSEC type bitmap routine.
Definition: unitverify.c:377
process_list_end_transfer
static void process_list_end_transfer(struct auth_xfer *xfr, struct module_env *env)
task transfer.
Definition: authzone.c:5733
mesh_area::max_reply_states
size_t max_reply_states
max total number of reply states to have
Definition: mesh.h:107
config_file::ignore_cd
int ignore_cd
ignore the CD flag in incoming queries and refuse them bogus data
Definition: config_file.h:364
http_process_chunk_header
static int http_process_chunk_header(struct comm_point *c)
a chunk header is complete, process it, return 0=fail, 1=continue next header line,...
Definition: netevent.c:2022
comm_signal_create
struct comm_signal * comm_signal_create(struct comm_base *base, void(*callback)(int, void *), void *cb_arg)
Create a signal handler.
Definition: netevent.c:3370
config_file::ssl_service_key
char * ssl_service_key
private key file for dnstcp-ssl service (enabled if not NULL)
Definition: config_file.h:112
test_anchors
static void test_anchors(sldns_buffer *buff, struct val_anchors *a)
test with several anchors
Definition: unitanchor.c:95
outnet_comm_point_for_udp
struct comm_point * outnet_comm_point_for_udp(struct outside_network *outnet, comm_point_callback_type *cb, void *cb_arg, struct sockaddr_storage *to_addr, socklen_t to_addrlen)
Create udp commpoint suitable for sending packets to the destination.
Definition: outside_network.c:2268
tube::listen_cb
tube_callback_type * listen_cb
listen callback
Definition: tube.h:73
dname_subdomain_c
int dname_subdomain_c(uint8_t *d1, uint8_t *d2)
Counts labels.
Definition: dname.c:700
ub_ctx_zone_remove
int ub_ctx_zone_remove(struct ub_ctx *ctx, const char *zone_name)
Remove zone from local authority info of the library.
Definition: libunbound.c:1326
mesh_stats
void mesh_stats(struct mesh_area *mesh, const char *str)
Print some stats about the mesh to the log.
Definition: mesh.c:1726
respip_none
@ respip_none
no respip action
Definition: localzone.h:538
iter_qstate::auth_zone_avoid
int auth_zone_avoid
True if the auth_zones should not be consulted for the query.
Definition: iterator.h:408
compress_tree_store
static int compress_tree_store(uint8_t *dname, int labs, size_t offset, struct regional *region, struct compress_tree_node *closest, struct compress_tree_node **insertpt)
Store domain name and ancestors into compression tree.
Definition: msgencode.c:206
config_file::dnstap_send_version
int dnstap_send_version
true to send "version" via dnstap
Definition: config_file.h:503
delegpt_add_rrset
int delegpt_add_rrset(struct delegpt *dp, struct regional *regional, struct ub_packed_rrset_key *rrset, uint8_t lame, int *additions)
Add any RRset to delegpt.
Definition: iter_delegpt.c:469
iter_qstate
Per query state for the iterator module.
Definition: iterator.h:222
tcp_req_info_get_stream_buffer_size
size_t tcp_req_info_get_stream_buffer_size(void)
get the size of currently used tcp stream wait buffers (in bytes)
Definition: listen_dnsport.c:1957
sldns_wire2str_class_buf
int sldns_wire2str_class_buf(uint16_t rrclass, char *s, size_t slen)
Convert wire RR class to a string, 'IN', 'CLASS12'.
Definition: wire2str.c:293
daemon_remote_stop_accept
void daemon_remote_stop_accept(struct daemon_remote *rc)
Stop accept handlers for TCP (until enabled again)
Definition: remote.c:428
LDNS_RDF_TYPE_IPSECKEY
@ LDNS_RDF_TYPE_IPSECKEY
IPSECKEY.
Definition: rrdef.h:325
LDNS_RR_TYPE_AFSDB
@ LDNS_RR_TYPE_AFSDB
RFC1183.
Definition: rrdef.h:119
outside_network::udp_wait_last
struct pending * udp_wait_last
last pending udp query in list
Definition: outside_network.h:123
nsec3_iteration_count_high
static int nsec3_iteration_count_high(struct val_env *ve, struct nsec3_filter *filter, struct key_entry_key *kkey)
Determine if any of the NSEC3 rrs iteration count is too high, from key.
Definition: val_nsec3.c:474
comm_signal
Structure only for signal events.
Definition: netevent.h:335
local_zone_find_data
struct local_data * local_zone_find_data(struct local_zone *z, uint8_t *nm, size_t nmlen, int nmlabs)
Find a data node by exact name for a local zone.
Definition: localzone.c:420
comm_point_send_reply
void comm_point_send_reply(struct comm_reply *repinfo)
Send reply.
Definition: fake_event.c:996
do_auth_zone_transfer
static void do_auth_zone_transfer(RES *ssl, struct worker *worker, char *arg)
do the auth_zone_transfer command
Definition: remote.c:2544
key_cache_delete
void key_cache_delete(struct key_cache *kcache)
Delete the key cache.
Definition: val_kcache.c:74
config_view::respip_data
struct config_str2list * respip_data
data complementing the 'redirect' response IP actions
Definition: config_file.h:715
autr_get_num_anchors
size_t autr_get_num_anchors(struct val_anchors *anchors)
See if autotrust anchors are configured and how many.
Definition: autotrust.c:106
mesh_state::unique
struct mesh_state * unique
pointer to this state for uniqueness or NULL
Definition: mesh.h:196
stream_wait_count_lock
static lock_basic_type stream_wait_count_lock
lock on the counter of stream buffer memory
Definition: listen_dnsport.c:81
addr_tree_compare
int addr_tree_compare(const void *k1, const void *k2)
compare addr tree nodes
Definition: dnstree.c:60
order_lock
a lock
Definition: lock_verify.c:69
regional_strdup
char * regional_strdup(struct regional *r, const char *string)
Duplicate string and allocate the result in regional.
Definition: regional.c:180
SENTINEL_NOT
#define SENTINEL_NOT
Root key sentinel is not ta preamble.
Definition: validator.h:73
LDNS_RR_TYPE_MF
@ LDNS_RR_TYPE_MF
a mail forwarder (Obsolete - use MX)
Definition: rrdef.h:91
xml_data::czone
BIO * czone
the current anchor: Zone
Definition: unbound-anchor.c:1208
reply_packet::reply_pkt
uint8_t * reply_pkt
the reply pkt
Definition: testpkts.h:153
sldns_wire2str_rr_comment_print
int sldns_wire2str_rr_comment_print(char **str, size_t *str_len, uint8_t *rr, size_t rrlen, size_t dname_off, uint16_t rrtype)
Print to string the RR-information comment in default format, with user buffers.
Definition: wire2str.c:650
perfreply
static void perfreply(struct perfinfo *info, size_t n, struct timeval *now)
got reply for io
Definition: perf.c:306
LDNS_RR_TYPE_KEY
@ LDNS_RR_TYPE_KEY
2535typecode
Definition: rrdef.h:133
dt_msg_queue_submit
void dt_msg_queue_submit(struct dt_msg_queue *mq, void *buf, size_t len)
Submit a message to the queue.
Definition: dtstream.c:168
comm_point_udp_ancil_callback
void comm_point_udp_ancil_callback(int fd, short event, void *arg)
This routine is published for checks and tests, and is only used internally.
Definition: netevent.c:583
packed_rrset.h
msgreply_entry::key
struct query_info key
the hash table key
Definition: msgreply.h:219
skip_to_eol
static void skip_to_eol(FILE *in)
skip file to end of line
Definition: val_anchor.c:486
rpz_clear
int rpz_clear(struct rpz *r)
Clear local-zones and respip data in RPZ, used after reloading file or AXFR/HTTP transfer.
Definition: rpz.c:313
config_file::dnstap_bidirectional
int dnstap_bidirectional
using bidirectional frame streams if true
Definition: config_file.h:485
tcp_send_list::wait
struct timeval wait
time when the item can be transmitted on
Definition: delayer.c:106
infra_del_host
static void infra_del_host(struct lruhash_entry *e, void *arg)
callback to delete hosts in infra cache
Definition: remote.c:1622
comm_point::cur_tcp_count
int cur_tcp_count
current number of tcp handler in-use for this accept socket
Definition: netevent.h:182
respip_inform_super
void respip_inform_super(struct module_qstate *qstate, int id, struct module_qstate *super)
inform response-ip super
Definition: respip.c:1223
sldns_wire2str_type_buf
int sldns_wire2str_type_buf(uint16_t rrtype, char *s, size_t slen)
Convert wire RR type to a string, 'MX', 'TYPE12'.
Definition: wire2str.c:287
sldns_str2wire_dname_buf
int sldns_str2wire_dname_buf(const char *str, uint8_t *buf, size_t *len)
Convert text string into dname wireformat, mallocless, with user buffer.
Definition: str2wire.c:139
rrsig_num_that_cover
static size_t rrsig_num_that_cover(struct auth_rrset *rrsig, uint16_t rr_type, size_t *sigsz)
count number (and size) of rrsigs that cover a type
Definition: authzone.c:913
sldns_wire2str_ttl_scan
int sldns_wire2str_ttl_scan(uint8_t **data, size_t *data_len, char **str, size_t *str_len)
Scan wireformat rr ttl to string, with user buffers.
Definition: wire2str.c:932
serviced_query::zone
uint8_t * zone
zone name, uncompressed domain name in wireformat
Definition: outside_network.h:351
delegpt_ns::next
struct delegpt_ns * next
next in list
Definition: iter_delegpt.h:97
comm_base_dispatch
void comm_base_dispatch(struct comm_base *b)
Dispatch the comm base events.
Definition: fake_event.c:953
parse_query_section
static int parse_query_section(sldns_buffer *pkt, struct msg_parse *msg)
Parse query section.
Definition: msgparse.c:579
module_wait_subquery
@ module_wait_subquery
module is waiting for sub-query
Definition: module.h:543
config_parse_taglist
uint8_t * config_parse_taglist(struct config_file *cfg, char *str, size_t *listlen)
parse taglist from string into bytestring with bitlist.
Definition: config_file.c:1956
config_print_func
void config_print_func(char *line, void *arg)
function to print to a file, use as func with config_get_option.
Definition: config_file.c:748
vsig
static int vsig
verbose signature test
Definition: unitverify.c:65
slabhash::shift
unsigned int shift
shift right this many bits to get index into array.
Definition: slabhash.h:63
local_zone::taglist
uint8_t * taglist
tag bitlist
Definition: localzone.h:143
slabhash_is_size
int slabhash_is_size(struct slabhash *sl, size_t size, size_t slabs)
See if slabhash is of given (size, slabs) configuration.
Definition: slabhash.c:156
find_tag_id
int find_tag_id(struct config_file *cfg, const char *tag)
Find tag ID in the tag list.
Definition: config_file.c:1912
replay_answer::pkt
uint8_t * pkt
the answer preparsed as ldns pkt
Definition: replay.h:372
lruhash_remove
void lruhash_remove(struct lruhash *table, hashvalue_type hash, void *key)
Remove entry from hashtable.
Definition: lruhash.c:378
min_expiry
static time_t min_expiry(struct module_env *env, struct packed_rrset_data *dd)
Find minimum expiration interval from signatures.
Definition: autotrust.c:1281
addrtree::max_depth
addrlen_t max_depth
Maximum prefix length we are willing to cache.
Definition: addrtree.h:76
timehist_import
void timehist_import(struct timehist *hist, long long *array, size_t sz)
Import histogram from an array.
Definition: timehist.c:239
check_data
static void check_data(struct val_neg_zone *zone, struct val_neg_data *data)
check point in data tree
Definition: unitneg.c:395
iter_env::supports_ipv4
int supports_ipv4
A flag to indicate whether or not we have an IPv4 route.
Definition: iterator.h:114
mesh_area_find
struct mesh_state * mesh_area_find(struct mesh_area *mesh, struct respip_client_info *cinfo, struct query_info *qinfo, uint16_t qflags, int prime, int valrec)
Find a mesh state in the mesh area.
Definition: mesh.c:1425
hashlittle
uint32_t hashlittle(const void *k, size_t length, uint32_t initval)
Hash key data.
Definition: lookup3.c:332
ub_c_wrap
int ub_c_wrap(void)
wrap function
Definition: config_file.c:1645
LDNS_RDF_TYPE_B64
@ LDNS_RDF_TYPE_B64
b64 string
Definition: rrdef.h:286
anchors_init_parents_locked
void anchors_init_parents_locked(struct val_anchors *anchors)
Recalculate parent pointers.
Definition: val_anchor.c:155
checkformerr
static void checkformerr(sldns_buffer *pkt)
check if unbound formerr equals ldns formerr
Definition: unitmsgparse.c:146
read_fwds_host
static int read_fwds_host(struct config_stub *s, struct delegpt *dp)
set fwd host names
Definition: iter_fwd.c:204
val_new
static struct val_qstate * val_new(struct module_qstate *qstate, int id)
allocate new validator query state
Definition: validator.c:255
del_info::num_rrsets
size_t num_rrsets
number of rrsets removed
Definition: remote.c:1609
probe_anchor
static void probe_anchor(struct module_env *env, struct trust_anchor *tp)
probe a trust anchor DNSKEY and unlocks tp
Definition: autotrust.c:2345
nsec3_get_nextowner
int nsec3_get_nextowner(struct ub_packed_rrset_key *rrset, int r, uint8_t **next, size_t *nextlen)
Return nsec3 RR next hashed owner name.
Definition: val_nsec3.c:222
parse_copy_decompress_rrset
int parse_copy_decompress_rrset(struct sldns_buffer *pkt, struct msg_parse *msg, struct rrset_parse *pset, struct regional *region, struct ub_packed_rrset_key *pk)
Copy a parsed rrset into given key, decompressing and allocating rdata.
Definition: msgreply.c:375
packed_rrset_key::dname_len
size_t dname_len
Length of the domain name, including last 0 root octet.
Definition: packed_rrset.h:84
sldns_buffer_available_at
INLINE int sldns_buffer_available_at(sldns_buffer *buffer, size_t at, size_t count)
checks if the buffer has at least COUNT more bytes available.
Definition: sbuffer.h:409
val_has_signed_nsecs
int val_has_signed_nsecs(struct reply_info *rep, char **reason)
check if has dnssec info, and if it has signed nsecs.
Definition: val_utils.c:1111
delegpt_add_ns_mlc
int delegpt_add_ns_mlc(struct delegpt *dp, uint8_t *name, uint8_t lame)
add a name to malloced delegation point.
Definition: iter_delegpt.c:579
dname.h
libworker_delete_env
static void libworker_delete_env(struct libworker *w)
delete libworker env
Definition: libworker.c:90
internal_event::base
struct comm_base * base
the comm base
Definition: netevent.c:106
ext_thr_info::tid
ub_thread_type tid
thread id
Definition: asynclook.c:176
sldns_str2wire_int16_data_buf
int sldns_str2wire_int16_data_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_INT16_DATA from string to wireformat.
Definition: str2wire.c:2102
packed_rrset_key::dname
uint8_t * dname
The domain name.
Definition: packed_rrset.h:80
reply_has_nsec
static int reply_has_nsec(struct reply_info *rep)
see if the reply has NSEC records worthy of caching
Definition: val_neg.c:577
autr_permit_small_holddown
int autr_permit_small_holddown
debug and enable small timeouts
Definition: config_file.c:78
fptr_whitelist_serve_expired_lookup
int fptr_whitelist_serve_expired_lookup(serve_expired_lookup_func_type *fptr)
Check function pointer whitelist for serve_expired_lookup func values.
Definition: fptr_wlist.c:680
config_file::harden_algo_downgrade
int harden_algo_downgrade
harden against algorithm downgrade
Definition: config_file.h:260
alloc_stats
void alloc_stats(struct alloc_cache *alloc)
Print debug information (statistics).
Definition: alloc.c:304
readinput
static void readinput(rbtree_type *all, char *file)
read input file
Definition: lock_verify.c:259
fptr_whitelist_comm_timer
int fptr_whitelist_comm_timer(void(*fptr)(void *))
Check function pointer whitelist for comm_timer callback values.
Definition: fptr_wlist.c:127
ub_ctx::next_querynum
int next_querynum
next query number (to try) to use
Definition: context.h:129
delegpt_mark_neg
void delegpt_mark_neg(struct delegpt_ns *ns, uint16_t qtype)
Mark negative return in delegation point for specific nameserver.
Definition: iter_delegpt.c:485
make_scenario
static struct replay_scenario * make_scenario(char *line)
makes scenario with title on rest of line
Definition: replay.c:417
addrtree::delfunc
void(* delfunc)(void *, void *)
External function to delete elem.
Definition: addrtree.h:79
iter_filter_unsuitable
static int iter_filter_unsuitable(struct iter_env *iter_env, struct module_env *env, uint8_t *name, size_t namelen, uint16_t qtype, time_t now, struct delegpt_addr *a)
filter out unsuitable targets
Definition: iter_utils.c:226
config_file::bogus_ttl
int bogus_ttl
this value sets the number of seconds before revalidating bogus
Definition: config_file.h:352
serviced_tcp_initiate
static void serviced_tcp_initiate(struct serviced_query *sq, sldns_buffer *buff)
initiate TCP transaction for serviced query
Definition: outside_network.c:1886
secalgo_nsec3_hash
int secalgo_nsec3_hash(int algo, unsigned char *buf, size_t len, unsigned char *res)
Hash a single hash call of an NSEC3 hash algorithm.
tap_data::ssl
SSL * ssl
the SSL for TLS streams
Definition: unbound-dnstap-socket.c:111
ub_stats_info::mesh_dropped
long long mesh_dropped
mesh stats: number of incoming queries dropped
Definition: unbound.h:812
domain_limit_data::lim
int lim
ratelimit for exact match with this name, -1 if not set
Definition: infra.h:135
iter_get_next_root
int iter_get_next_root(struct iter_hints *hints, struct iter_forwards *fwd, uint16_t *c)
Lookup next root-hint or root-forward entry.
Definition: iter_utils.c:1224
myhash
static hashvalue_type myhash(int id)
hash func, very bad to improve collisions, both high and low bits
Definition: unitslabhash.c:56
replay_moment::repevt_timeout
@ repevt_timeout
timeout
Definition: replay.h:198
repevt_string
static const char * repevt_string(enum replay_event_type t)
Returns a string describing the event type.
Definition: fake_event.c:152
rrsetdata_equal
int rrsetdata_equal(struct packed_rrset_data *d1, struct packed_rrset_data *d2)
compare two rrset data structures.
Definition: packed_rrset.c:146
serviced_query
Query service record.
Definition: outside_network.h:326
resp_addr::taglist
uint8_t * taglist
tag bitlist
Definition: respip.h:39
replay_moment::replay_event_type
replay_event_type
what happens this moment?
Definition: replay.h:190
name_tree_next_root
int name_tree_next_root(rbtree_type *tree, uint16_t *dclass)
Find next root item in name tree.
Definition: dnstree.c:255
auth_zone_write_chunks
static int auth_zone_write_chunks(struct auth_xfer *xfr, const char *fname)
write http chunks to zonefile to create downloaded file
Definition: authzone.c:4878
daemon_remote_create
struct daemon_remote * daemon_remote_create(struct config_file *cfg)
Create new remote control state for the daemon.
Definition: remote.c:198
read_create
static void read_create(rbtree_type *all, FILE *in)
read creation entry
Definition: lock_verify.c:184
mesh_make_new_space
int mesh_make_new_space(struct mesh_area *mesh, sldns_buffer *qbuf)
Make space for another recursion state for a reply in the mesh.
Definition: mesh.c:323
dtio_check_close
static int dtio_check_close(struct dt_io_thread *dtio)
check if the output fd has been closed, it returns false if the stream is closed.
Definition: dtstream.c:976
libworker_enter_result
void libworker_enter_result(struct ub_result *res, struct sldns_buffer *buf, struct regional *temp, enum sec_status msg_security)
fill result from parsed message, on error fills servfail
Definition: libworker.c:495
iter_qstate::caps_fallback
int caps_fallback
state for 0x20 fallback when capsfail happens, 0 not a fallback
Definition: iterator.h:286
testcount
int testcount
number of tests done
Definition: unitmain.c:70
delegpt_add_neg_msg
void delegpt_add_neg_msg(struct delegpt *dp, struct msgreply_entry *msg)
Add negative message to delegation point.
Definition: iter_delegpt.c:497
comm_base_handle_slow_accept
void comm_base_handle_slow_accept(int fd, short event, void *arg)
This routine is published for checks and tests, and is only used internally.
LDNS_RR_CLASS_CH
@ LDNS_RR_CLASS_CH
Chaos class.
Definition: rrdef.h:54
verbosity
enum verbosity_value verbosity
The global verbosity setting.
Definition: log.c:64
receive_bytes
static ssize_t receive_bytes(struct tap_data *data, int fd, void *buf, size_t len)
receive bytes from fd, prints errors if bad, returns 0: closed/error, -1: continue,...
Definition: unbound-dnstap-socket.c:643
rr_test_file
static void rr_test_file(const char *input, const char *check)
read rrs to and from string, and wireformat Skips empty lines and comments.
Definition: unitldns.c:142
autr_point_data::pnode
rbnode_type pnode
rbtree node for probe sort, key is struct trust_anchor
Definition: autotrust.h:94
reply_info::ref
struct rrset_ref ref[1]
Packed array of ids (see counts) and pointers to packed_rrset_key.
Definition: msgreply.h:211
autr_ta::rr
uint8_t * rr
the RR
Definition: autotrust.h:71
config_file::rrset_cache_slabs
size_t rrset_cache_slabs
slabs in the rrset cache
Definition: config_file.h:160
addrtree_size
size_t addrtree_size(const struct addrtree *tree)
Size of tree in bytes.
Definition: addrtree.c:270
dtio_control_stop_flush
static void dtio_control_stop_flush(struct dt_io_thread *dtio)
flush at end, last packet and stop control
Definition: dtstream.c:1698
local_zone_noview
@ local_zone_noview
answer not from the view, but global or no-answer
Definition: localzone.h:100
mesh_state_ref_compare
int mesh_state_ref_compare(const void *ap, const void *bp)
compare two mesh references
Definition: mesh.c:234
auth_probe::scan_addr
struct auth_addr * scan_addr
if not NULL, the specific addr for the current master
Definition: authzone.h:336
mesh_stats_clear
void mesh_stats_clear(struct mesh_area *mesh)
Clear the stats that the mesh keeps (number of queries serviced)
Definition: mesh.c:1751
outside_network::num_tcp_outgoing
size_t num_tcp_outgoing
number of tcp communication points in use.
Definition: outside_network.h:156
slabhash_get_mem
size_t slabhash_get_mem(struct slabhash *sl)
Retrieve slab hash current memory use.
Definition: slabhash.c:169
slabhash_is_size
int slabhash_is_size(struct slabhash *table, size_t size, size_t slabs)
See if slabhash is of given (size, slabs) configuration.
Definition: slabhash.c:156
val_nsec_proves_positive_wildcard
int val_nsec_proves_positive_wildcard(struct ub_packed_rrset_key *nsec, struct query_info *qinf, uint8_t *wc)
Determine if the given NSEC proves a positive wildcard response.
Definition: val_nsec.c:490
errinf_to_str_bogus
char * errinf_to_str_bogus(struct module_qstate *qstate)
Create error info in string.
Definition: config_file.c:2424
if_get_mem
static size_t if_get_mem(struct port_if *pif)
get memory used by port if
Definition: outside_network.c:2466
ub_resolve_event
int ub_resolve_event(struct ub_ctx *ctx, const char *name, int rrtype, int rrclass, void *mydata, ub_event_callback_type callback, int *async_id)
Perform resolution and validation of the target name.
Definition: libunbound.c:724
auth_xfer::namelabs
int namelabs
number of labels in zone name
Definition: authzone.h:211
parse_comments
static int parse_comments(char *str, struct autr_ta *ta)
Parse comments.
Definition: autotrust.c:166
timeval_smaller
static int timeval_smaller(const struct timeval *x, const struct timeval *y)
compare of time values
Definition: replay.c:71
LDNS_RR_CLASS_ANY
@ LDNS_RR_CLASS_ANY
Any class.
Definition: rrdef.h:60
sldns_buffer_new_frm_data
void sldns_buffer_new_frm_data(sldns_buffer *buffer, void *data, size_t size)
creates a buffer with the specified data.
Definition: sbuffer.c:44
setup_comm_ssl
static int setup_comm_ssl(struct comm_point *cp, struct outside_network *outnet, int fd, char *host)
setup SSL for comm point
Definition: outside_network.c:2289
name_tree_insert
int name_tree_insert(rbtree_type *tree, struct name_tree_node *node, uint8_t *name, size_t len, int labs, uint16_t dclass)
insert element into name tree.
Definition: dnstree.c:84
print_rrset
static void print_rrset(struct ub_packed_rrset_key *rrset)
print packed rrset
Definition: unitmsgparse.c:237
outbound_list_init
void outbound_list_init(struct outbound_list *list)
Init the user allocated outbound list structure.
Definition: outbound_list.c:48
read_fetch_policy
static int read_fetch_policy(struct iter_env *ie, const char *str)
Read config string that represents the target fetch policy.
Definition: iter_utils.c:91
ub_c_lex
int ub_c_lex(void)
the lexer function
rate_key
key for ratelimit lookups, a domain name
Definition: infra.h:143
calc_edns_field_size
uint16_t calc_edns_field_size(struct edns_data *edns)
Estimate size of EDNS record in packet.
Definition: msgencode.c:788
dname_is_root
int dname_is_root(uint8_t *dname)
Returns true if the uncompressed wireformat dname is the root ".".
Definition: dname.c:718
edns_opt_list_append
int edns_opt_list_append(struct edns_option **list, uint16_t code, size_t len, uint8_t *data, struct regional *region)
Append edns option to edns option list.
Definition: msgreply.c:974
cfg_gid
gid_t cfg_gid
from cfg username, after daemonize setup performed
Definition: config_file.c:76
listening_ports_open
struct listen_port * listening_ports_open(struct config_file *cfg, int *reuseport)
Create shared listening ports Getaddrinfo, create socket, bind and listen to zero or more interfaces ...
Definition: listen_dnsport.c:1443
dt_io_thread_delete
void dt_io_thread_delete(struct dt_io_thread *dtio)
Delete the IO thread structure.
Definition: dtstream.c:234
alloc_cache::num_quar
size_t num_quar
number of items in quarantine.
Definition: alloc.h:80
edns_data::edns_present
int edns_present
if EDNS OPT record was present
Definition: msgparse.h:217
nsec_proves_nodata
int nsec_proves_nodata(struct ub_packed_rrset_key *nsec, struct query_info *qinfo, uint8_t **wc)
Determine if a NSEC proves the NOERROR/NODATA conditions.
Definition: val_nsec.c:289
delegpt_no_ipv4
void delegpt_no_ipv4(struct delegpt *dp)
Register the fact that there is no ipv4 and thus As are not going to be queried for or be useful.
Definition: iter_delegpt.c:520
libworker_bg_done_cb
void libworker_bg_done_cb(void *arg, int rcode, sldns_buffer *buf, enum sec_status s, char *why_bogus, int was_ratelimited)
mesh callback with bg results
Definition: libworker.c:762
sldns_wire2str_rdata_scan
int sldns_wire2str_rdata_scan(uint8_t **data, size_t *data_len, char **str, size_t *str_len, uint16_t rrtype, uint8_t *pkt, size_t pktlen, int *comprloop)
Scan wireformat rdata to string, with user buffers.
Definition: wire2str.c:703
replay_runtime::now_secs
time_t now_secs
the current time in seconds
Definition: replay.h:302
perform_data_add
static int perform_data_add(RES *ssl, struct local_zones *zones, char *arg)
Add new RR data.
Definition: remote.c:1301
entry::copy_id
uint8_t copy_id
how to adjust the reply packet
Definition: testpkts.h:205
key_entry_setup
static int key_entry_setup(struct regional *region, uint8_t *name, size_t namelen, uint16_t dclass, struct key_entry_key **k, struct key_entry_data **d)
setup key entry in region
Definition: val_kentry.c:256
secure_str
static const char * secure_str(struct ub_result *result)
nice security status string
Definition: unbound-host.c:219
ctx_query::msg_security
enum sec_status msg_security
validation status on security
Definition: context.h:170
trust_anchor::namelen
size_t namelen
length of name
Definition: val_anchor.h:102
config_file::local_zones_nodefault
struct config_strlist * local_zones_nodefault
local zones nodefault list
Definition: config_file.h:397
macro_process
char * macro_process(rbtree_type *store, struct replay_runtime *runtime, char *text)
Apply macro substitution to string.
Definition: replay.c:865
mesh_state::mesh_list_select
mesh_list_select
if this state is in the forever list, jostle list, or neither
Definition: mesh.h:193
views_apply_cfg
int views_apply_cfg(struct views *vs, struct config_file *cfg)
Apply config settings; Takes care of locking.
Definition: view.c:144
worker::thread_num
int thread_num
the thread number (in daemon array).
Definition: worker.h:84
http_header_done
static int http_header_done(sldns_buffer *buf)
return true if http header has been read (one line complete)
Definition: netevent.c:1940
ub_event_base::vmt
struct ub_event_base_vmt * vmt
Virtual Method Table for ub_event_base.
Definition: unbound-event.h:119
LDNS_RR_TYPE_MB
@ LDNS_RR_TYPE_MB
a mailbox domain name (EXPERIMENTAL)
Definition: rrdef.h:97
sldns_wire2str_rcode_print
int sldns_wire2str_rcode_print(char **str, size_t *str_len, int rcode)
Print host format rcode to string.
Definition: wire2str.c:871
neg_nsec3_getnc
static struct ub_packed_rrset_key * neg_nsec3_getnc(struct val_neg_zone *zone, uint8_t *hashnc, size_t nclen, struct rrset_cache *rrset_cache, struct regional *region, time_t now, uint8_t *b32, size_t maxb32)
get next closer for nsec3 proof
Definition: val_neg.c:1316
store_rrset
static void store_rrset(sldns_buffer *pkt, struct msg_parse *msg, struct module_env *env, struct rrset_parse *rrset)
Store potential poison in the cache (only if hardening disabled).
Definition: iter_scrub.c:617
server_stats_prefetch
void server_stats_prefetch(struct ub_server_stats *stats, struct worker *worker)
add query if was cached and also resulted in a prefetch
Definition: stats.c:101
macro_print_debug
void macro_print_debug(rbtree_type *store)
Print macro variables stored as debug info.
Definition: replay.c:900
ipsecmod_whitelist_get_mem
size_t ipsecmod_whitelist_get_mem(rbtree_type *whitelist)
Get memory used by ipsecmod whitelist.
dnscrypt_server_uncurve
static int dnscrypt_server_uncurve(struct dnsc_env *env, const dnsccert *cert, uint8_t client_nonce[crypto_box_HALF_NONCEBYTES], uint8_t nmkey[crypto_box_BEFORENMBYTES], struct sldns_buffer *buffer)
Decrypt a query using the dnsccert that was found using dnsc_find_cert.
Definition: dnscrypt.c:244
dname_test_removelabel
static void dname_test_removelabel(void)
test dname_remove_label
Definition: unitdname.c:461
reply_packet::packet_sleep
unsigned int packet_sleep
seconds to sleep before giving packet
Definition: testpkts.h:161
dname_remove_label
void dname_remove_label(uint8_t **dname, size_t *len)
Snip off first label from a dname, returning the parent zone.
Definition: dname.c:728
myhash
static hashvalue_type myhash(int id)
hash func, very bad to improve collisions
Definition: unitlruhash.c:59
config_view::respip_actions
struct config_str2list * respip_actions
predefined actions for particular IP address responses
Definition: config_file.h:713
internal_event::ev
struct ub_event * ev
ub_event event type
Definition: netevent.c:108
rrset_array_unlock_touch
void rrset_array_unlock_touch(struct rrset_cache *r, struct regional *scratch, struct rrset_ref *ref, size_t count)
Unlock array (sorted) of rrset references and at the same time touch LRU on the rrsets.
Definition: rrset.c:337
msg_grow_array
static int msg_grow_array(struct regional *region, struct dns_msg *msg)
grow rrset array by one in msg
Definition: authzone.c:138
ub_rrset_key_delete
void ub_rrset_key_delete(void *key, void *userdata)
Old key to be deleted.
Definition: packed_rrset.c:128
auth_chunk
auth zone master zone transfer data chunk
Definition: authzone.h:455
replay_moment_delete
static void replay_moment_delete(struct replay_moment *mom)
delete moment
Definition: replay.c:103
rrset_cache_lookup
struct ub_packed_rrset_key * rrset_cache_lookup(struct rrset_cache *r, uint8_t *qname, size_t qnamelen, uint16_t qtype, uint16_t qclass, uint32_t flags, time_t timenow, int wr)
Lookup rrset.
Definition: rrset.c:275
dtio_close_fd
static void dtio_close_fd(struct dt_io_thread *dtio)
close dtio socket and set it to -1
Definition: dtstream.c:588
ipsecmod_whitelist_delete
void ipsecmod_whitelist_delete(rbtree_type *whitelist)
Delete the ipsecmod whitelist.
ub_server_stats::extended
int extended
Extended stats below (bool)
Definition: unbound.h:682
ub_event_base_vmt
The Virtual Method Table for and ub_event_base "object".
Definition: unbound-event.h:87
subnetmod_init
int subnetmod_init(struct module_env *env, int id)
subnet module init
sldns_str2wire_wks_buf
int sldns_str2wire_wks_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_WKS from string to wireformat.
Definition: str2wire.c:1704
key_entry_isnull
int key_entry_isnull(struct key_entry_key *kkey)
See if this is a null entry.
Definition: val_kentry.c:220
comm_timer_is_set
int comm_timer_is_set(struct comm_timer *timer)
see if timeout has been set to a value.
Definition: netevent.c:3358
val_neg_cache::nsec3_max_iter
size_t nsec3_max_iter
max nsec3 iterations allowed
Definition: val_neg.h:82
module_factory
struct module_func_block * module_factory(const char **str)
Get funcblock for module name.
Definition: modstack.c:203
dtio_write_more
static int dtio_write_more(struct dt_io_thread *dtio)
write more of the current messsage.
Definition: dtstream.c:873
regional_alloc_init
void * regional_alloc_init(struct regional *r, const void *init, size_t size)
Allocate size bytes of memory inside regional and copy INIT into it.
Definition: regional.c:162
alloc_init
void alloc_init(struct alloc_cache *alloc, struct alloc_cache *super, int thread_num)
Init alloc (zeroes the struct).
Definition: alloc.c:103
view_delete
void view_delete(struct view *v)
Delete one view.
Definition: view.c:74
rrset_cache_delete
void rrset_cache_delete(struct rrset_cache *r)
Delete rrset cache.
Definition: rrset.c:73
val_verify_DNSKEY_with_DS
enum sec_status val_verify_DNSKEY_with_DS(struct module_env *env, struct val_env *ve, struct ub_packed_rrset_key *dnskey_rrset, struct ub_packed_rrset_key *ds_rrset, uint8_t *sigalg, char **reason, struct module_qstate *qstate)
Verify DNSKEYs with DS rrset.
Definition: val_utils.c:483
rrset_trust_add_noAA
@ rrset_trust_add_noAA
Additional information from non-authoritative answers.
Definition: packed_rrset.h:144
nsec3_get_hashed
size_t nsec3_get_hashed(sldns_buffer *buf, uint8_t *nm, size_t nmlen, int algo, size_t iter, uint8_t *salt, size_t saltlen, uint8_t *res, size_t max)
Get NSEC3 hashed in a buffer.
Definition: val_nsec3.c:536
test_short_table
static void test_short_table(struct lruhash *table)
test hashtable using short sequence
Definition: unitlruhash.c:209
timehist_delete
void timehist_delete(struct timehist *hist)
Delete histogram.
Definition: timehist.c:102
rrset_key_hash
hashvalue_type rrset_key_hash(struct packed_rrset_key *key)
Calculate hash value for a packed rrset key.
Definition: packed_rrset.c:163
fptr_whitelist_modenv_attach_sub
int fptr_whitelist_modenv_attach_sub(int(*fptr)(struct module_qstate *qstate, struct query_info *qinfo, uint16_t qflags, int prime, int valrec, struct module_qstate **newq))
Check function pointer whitelist for module_env attach_sub callback values.
Definition: fptr_wlist.c:354
sldns_wire2str_edns_ul_print
int sldns_wire2str_edns_ul_print(char **str, size_t *str_len, uint8_t *option_data, size_t option_len)
Print EDNS UL option data to string.
Definition: wire2str.c:1782
view::isfirst
int isfirst
Fallback to global local_zones when there is no match in the view specific tree.
Definition: view.h:79
auth_transfer::master
struct auth_master * master
the zone transfer in progress (or NULL if in scan).
Definition: authzone.h:388
dt_io_thread::reconnect_is_added
int reconnect_is_added
if the reconnect timer is added to the event base
Definition: dtstream.h:183
warn_hosts
static void warn_hosts(const char *typ, struct config_stub *list)
emit warnings for IP in hosts
Definition: unbound-checkconf.c:310
respip_get_mem
size_t respip_get_mem(struct module_env *env, int id)
response-ip alloc size routine
Definition: respip.c:1264
service_cmdline_verbose
static int service_cmdline_verbose
commandline verbosity.
Definition: win_svc.c:70
tap_socket::ev
struct ub_event * ev
the event for it
Definition: unbound-dnstap-socket.c:145
sumtrees_all
static size_t sumtrees_all(struct val_neg_cache *neg)
sum up the zone trees
Definition: unitneg.c:310
sldns_strip_ws
char * sldns_strip_ws(char *line)
Strip whitespace from the start and the end of line.
Definition: str2wire.c:849
do_macro_ctime
static char * do_macro_ctime(char *arg)
do ctime macro on argument
Definition: replay.c:687
config_file::outgoing_num_tcp
size_t outgoing_num_tcp
number of outgoing tcp buffers per (per thread)
Definition: config_file.h:137
tcl_list_apply_cfg
int tcl_list_apply_cfg(struct tcl_list *tcl, struct config_file *cfg)
Process TCP connection limit config.
Definition: tcp_conn_limit.c:144
dname_valid
size_t dname_valid(uint8_t *dname, size_t len)
Determine if dname in memory is correct.
Definition: dname.c:74
config_file::local_zone_overrides
struct config_str3list * local_zone_overrides
local zone override types per netblock
Definition: config_file.h:407
S_UNSIGNED_OR_ZERO
#define S_UNSIGNED_OR_ZERO(str, var)
put integer_or_zero into unsigned
Definition: config_file.c:403
ldns_test
void ldns_test(void)
unit test for ldns functions
Definition: unitldns.c:224
cfg_mark_ports
int cfg_mark_ports(const char *str, int allow, int *avail, int num)
Mark "number" or "low-high" as available or not in ports array.
Definition: config_file.c:1545
iter_hints_stub
Iterator hints for a particular stub.
Definition: iter_hints.h:68
az_generate_dname_answer
static int az_generate_dname_answer(struct auth_zone *z, struct query_info *qinfo, struct regional *region, struct dns_msg *msg, struct auth_data *ce, struct auth_rrset *rrset)
generate answer for DNAME answer
Definition: authzone.c:3028
dname_count_size_labels
int dname_count_size_labels(uint8_t *dname, size_t *size)
Count labels and dname length both, for uncompressed dname in memory.
Definition: dname.c:446
comm_point::comm_point_type
comm_point_type
is this a UDP, TCP-accept or TCP socket.
Definition: netevent.h:225
packed_rrset_sizeof
size_t packed_rrset_sizeof(struct packed_rrset_data *data)
Memory size of rrset data.
Definition: packed_rrset.c:80
LDNS_RR_TYPE_SSHFP
@ LDNS_RR_TYPE_SSHFP
SSH Key Fingerprint.
Definition: rrdef.h:171
replay_moment::repevt_nothing
@ repevt_nothing
nothing happens, as if this event is not there.
Definition: replay.h:192
log_pkt
static void log_pkt(const char *desc, uint8_t *pkt, size_t len)
helper function that logs a sldns_pkt packet to logfile
Definition: fake_event.c:137
mesh_reply::next
struct mesh_reply * next
next in reply list
Definition: mesh.h:218
MAX_RESTART_COUNT
#define MAX_RESTART_COUNT
max number of query restarts.
Definition: iterator.h:64
delegpt_add_addr
int delegpt_add_addr(struct delegpt *dp, struct regional *regional, struct sockaddr_storage *addr, socklen_t addrlen, uint8_t bogus, uint8_t lame, char *tls_auth_name, int *additions)
Add address to the delegation point.
Definition: iter_delegpt.c:184
set_recvpktinfo
static int set_recvpktinfo(int s, int family)
set fd to receive source address packet info
Definition: listen_dnsport.c:1112
ssl_print_name_dp
static int ssl_print_name_dp(RES *ssl, const char *str, uint8_t *nm, uint16_t dclass, struct delegpt *dp)
printout a delegation point info
Definition: remote.c:1941
waiting_list_remove
static void waiting_list_remove(struct outside_network *outnet, struct waiting_tcp *w)
remove waiting tcp from the outnet waiting list
Definition: outside_network.c:1491
LDNS_RDF_TYPE_TAG
@ LDNS_RDF_TYPE_TAG
A non-zero sequence of US-ASCII letters and numbers in lower case.
Definition: rrdef.h:344
rc_state::rc
struct daemon_remote * rc
the rc this is part of
Definition: remote.h:79
rtt_info::srtt
int srtt
smoothed rtt estimator, in milliseconds
Definition: rtt.h:51
attach_edns_record
void attach_edns_record(sldns_buffer *pkt, struct edns_data *edns)
Attach EDNS record to buffer.
Definition: msgencode.c:802
libworker_delete_event
void libworker_delete_event(struct libworker *w)
delete worker for event-based interface.
Definition: libworker.c:121
config_parser_state::line
int line
line number in the file, starts at 1
Definition: config_file.h:1205
testfromfile
static void testfromfile(sldns_buffer *pkt, struct alloc_cache *alloc, sldns_buffer *out, const char *fname)
simple test of parsing, pcat file
Definition: unitmsgparse.c:440
skipwhite
static char * skipwhite(char *str)
skip whitespace, return new pointer into string
Definition: remote.c:662
config_collate_cat
char * config_collate_cat(struct config_strlist *list)
take a strlist_head list and return a malloc string.
Definition: config_file.c:802
RRSET_ROUNDROBIN
int RRSET_ROUNDROBIN
rrset order roundrobin: default is yes
Definition: net_help.c:74
config_strbytelist::str2
uint8_t * str2
second bytestring
Definition: config_file.h:764
perfinfo::io_num
size_t io_num
number of I/O ports
Definition: perf.c:110
process_keys
static void process_keys(int argc, char *argv[])
process keys and signit
Definition: signit.c:218
saved_scenario
static struct replay_scenario * saved_scenario
Global variable: the scenario.
Definition: fake_event.c:94
verify_dnskey
static int verify_dnskey(struct module_env *env, struct val_env *ve, struct trust_anchor *tp, struct ub_packed_rrset_key *rrset, struct module_qstate *qstate)
Verify if dnskey works for trust point.
Definition: autotrust.c:1251
print_packet_rrsets
static void print_packet_rrsets(struct query_info *qinfo, struct reply_info *rep)
debug print a packet that failed
Definition: unitmsgparse.c:253
config_file::views
struct config_view * views
the views definitions, linked list
Definition: config_file.h:216
dns64_clear
void dns64_clear(struct module_qstate *qstate, int id)
Clear module-specific data from query state.
Definition: dns64.c:996
val_kcache.h
daemon::views
struct views * views
views structure containing view tree
Definition: daemon.h:125
auth_xfer_pickup_initial
void auth_xfer_pickup_initial(struct auth_zones *az, struct module_env *env)
initial pick up of worker timeouts, ties events to worker event loop
Definition: authzone.c:6655
packed_rrset_data::rr_len
size_t * rr_len
length of every rr's rdata, rr_len[i] is size of rr_data[i].
Definition: packed_rrset.h:248
check_dates
static int check_dates(struct val_env *ve, uint32_t unow, uint8_t *expi_p, uint8_t *incep_p, char **reason)
check rrsig dates
Definition: val_sigcrypt.c:1268
do_zone_remove
static void do_zone_remove(RES *ssl, struct local_zones *zones, char *arg)
Do the local_zone_remove command.
Definition: remote.c:1273
val_qstate::subtype
enum val_classification subtype
subtype
Definition: validator.h:211
iter_state_is_responsestate
int iter_state_is_responsestate(enum iter_state s)
See if iterator state is a response state.
Definition: iterator.c:3982
fptr_whitelist_inplace_cb_reply_generic
int fptr_whitelist_inplace_cb_reply_generic(inplace_cb_reply_func_type *fptr, enum inplace_cb_list_type type)
Check function pointer whitelist for inplace_cb_reply, inplace_cb_reply_cache, inplace_cb_reply_local...
Definition: fptr_wlist.c:592
nsec3_prove_nods
enum sec_status nsec3_prove_nods(struct module_env *env, struct val_env *ve, struct ub_packed_rrset_key **list, size_t num, struct query_info *qinfo, struct key_entry_key *kkey, char **reason, struct module_qstate *qstate)
Prove that a DS response either had no DS, or wasn't a delegation point.
Definition: val_nsec3.c:1317
dnskey_get_algo
int dnskey_get_algo(struct ub_packed_rrset_key *k, size_t idx)
Get DNSKEY RR signature algorithm.
Definition: val_sigcrypt.c:178
ring_empty
static int ring_empty(struct ringbuf *r)
see if the ringbuffer is empty
Definition: delayer.c:287
sldns_wirerr_get_rdata
uint8_t * sldns_wirerr_get_rdata(uint8_t *rr, size_t len, size_t dname_len)
Get the rdata pointer of the RR.
Definition: str2wire.c:826
xfer_set_masters
int xfer_set_masters(struct auth_master **list, struct config_auth *c, int with_http)
Set masters in auth xfer structure from config.
Definition: authzone.c:6917
tube::listen_com
struct comm_point * listen_com
listen commpoint
Definition: tube.h:71
NETEVENT_CAPSFAIL
#define NETEVENT_CAPSFAIL
to pass fallback from capsforID to callback function; 0x20 failed
Definition: netevent.h:87
track_id::cancel
int cancel
true if cancelled
Definition: asynclook.c:74
LDNS_MAX_DOMAINLEN
#define LDNS_MAX_DOMAINLEN
Maximum length of a complete dname.
Definition: rrdef.h:29
prime_trust_anchor
static int prime_trust_anchor(struct module_qstate *qstate, struct val_qstate *vq, int id, struct trust_anchor *toprime)
Prime trust anchor for use.
Definition: validator.c:532
autr_ta::pending_count
uint8_t pending_count
pending count
Definition: autotrust.h:79
pythonmod_env::qstate
struct module_qstate * qstate
Module qstate.
Definition: pythonmod.c:103
sldns_buffer_status
INLINE int sldns_buffer_status(sldns_buffer *buffer)
returns the status of the buffer
Definition: sbuffer.h:703
module_func_block::deinit
void(* deinit)(struct module_env *env, int id)
de-init, delete, the module.
Definition: module.h:689
tcp_req_info
TCP request info.
Definition: listen_dnsport.h:246
infra_key::addr
struct sockaddr_storage addr
the host address.
Definition: infra.h:60
az_parse_file
static int az_parse_file(struct auth_zone *z, FILE *in, uint8_t *rr, size_t rrbuflen, struct sldns_file_parse_state *state, char *fname, int depth, struct config_file *cfg)
Parse zonefile.
Definition: authzone.c:1471
UB_FORKFAIL
@ UB_FORKFAIL
fork() failed
Definition: context.h:195
ub_server_stats::rpz_action
long long rpz_action[UB_STATS_RPZ_ACTION_NUM]
RPZ action stats.
Definition: unbound.h:793
val_classification_to_string
const char * val_classification_to_string(enum val_classification subtype)
Get string to denote the classification result.
Definition: val_utils.c:1062
main
int main(int argc, char **argv)
main program to create queries, pass the number of them.
Definition: makeqs.c:8
config_file::harden_referral_path
int harden_referral_path
harden the referral path, query for NS,A,AAAA and validate
Definition: config_file.h:258
config_file::val_clean_additional
int val_clean_additional
should validator clean additional section for secure msgs
Definition: config_file.h:354
regional::data
char * data
current chunk data position.
Definition: regional.h:76
construct_reply_info_base
struct reply_info * construct_reply_info_base(struct regional *region, uint16_t flags, size_t qd, time_t ttl, time_t prettl, time_t expttl, size_t an, size_t ns, size_t ar, size_t total, enum sec_status sec)
Constructor for replyinfo.
Definition: msgreply.c:93
cfg_count_numbers
int cfg_count_numbers(const char *s)
Count number of values in the string.
Definition: config_file.c:1833
has_additional
static int has_additional(uint16_t t)
return true if rr type has additional names in it
Definition: iter_scrub.c:91
do_data_add
static void do_data_add(RES *ssl, struct local_zones *zones, char *arg)
Do the local_data command.
Definition: remote.c:1312
handle_event_pass
static enum module_ext_state handle_event_pass(struct module_qstate *qstate, int id)
Handles the "pass" event for a query.
Definition: dns64.c:568
dt_msg_queue::cursize
size_t cursize
current size of the buffer, in bytes.
Definition: dtstream.h:70
fd_set_block
int fd_set_block(int s)
Set fd (back to) blocking.
Definition: net_help.c:145
config_file::forwards
struct config_stub * forwards
the forward zone definitions, linked list
Definition: config_file.h:212
swap_int8
static void swap_int8(uint8_t *x, uint8_t *y)
helpers for delete: swap node colours
Definition: rbtree.c:293
LDNS_RR_TYPE_NINFO
@ LDNS_RR_TYPE_NINFO
draft-reid-dnsext-zs
Definition: rrdef.h:189
rrinternal_spool_hex
static int rrinternal_spool_hex(char *token, uint8_t *rr, size_t rr_len, size_t rr_cur_len, size_t *cur_hex_data_size, size_t hex_data_size)
spool hex data into rdata
Definition: str2wire.c:391
outbound_entry::qsent
struct serviced_query * qsent
The query that was sent out.
Definition: outbound_list.h:67
slabhash_remove
void slabhash_remove(struct slabhash *table, hashvalue_type hash, void *key)
Remove entry from hashtable.
Definition: slabhash.c:128
mesh_state::next
struct mesh_state * next
next in linked list for reply states
Definition: mesh.h:191
dname_test_isroot
static void dname_test_isroot(void)
test dname_is_root
Definition: unitdname.c:448
entry::match_all
uint8_t match_all
match all of the packet
Definition: testpkts.h:186
lz_enter_zones
static int lz_enter_zones(struct local_zones *zones, struct config_file *cfg)
parse local-zone: statements
Definition: localzone.c:701
cron_was_quick
static int cron_was_quick
if cron has already done its quick check
Definition: win_svc.c:76
cfg_strlist_append_ex
int cfg_strlist_append_ex(struct config_strlist **head, char *item)
Searches the end of a string list and appends the given text.
Definition: config_file.c:1725
nth_rtt
static int nth_rtt(struct delegpt_addr *result_list, size_t num_results, size_t n)
get RTT for the Nth fastest server
Definition: iter_utils.c:326
addr_tree_init_parents_node
void addr_tree_init_parents_node(struct addr_tree_node *node)
Initialize parent pointers in partial addr tree.
Definition: dnstree.c:107
auth_probe
The probe task.
Definition: authzone.h:309
acl_view_tag_checks
static void acl_view_tag_checks(struct config_file *cfg, struct views *views)
checks for acl and views
Definition: unbound-checkconf.c:200
fake_timer::runtime
struct replay_runtime * runtime
the runtime structure this is part of
Definition: replay.h:383
comm_base_create
struct comm_base * comm_base_create(int sigs)
Create a new comm base.
Definition: netevent.c:160
fstrm_create_control_frame_ready
void * fstrm_create_control_frame_ready(char *contenttype, size_t *len)
This creates an FSTRM control frame of type READY.
Definition: dnstap_fstrm.c:95
rrset_create
static struct auth_rrset * rrset_create(struct auth_data *node, uint16_t rr_type, uint32_t rr_ttl, uint8_t *rdata, size_t rdatalen)
Create new rrset for node with packed rrset with one RR element.
Definition: authzone.c:860
server_stats_insrcode
void server_stats_insrcode(struct ub_server_stats *stats, struct sldns_buffer *buf)
Add rcode for this query.
Definition: stats.c:514
LDNS_RR_TYPE_HINFO
@ LDNS_RR_TYPE_HINFO
host information
Definition: rrdef.h:109
edns_bypass_cache_stage
int edns_bypass_cache_stage(struct edns_option *list, struct module_env *env)
Check if an edns option needs to bypass the reply from cache stage.
Definition: module.c:194
tube::res_write
size_t res_write
are we currently writing a result, 0 if not, else bytecount into the res_list first entry.
Definition: tube.h:87
iter_qstate::qinfo_out
struct query_info qinfo_out
The query info that is sent upstream.
Definition: iterator.h:391
nsec3_hash_cmp
int nsec3_hash_cmp(const void *c1, const void *c2)
Rbtree for hash cache comparison function.
Definition: val_nsec3.c:496
infra_key::entry
struct lruhash_entry entry
hash table entry, data of type infra_data.
Definition: infra.h:68
outnet_serviced_query
struct serviced_query * outnet_serviced_query(struct outside_network *outnet, struct query_info *qinfo, uint16_t flags, int dnssec, int want_dnssec, int nocaps, int tcp_upstream, int ssl_upstream, char *tls_auth_name, struct sockaddr_storage *addr, socklen_t addrlen, uint8_t *zone, size_t zonelen, struct module_qstate *qstate, comm_point_callback_type *callback, void *callback_arg, struct sldns_buffer *buff, struct module_env *env)
Perform a serviced query to the authoritative servers.
Definition: outside_network.c:2104
dstest_entry
static void dstest_entry(struct entry *e, struct alloc_cache *alloc, struct regional *region, sldns_buffer *pkt, struct module_env *env)
DS sig test an entry - get DNSKEY and DS in entry and verify.
Definition: unitverify.c:245
ub_server_stats::qtype
long long qtype[UB_STATS_QTYPE_NUM]
qtype stats
Definition: unbound.h:685
fname_after_chroot
char * fname_after_chroot(const char *fname, struct config_file *cfg, int use_chdir)
Convert a filename to full pathname in original filesys.
Definition: config_file.c:2116
auth_zone::dclass
uint16_t dclass
the class of this zone, in host byteorder.
Definition: authzone.h:108
testadd_unlim
static void testadd_unlim(struct lruhash *table, testdata_type **ref)
test adding a random element (unlimited range)
Definition: unitlruhash.c:313
matchline
static void matchline(char *line, struct entry *e)
parse MATCH line
Definition: testpkts.c:111
sldns_parse_char
int sldns_parse_char(uint8_t *ch_p, const char **str_p)
Parse one character, with escape codes,.
Definition: parseutil.c:318
acl_list_tags_cfg
static int acl_list_tags_cfg(struct acl_list *acl, const char *str, uint8_t *bitmap, size_t bitmaplen)
apply acl_tag string
Definition: acl_list.c:160
mesh_state::cb_list
struct mesh_cb * cb_list
the list of callbacks for the results
Definition: mesh.h:178
rrset_markdel
void rrset_markdel(void *key)
mark rrset to be deleted, set id=0
Definition: rrset.c:53
edns_opt_list_find
struct edns_option * edns_opt_list_find(struct edns_option *list, uint16_t code)
Find edns option in edns list.
Definition: msgreply.c:1251
local_zones_apply_cfg
int local_zones_apply_cfg(struct local_zones *zones, struct config_file *cfg)
Apply config settings; setup the local authoritative data.
Definition: localzone.c:1052
edns_known_option::no_aggregation
int no_aggregation
whether the option needs mesh aggregation
Definition: module.h:221
mesh_delete
void mesh_delete(struct mesh_area *mesh)
Delete mesh, and all query states and replies in it.
Definition: mesh.c:291
waitforubanchor
static void waitforubanchor(PROCESS_INFORMATION *pinfo)
wait for unbound-anchor process to finish
Definition: win_svc.c:237
generate_sub_request
static int generate_sub_request(uint8_t *qname, size_t qnamelen, uint16_t qtype, uint16_t qclass, struct module_qstate *qstate, int id, struct iter_qstate *iq, enum iter_state initial_state, enum iter_state finalstate, struct module_qstate **subq_ret, int v, int detached)
Generate a subrequest.
Definition: iterator.c:680
auth_zones_lookup
int auth_zones_lookup(struct auth_zones *az, struct query_info *qinfo, struct regional *region, struct dns_msg **msg, int *fallback, uint8_t *dp_nm, size_t dp_nmlen)
Use auth zones to lookup the answer to a query.
Definition: authzone.c:3240
comm_reply::max_udp_size
size_t max_udp_size
max udp size for udp packets
Definition: netevent.h:143
sldns_wire2str_opcode_buf
int sldns_wire2str_opcode_buf(int opcode, char *str, size_t len)
Convert host format opcode to a string.
Definition: wire2str.c:305
regional_strdup
char * regional_strdup(struct regional *r, const char *string)
Duplicate string and allocate the result in regional.
Definition: regional.c:180
ub_rrset_compare
int ub_rrset_compare(void *k1, void *k2)
compares two rrset keys.
Definition: packed_rrset.c:95
fptr_whitelist_mesh_cb
int fptr_whitelist_mesh_cb(mesh_cb_func_type fptr)
Check function pointer whitelist for mesh state callback values.
Definition: fptr_wlist.c:573
auth_xfer_transfer_tcp_callback
int auth_xfer_transfer_tcp_callback(struct comm_point *c, void *arg, int err, struct comm_reply *repinfo)
callback for task_transfer tcp connections
dnsc_shared_secrets_lookup
static struct lruhash_entry * dnsc_shared_secrets_lookup(struct slabhash *cache, uint8_t key[DNSCRYPT_SHARED_SECRET_KEY_LENGTH], uint32_t hash)
Lookup a record in shared_secrets_cache.
Definition: dnscrypt.c:143
config_file::ip_freebind
int ip_freebind
IP_FREEBIND socket option request on port 53 sockets.
Definition: config_file.h:192
comm_point_udp_ancil_callback
void comm_point_udp_ancil_callback(int fd, short event, void *arg)
This routine is published for checks and tests, and is only used internally.
Definition: netevent.c:583
dt_io_thread_start
int dt_io_thread_start(struct dt_io_thread *dtio, void *event_base_nothr, int numworkers)
Start the io thread.
Definition: dtstream.c:2054
dtio_desetup
static void dtio_desetup(struct dt_io_thread *dtio)
perform desetup and free stuff when the dnstap io thread exits
Definition: dtstream.c:1789
rc_state::fd
int fd
file descriptor
Definition: remote.h:77
sldns_wirerr_get_type
uint16_t sldns_wirerr_get_type(uint8_t *rr, size_t len, size_t dname_len)
Get the type of the RR.
Definition: str2wire.c:798
tcl_list_get_mem
size_t tcl_list_get_mem(struct tcl_list *tcl)
Get memory used by TCP connection limit structure.
Definition: tcp_conn_limit.c:190
go
static int go(const char *cfgfile, char *svr, int quiet, int argc, char *argv[])
go ahead and read config, contact server and perform command and display
Definition: unbound-control.c:800
listen_sslctx_delete_ticket_keys
void listen_sslctx_delete_ticket_keys(void)
Free memory used for TLS session ticket keys.
Definition: net_help.c:1541
respip_inform_super
void respip_inform_super(struct module_qstate *qstate, int id, struct module_qstate *super)
inform response-ip super
Definition: respip.c:1223
delegpt_ns::name
uint8_t * name
name of nameserver
Definition: iter_delegpt.h:99
reply_with_accept
static int reply_with_accept(struct tap_data *data)
reply with ACCEPT control frame to bidirectional client, returns 0 on error
Definition: unbound-dnstap-socket.c:773
rate_deldatafunc
void rate_deldatafunc(void *d, void *arg)
delete data
key_entry_key
A key entry for the validator.
Definition: val_kentry.h:55
EDNS_DO
#define EDNS_DO
bits for EDNS bitfield
Definition: net_help.h:86
sldns_struct_rr_descriptor::_type
sldns_rr_type _type
Type of the RR that is described here.
Definition: rrdef.h:452
local_zone_enter_rr
int local_zone_enter_rr(struct local_zone *z, uint8_t *nm, size_t nmlen, int nmlabs, uint16_t rrtype, uint16_t rrclass, time_t ttl, uint8_t *rdata, size_t rdata_len, const char *rrstr)
Add RR to local zone.
Definition: localzone.c:467
val_apply_cfg
static int val_apply_cfg(struct module_env *env, struct val_env *val_env, struct config_file *cfg)
apply config settings to validator
Definition: validator.c:113
init_parents
static void init_parents(struct local_zones *zones)
setup parent pointers, so that a lookup can be done for closest match
Definition: localzone.c:893
val_utils.h
auth_zone::zone_deleted
int zone_deleted
zone has been deleted
Definition: authzone.h:138
inplace_cb
Inplace callback list of registered routines to be called.
Definition: module.h:227
addrnode::edge
struct addredge * edge[2]
A node can have 0-2 edges, set to NULL for unused.
Definition: addrtree.h:99
entry::match_subdomain
uint8_t match_subdomain
match qname as subdomain of answer qname
Definition: testpkts.h:182
timehist::buckets
struct th_buck * buckets
bucket array
Definition: timehist.h:67
fd_set_block
int fd_set_block(int s)
Set fd (back to) blocking.
Definition: net_help.c:145
delegpt_count_missing_targets
size_t delegpt_count_missing_targets(struct delegpt *dp)
Count number of missing targets.
Definition: iter_delegpt.c:326
chunk_rrlist_end
static int chunk_rrlist_end(struct auth_chunk *rr_chunk, int rr_num)
RR list iterator, see if we are at the end of the list.
Definition: authzone.c:4426
replay_moment::addr
struct sockaddr_storage addr
address that must be matched, or packet remote host address.
Definition: replay.h:228
dt_io_thread::is_bidirectional
int is_bidirectional
Perform bidirectional Frame Streams handshake before sending messages.
Definition: dtstream.h:200
auth_transfer::rr_scan_num
size_t rr_scan_num
number of RRs scanned for AXFR/IXFR detection
Definition: authzone.h:404
service_stop_shutdown
static int service_stop_shutdown
if stop even means shutdown or restart
Definition: win_svc.c:66
reply_check_cname_chain
int reply_check_cname_chain(struct query_info *qinfo, struct reply_info *rep)
Check if cname chain in cached reply is still valid.
Definition: msgreply.c:890
FSTRM_CONTROL_FRAME_FINISH
#define FSTRM_CONTROL_FRAME_FINISH
control frame value to denote the control frame FINISH
Definition: dnstap_fstrm.h:108
cfg_str3list_insert
int cfg_str3list_insert(struct config_str3list **head, char *item, char *i2, char *i3)
Insert string into str3list.
Definition: config_file.c:1772
testlookup_unlim
static void testlookup_unlim(struct lruhash *table, testdata_type **ref)
test adding a random element (unlimited range)
Definition: unitlruhash.c:338
verb
static int verb
verbose?
Definition: lock_verify.c:104
get_serial
static uint32_t get_serial(uint8_t *p, size_t plen)
get authority section SOA serial value
Definition: testpkts.c:766
delegpt_set_name_mlc
int delegpt_set_name_mlc(struct delegpt *dp, uint8_t *name)
Set name of delegation point.
Definition: iter_delegpt.c:571
pending_matches_range
static int pending_matches_range(struct replay_runtime *runtime, struct entry **entry, struct fake_pending **pend)
See if outgoing pending query matches an entry.
Definition: fake_event.c:268
dt_io_thread::ssl_brief_read
int ssl_brief_read
true if briefly the SSL wants a read event, 0 if not.
Definition: dtstream.h:153
mesh_state_ref::node
rbnode_type node
node in rbtree for set, key is this structure
Definition: mesh.h:208
sldns_wire2str_aaaa_scan
int sldns_wire2str_aaaa_scan(uint8_t **d, size_t *dl, char **s, size_t *sl)
Scan wireformat ip6 AAAA field to string, with user buffers.
Definition: wire2str.c:1104
https
static BIO * https(struct ip_list *ip_list, const char *pathname, const char *urlname, struct ip_list *src, int use_sni)
Do a HTTPS, HTTP1.1 over TLS, to fetch a file.
Definition: unbound-anchor.c:1170
LDNS_RR_TYPE_AAAA
@ LDNS_RR_TYPE_AAAA
ipv6 address
Definition: rrdef.h:139
authzone_compare_serial
static void authzone_compare_serial(void)
Test authzone compare_serial.
Definition: unitauth.c:859
worker_handle_control_cmd
void worker_handle_control_cmd(struct tube *tube, uint8_t *msg, size_t len, int error, void *arg)
process control messages from the main thread.
scrub_message
int scrub_message(struct sldns_buffer *pkt, struct msg_parse *msg, struct query_info *qinfo, uint8_t *zonename, struct regional *regional, struct module_env *env, struct iter_env *ie)
Cleanup the passed dns message.
Definition: iter_scrub.c:806
sldns_wire2str_dname
char * sldns_wire2str_dname(uint8_t *dname, size_t dname_len)
Conver wire dname to a string.
Definition: wire2str.c:231
print_rd
static void print_rd(int t, char *data, size_t len)
convert and print rdata
Definition: unbound-host.c:256
errors_detected
static int errors_detected
count of errors detected
Definition: lock_verify.c:102
adjust_packet
void adjust_packet(struct entry *match, uint8_t **answer_pkt, size_t *answer_len, uint8_t *query_pkt, size_t query_len)
copy & adjust packet, mallocs a copy.
Definition: testpkts.c:1517
sldns_wire2str_class
char * sldns_wire2str_class(uint16_t rrclass)
Convert wire RR class to a string, 'IN', 'CLASS1'.
Definition: wire2str.c:224
sldns_wire2str_int32_scan
int sldns_wire2str_int32_scan(uint8_t **d, size_t *dl, char **s, size_t *sl)
Scan wireformat int32 field to string, with user buffers.
Definition: wire2str.c:1047
ipset_clear
void ipset_clear(struct module_qstate *qstate, int id)
clear the ipset query-specific contents out of qstate
Definition: ipset.c:350
ub_server_stats::num_query_authzone_up
long long num_query_authzone_up
number of queries for unbound's auth_zones, upstream query
Definition: unbound.h:774
sldns_algorithms
sldns_lookup_table * sldns_algorithms
Taken from RFC 2535, section 7.
Definition: wire2str.c:58
dns.h
UB_LIBCMD_ANSWER
@ UB_LIBCMD_ANSWER
Query result, originates from bg worker.
Definition: context.h:224
secalgo_hash_sha256
void secalgo_hash_sha256(unsigned char *buf, size_t len, unsigned char *res)
Calculate the sha256 hash for the data buffer into the result.
order_lock::create_line
int create_line
creation line
Definition: lock_verify.c:77
az_generate_any_answer
static int az_generate_any_answer(struct auth_zone *z, struct regional *region, struct dns_msg *msg, struct auth_data *node)
generate answer for type ANY answer
Definition: authzone.c:2899
config_file::tls_use_sni
int tls_use_sni
if SNI is to be used
Definition: config_file.h:132
config_view::isfirst
int isfirst
Fallback to global local_zones when there is no match in the view view specific tree.
Definition: config_file.h:711
waiting_tcp::ssl_upstream
int ssl_upstream
if it uses ssl upstream
Definition: outside_network.h:298
main
int main(int argc, char *argv[])
Main unit test program.
Definition: unitmain.c:862
adjust_packet
void adjust_packet(struct entry *match, uint8_t **answer_pkt, size_t *answer_pkt_len, uint8_t *query_pkt, size_t query_pkt_len)
copy & adjust packet, mallocs a copy.
Definition: testpkts.c:1517
reply_equal
int reply_equal(struct reply_info *p, struct reply_info *q, struct regional *region)
Check if two replies are equal For fallback procedures.
Definition: iter_utils.c:967
auth_transfer::chunks_first
struct auth_chunk * chunks_first
xfer data that has been transferred, the data is applied once the transfer has completed correctly
Definition: authzone.h:365
edns_opt_append
int edns_opt_append(struct edns_data *edns, struct regional *region, uint16_t code, size_t len, uint8_t *data)
Append edns option to edns data structure.
Definition: msgreply.c:946
comm_point_send_udp_msg_if
static int comm_point_send_udp_msg_if(struct comm_point *c, sldns_buffer *packet, struct sockaddr *addr, socklen_t addrlen, struct comm_reply *r)
send a UDP reply over specified interface
Definition: netevent.c:443
get_rcode
static int get_rcode(uint8_t *pkt, size_t pktlen)
returns rcode from packet
Definition: testpkts.c:758
subnet_env::whitelist
struct ecs_whitelist * whitelist
access control, which upstream servers we send client address
Definition: subnetmod.h:61
comm_base_delete_no_base
void comm_base_delete_no_base(struct comm_base *b)
Delete comm base structure but not the underlying lib event base.
Definition: netevent.c:220
nsec3_prove_nodata
enum sec_status nsec3_prove_nodata(struct module_env *env, struct val_env *ve, struct ub_packed_rrset_key **list, size_t num, struct query_info *qinfo, struct key_entry_key *kkey)
Determine if the NSEC3s provided in a response prove the NOERROR/NODATA status.
Definition: val_nsec3.c:1224
sldns_wire2str_alg_scan
int sldns_wire2str_alg_scan(uint8_t **data, size_t *data_len, char **str, size_t *str_len)
Scan wireformat alg field to string, with user buffers.
Definition: wire2str.c:1335
perform_zone_add
static int perform_zone_add(RES *ssl, struct local_zones *zones, char *arg)
Add a new zone.
Definition: remote.c:1184
iter_get_next_root
int iter_get_next_root(struct iter_hints *hints, struct iter_forwards *fwd, uint16_t *c)
Lookup next root-hint or root-forward entry.
Definition: iter_utils.c:1224
val_qstate::signer_len
size_t signer_len
length of signer_name
Definition: validator.h:216
ub_event_del_bits
void ub_event_del_bits(struct ub_event *, short bits)
Configure the event so it will not longer fire on given bits.
Definition: ub_event.c:368
sldns_wirerr_get_class
uint16_t sldns_wirerr_get_class(uint8_t *rr, size_t len, size_t dname_len)
Get the class of the RR.
Definition: str2wire.c:805
config_file::acl_tag_actions
struct config_str3list * acl_tag_actions
list of aclname, tagname, localzonetype
Definition: config_file.h:417
config_file::ssl_upstream
int ssl_upstream
if outgoing tcp connections use SSL
Definition: config_file.h:118
rrset_get_count
static size_t rrset_get_count(struct ub_packed_rrset_key *rrset)
return number of rrs in an rrset
Definition: val_utils.c:317
outside_network::num_tcp
size_t num_tcp
number of tcp communication points.
Definition: outside_network.h:154
order_lock_cmp
int order_lock_cmp(const void *e1, const void *e2)
Due to module breakage by fptr wlist, these test app declarations are presented here.
Definition: unbound-dnstap-socket.c:1568
pr_flags
static void pr_flags(sldns_buffer *buf, uint16_t flags)
print flags to string
Definition: unitauth.c:651
acl_list::region
struct regional * region
regional for allocation
Definition: acl_list.h:76
rbtree_type::root
rbnode_type * root
The root of the red-black tree.
Definition: rbtree.h:78
slabhash_insert
void slabhash_insert(struct slabhash *table, hashvalue_type hash, struct lruhash_entry *entry, void *data, void *cb_override)
Insert a new element into the hashtable, uses lruhash_insert.
Definition: slabhash.c:116
daemon_remote_create
struct daemon_remote * daemon_remote_create(struct config_file *cfg)
Create new remote control state for the daemon.
Definition: remote.c:198
process_dnskey_response
static void process_dnskey_response(struct module_qstate *qstate, struct val_qstate *vq, int id, int rcode, struct dns_msg *msg, struct query_info *qinfo, struct sock_list *origin)
Process DNSKEY response.
Definition: validator.c:2951
timestwo
static void timestwo(struct timeval *v)
special timestwo operation for time values in histogram setup
Definition: timehist.c:52
LDNS_RDF_TYPE_DNAME
@ LDNS_RDF_TYPE_DNAME
domain name
Definition: rrdef.h:268
rbtree_insert_fixup
static void rbtree_insert_fixup(rbtree_type *rbtree, rbnode_type *node)
Fixup node colours when insert happened.
Definition: rbtree.c:158
parse_reply_in_temp_region
struct reply_info * parse_reply_in_temp_region(struct sldns_buffer *pkt, struct regional *region, struct query_info *qi)
get msg reply struct (in temp region)
Definition: msgreply.c:927
shared_secret_cache_key::entry
struct lruhash_entry entry
the hash table entry, data is uint8_t pointer of size crypto_box_BEFORENMBYTES which contains the sha...
Definition: dnscrypt.c:60
respip_rewrite_reply
int respip_rewrite_reply(const struct query_info *qinfo, const struct respip_client_info *cinfo, const struct reply_info *rep, struct reply_info **new_repp, struct respip_action_info *actinfo, struct ub_packed_rrset_key **alias_rrset, int search_only, struct regional *region, struct auth_zones *az)
See if any IP-based action should apply to any IP address of AAAA/A answer record in the reply.
Definition: respip.c:896
mesh_new_prefetch
void mesh_new_prefetch(struct mesh_area *mesh, struct query_info *qinfo, uint16_t qflags, time_t leeway)
New prefetch message.
Definition: mesh.c:750
fake_commpoint::typecode
int typecode
typecode
Definition: fake_event.c:75
val_neg_cache::max
size_t max
max memory to use (bytes)
Definition: val_neg.h:80
sldns_wire2str_b32_ext_scan
int sldns_wire2str_b32_ext_scan(uint8_t **data, size_t *data_len, char **str, size_t *str_len)
Scan wireformat b32_ext field to string, with user buffers.
Definition: wire2str.c:1198
parse_dname
int parse_dname(const char *str, uint8_t **res, size_t *len, int *labs)
Form wireformat from text format domain name.
Definition: localzone.c:132
addrtree_size
size_t addrtree_size(const struct addrtree *tree)
Size of tree in bytes.
Definition: addrtree.c:270
dnskeyset_verify_rrset_sig
enum sec_status dnskeyset_verify_rrset_sig(struct module_env *env, struct val_env *ve, time_t now, struct ub_packed_rrset_key *rrset, struct ub_packed_rrset_key *dnskey, size_t sig_idx, struct rbtree_type **sortree, char **reason, sldns_pkt_section section, struct module_qstate *qstate)
verify rrset, with dnskey rrset, for a specific rrsig in rrset
Definition: val_sigcrypt.c:594
fstrm_create_control_frame_accept
void * fstrm_create_control_frame_accept(char *contenttype, size_t *len)
This creates an FSTRM control frame of type ACCEPT.
Definition: dnstap_fstrm.c:123
check_zone_invariants
static void check_zone_invariants(struct val_neg_cache *neg, struct val_neg_zone *zone)
check if negative cache is still valid
Definition: unitneg.c:428
val_neg_data::name
uint8_t * name
name; the key
Definition: val_neg.h:146
packed_rrset_data::trust
enum rrset_trust trust
the trustworthiness of the rrset data
Definition: packed_rrset.h:244
val_neg_data::prev
struct val_neg_data * prev
previous in LRU
Definition: val_neg.h:164
iter_scrub_nxdomain
void iter_scrub_nxdomain(struct dns_msg *msg)
Prepare an NXDOMAIN message to be used for a subdomain answer by removing all RRs from the ANSWER sec...
Definition: iter_utils.c:1272
create_pending_tcp
static int create_pending_tcp(struct outside_network *outnet, size_t bufsize)
create pending_tcp buffers
Definition: outside_network.c:687
outside_network
Send queries to outside servers and wait for answers from servers.
Definition: outside_network.h:70
ub_ctx_debuglevel
int ub_ctx_debuglevel(struct ub_ctx *ctx, int d)
Set debug verbosity for the context Output is directed to stderr.
Definition: libunbound.c:466
comm_signal_callback
void comm_signal_callback(int fd, short event, void *arg)
This routine is published for checks and tests, and is only used internally.
Definition: netevent.c:3387
pythonmod_block
static struct module_func_block pythonmod_block
The module function block.
Definition: pythonmod.c:581
sldns_fskipcs_l
void sldns_fskipcs_l(FILE *fp, const char *s, int *line_nr)
skips all of the characters in the given string in the fp, moving the position to the first character...
Definition: parse.c:425
tcp_req_done_item::buf
uint8_t * buf
the buffer with packet contents
Definition: listen_dnsport.h:294
wsvc_install
void wsvc_install(FILE *out, const char *rename)
Install service in servicecontrolmanager, setup registry.
Definition: w_inst.c:189
dns_cache_store_msg
void dns_cache_store_msg(struct module_env *env, struct query_info *qinfo, hashvalue_type hash, struct reply_info *rep, time_t leeway, int pside, struct reply_info *qrep, uint32_t flags, struct regional *region)
Store message in the cache.
Definition: dns.c:156
domain_limit_data
ratelimit settings for domains
Definition: infra.h:131
xml_startelem
static void xml_startelem(void *userData, const XML_Char *name, const XML_Char **atts)
XML start of element.
Definition: unbound-anchor.c:1424
addr_tree_init
void addr_tree_init(rbtree_type *tree)
Init addr tree to be empty.
Definition: dnstree.c:79
strmodulevent
const char * strmodulevent(enum module_ev e)
Debug utility: module event to string.
Definition: module.c:60
LDNS_RDF_TYPE_SERVICE
@ LDNS_RDF_TYPE_SERVICE
protocol and port bitmaps
Definition: rrdef.h:315
iter_qstate::caps_reply
struct reply_info * caps_reply
state for capsfail: stored query for comparisons.
Definition: iterator.h:291
codeline_cmp
int codeline_cmp(const void *a, const void *b)
compare two codeline structs for rbtree from memstats test app
Definition: worker_cb.c:236
http_nonchunk_segment
static int http_nonchunk_segment(struct comm_point *c)
handle nonchunked data segment
Definition: netevent.c:2073
outbound_list_clear
void outbound_list_clear(struct outbound_list *list)
Clear the user owner outbound list structure.
Definition: outbound_list.c:54
LDNS_RDF_TYPE_WKS
@ LDNS_RDF_TYPE_WKS
well known services
Definition: rrdef.h:319
rpz_rrset_delete_rr
static int rpz_rrset_delete_rr(struct resp_addr *raddr, uint16_t rr_type, uint8_t *rdata, size_t rdatalen)
Remove RR from RPZ's respip set.
Definition: rpz.c:791
dtio_read_accept_frame
static int dtio_read_accept_frame(struct dt_io_thread *dtio)
Read accept frame.
Definition: dtstream.c:1004
str_is_ip6
int str_is_ip6(const char *str)
See if string is ip4 or ip6.
Definition: net_help.c:113
fptr_whitelist_mod_clear
int fptr_whitelist_mod_clear(void(*fptr)(struct module_qstate *qstate, int id))
Check function pointer whitelist for module clear call values.
Definition: fptr_wlist.c:503
wsvc_err2str
void wsvc_err2str(char *str, size_t len, const char *fixed, DWORD err)
Convert windows GetLastError() value to a neat string.
Definition: w_inst.c:46
infra_key::addrlen
socklen_t addrlen
length of addr.
Definition: infra.h:62
config_file::so_rcvbuf
size_t so_rcvbuf
SO_RCVBUF size to set on port 53 UDP socket.
Definition: config_file.h:184
daemon::rc
struct daemon_remote * rc
remote control connections management (for first worker)
Definition: daemon.h:97
ta_compare
static int ta_compare(struct autr_ta *a, uint16_t t, uint8_t *b, size_t b_len)
compare trust anchor with rdata, 0 if equal.
Definition: autotrust.c:1376
dtio_control_start_send
static int dtio_control_start_send(struct dt_io_thread *dtio)
setup a start control message
Definition: dtstream.c:1811
reply_and_prefetch
static void reply_and_prefetch(struct worker *worker, struct query_info *qinfo, uint16_t flags, struct comm_reply *repinfo, time_t leeway, int noreply)
Reply to client and perform prefetch to keep cache up to date.
Definition: worker.c:777
daemon::workers
struct worker ** workers
the worker entries
Definition: daemon.h:103
usage
static void usage(void)
print usage and exit
Definition: memstats.c:69
lookup_is_done
static void lookup_is_done(void *mydata, int err, struct ub_result *result)
this is a function of type ub_callback_t
Definition: asynclook.c:142
seen_revoked_trustanchor
static void seen_revoked_trustanchor(struct autr_ta *ta, uint8_t revoked)
set revoked value
Definition: autotrust.c:1324
config_file::stat_interval
int stat_interval
statistics interval (in seconds)
Definition: config_file.h:73
ext_thr_info::thread_num
int thread_num
thread num for debug
Definition: asynclook.c:174
auth_master::file
char * file
for http, filename
Definition: authzone.h:438
serviced_tcp_send
static int serviced_tcp_send(struct serviced_query *sq, sldns_buffer *buff)
Send serviced query over TCP return false on initial failure.
Definition: outside_network.c:1904
apply_ixfr
static int apply_ixfr(struct auth_xfer *xfr, struct auth_zone *z, struct sldns_buffer *scratch_buffer)
apply IXFR to zone in memory.
Definition: authzone.c:4587
daemon::num_ports
size_t num_ports
size of ports array
Definition: daemon.h:89
ub_event_vmt::set_fd
void(* set_fd)(struct ub_event *, int)
Change or set the file descriptor on the event The event will be deactivated before this function is ...
Definition: unbound-event.h:134
print_hist
static int print_hist(RES *ssl, struct ub_stats_info *s)
print extended histogram
Definition: remote.c:889
ub_event_vmt
The Virtual Method Table for and ub_event "object".
Definition: unbound-event.h:125
tcp_req_open_item::next
struct tcp_req_open_item * next
next in list
Definition: listen_dnsport.h:280
dynlibmod_operate
void dynlibmod_operate(struct module_qstate *qstate, enum module_ev event, int id, struct outbound_entry *outbound)
dynlib module operate on a query
Definition: dynlibmod.c:178
name_tree_node::dclass
uint16_t dclass
the class of the name (host order)
Definition: dnstree.h:67
config_file::val_sig_skew_max
int32_t val_sig_skew_max
the maximum for signature clock skew
Definition: config_file.h:350
optind
int optind
getopt global, in case header files fail to declare it.
mesh_area::stats_jostled
size_t stats_jostled
stats, cumulative number of reply states jostled out
Definition: mesh.h:112
PACKED_RRSET_PARENT_SIDE
#define PACKED_RRSET_PARENT_SIDE
this rrset is A/AAAA and is in-zone-glue (from parent side of zonecut)
Definition: packed_rrset.h:55
lz_enter_zone
static struct local_zone * lz_enter_zone(struct local_zones *zones, const char *name, const char *type, uint16_t dclass)
enter a new zone
Definition: localzone.c:208
waiting_tcp::cb
comm_point_callback_type * cb
callback for the timeout, error or reply to the message
Definition: outside_network.h:294
HASH_DEFAULT_SLABS
#define HASH_DEFAULT_SLABS
default number of slabs
Definition: slabhash.h:49
serviced_query::zonelen
size_t zonelen
length of zone name
Definition: outside_network.h:353
aclchecks
static void aclchecks(struct config_file *cfg)
check acl ips
Definition: unbound-checkconf.c:367
tcp_req_info_send_reply
void tcp_req_info_send_reply(struct tcp_req_info *req)
Send reply on tcp simultaneous answer channel.
Definition: listen_dnsport.c:1917
pending_tcp::c
struct comm_point * c
tcp comm point it was sent on (and reply must come back on).
Definition: outside_network.h:261
delegpt_log
void delegpt_log(enum verbosity_value v, struct delegpt *dp)
Print the delegation point to the log.
Definition: iter_delegpt.c:258
ipset_get_funcblock
struct module_func_block * ipset_get_funcblock(void)
Get the function block with pointers to the ipset functions.
Definition: ipset.c:380
keysets::incep
uint32_t incep
signature inception
Definition: signit.c:53
module_factory
struct module_func_block * module_factory(const char **str)
Get funcblock for module name.
Definition: modstack.c:203
iter_qstate::num_target_queries
int num_target_queries
number of outstanding target sub queries
Definition: iterator.h:298
sldns_b32_ntop_extended_hex
int sldns_b32_ntop_extended_hex(uint8_t const *src, size_t srclength, char *target, size_t targsize)
This function we get from ldns-compat or from base system it returns the number of data bytes stored ...
Definition: parseutil.c:448
tomsg
struct dns_msg * tomsg(struct module_env *env, struct query_info *q, struct reply_info *r, struct regional *region, time_t now, int allow_expired, struct regional *scratch)
generate dns_msg from cached message
Definition: dns.c:538
subnet-whitelist.h
get_codeline
static struct codeline * get_codeline(rbtree_type *tree, char *key, char *func)
find or alloc codeline in tree
Definition: memstats.c:102
iter_qstate::dnssec_expected
int dnssec_expected
expected dnssec information for this iteration step.
Definition: iterator.h:354
reply_get_NS_rrset
static struct ub_packed_rrset_key * reply_get_NS_rrset(struct reply_info *rep)
fetch NS record from reply, if any
Definition: iter_utils.c:1086
config_auth::zonefile
char * zonefile
zonefile (or NULL)
Definition: config_file.h:666
config_file::auto_trust_anchor_file_list
struct config_strlist * auto_trust_anchor_file_list
files with 5011 autotrust tracked keys
Definition: config_file.h:331
xfr_probe_send_probe
static int xfr_probe_send_probe(struct auth_xfer *xfr, struct module_env *env, int timeout)
send the UDP probe to the master, this is part of task_probe
Definition: authzone.c:6011
val_qstate::empty_DS_len
size_t empty_DS_len
length of empty_DS_name
Definition: validator.h:205
EDNS_ADVERTISED_SIZE
uint16_t EDNS_ADVERTISED_SIZE
Advertised size of EDNS capabilities.
Definition: net_help.c:68
lz_enter_override
static int lz_enter_override(struct local_zones *zones, char *zname, char *netblock, char *type, uint16_t rr_class)
enter override into zone
Definition: localzone.c:618
add_synth_cname
static int add_synth_cname(struct auth_zone *z, uint8_t *qname, size_t qname_len, struct regional *region, struct dns_msg *msg, struct auth_data *dname, struct auth_rrset *rrset)
add a synthesized CNAME to the answer section
Definition: authzone.c:2481
caps_failed_rcode
int caps_failed_rcode(struct reply_info *rep)
see if reply has a 'useful' rcode for capsforid comparison, so not SERVFAIL or REFUSED,...
Definition: iter_utils.c:1060
module_qstate::edns_opts_front_out
struct edns_option * edns_opts_front_out
outgoing edns options to the front end
Definition: module.h:644
comm_point::repinfo
struct comm_reply repinfo
sockaddr from peer, for TCP handlers
Definition: netevent.h:176
sldns_rr_descriptor_minimum
size_t sldns_rr_descriptor_minimum(const sldns_rr_descriptor *descriptor)
returns the minimum number of rdata fields of the rr type this descriptor describes.
Definition: rrdef.c:650
pretty_type
static void pretty_type(char *s, size_t len, int t)
nice string for type
Definition: unbound-host.c:229
qlist_read_file
static void qlist_read_file(struct perfinfo *info, char *fname)
setup query list in info
Definition: perf.c:551
neg_setup_data_node
static struct val_neg_data * neg_setup_data_node(uint8_t *nm, size_t nm_len, int labs)
Create single node of data element.
Definition: val_neg.c:602
config_deltrplstrlist
void config_deltrplstrlist(struct config_str3list *list)
Delete items in config triple string list.
Definition: config_file.c:1309
count_unused
static int count_unused(struct ip_list *p)
count unused IPs
Definition: unbound-anchor.c:681
config_file::do_daemonize
int do_daemonize
daemonize, i.e.
Definition: config_file.h:460
config_file::trusted_keys_file_list
struct config_strlist * trusted_keys_file_list
files with trusted DNSKEYs in named.conf format, list
Definition: config_file.h:333
ub_event_add
int ub_event_add(struct ub_event *ev, struct timeval *tv)
Activate the event.
Definition: ub_event.c:387
regional::total_large
size_t total_large
total large size
Definition: regional.h:70
log_edns_opt_list
void log_edns_opt_list(enum verbosity_value level, const char *info_str, struct edns_option *list)
Log the edns options in the edns option list.
Definition: msgparse.c:1111
autr_state_type
autr_state_type
Autotrust anchor states.
Definition: autotrust.h:55
match_all
int match_all(uint8_t *q, size_t qlen, uint8_t *p, size_t plen, int mttl, int noloc)
match all of the packet
Definition: testpkts.c:1297
mesh_cb
Callback to result routine.
Definition: mesh.h:246
daemon::time_last_stat
struct timeval time_last_stat
last time of statistics printout
Definition: daemon.h:121
key_entry_get_reason
char * key_entry_get_reason(struct key_entry_key *kkey)
Get reason why a key is bad.
Definition: val_kentry.c:248
serviced_query::qtype
int qtype
qtype
Definition: outside_network.h:355
ipsecmod_qstate::ipseckey_done
int ipseckey_done
If the IPSECKEY subquery has finished.
Definition: ipsecmod.h:73
MAX_PORT_RETRY
#define MAX_PORT_RETRY
number of times to retry finding interface, port that can be opened.
Definition: outside_network.c:78
errinf_dname
void errinf_dname(struct module_qstate *qstate, const char *str, uint8_t *dname)
Append text to error info: str dname.
Definition: config_file.c:2488
config_delstrlist
void config_delstrlist(struct config_strlist *list)
Delete items in config string list.
Definition: config_file.c:1284
fake_timer::cb
void(* cb)(void *)
the callback to call
Definition: replay.h:385
read_stubs_host
static int read_stubs_host(struct config_stub *s, struct delegpt *dp)
set stub host names
Definition: iter_hints.c:217
read_stubs_addr
static int read_stubs_addr(struct config_stub *s, struct delegpt *dp)
set stub server addresses
Definition: iter_hints.c:242
config_file::key_cache_size
size_t key_cache_size
size of the key cache
Definition: config_file.h:388
test_bin_find_entry
static void test_bin_find_entry(struct lruhash *table)
test bin_find_entry function and bin_overflow_remove
Definition: unitlruhash.c:81
ub_default_event_base
struct ub_event_base * ub_default_event_base(int, time_t *, struct timeval *)
Return a default event base.
Definition: ub_event.c:210
acl_deny
@ acl_deny
disallow any access whatsoever, drop it
Definition: acl_list.h:56
subnetmod.h
az_generate_nxdomain_answer
static int az_generate_nxdomain_answer(struct auth_zone *z, struct regional *region, struct dns_msg *msg, struct auth_data *ce, struct auth_data *node)
generate answer for nxdomain answer
Definition: authzone.c:3111
libworker_delete_event
void libworker_delete_event(struct libworker *w)
delete worker for event-based interface.
Definition: libworker.c:121
rr_parse::size
size_t size
the length of the rdata if allocated (with no dname compression)
Definition: msgparse.h:192
stop_flush_info
structure to keep track of information during stop flush
Definition: dtstream.c:1565
process_dlv_response
static void process_dlv_response(struct module_qstate *qstate, struct val_qstate *vq, int id, int rcode, struct dns_msg *msg, struct query_info *qinfo)
Process DLV response.
Definition: validator.c:3123
ub_result::len
int * len
the length in bytes of the data items, len[i] for data[i]
Definition: unbound.h:140
dns_cache_store
int dns_cache_store(struct module_env *env, struct query_info *msgqinf, struct reply_info *msgrep, int is_referral, time_t leeway, int pside, struct regional *region, uint32_t flags)
Allocate a dns_msg with malloc/alloc structure and store in dns cache.
Definition: dns.c:967
LDNS_RR_TYPE_TALINK
@ LDNS_RR_TYPE_TALINK
draft-ietf-dnsop-trust-history
Definition: rrdef.h:193
causes_cycle
static int causes_cycle(struct module_qstate *qstate, uint8_t *name, size_t namelen, uint16_t t, uint16_t c)
detect dependency cycle for query and target
Definition: iter_utils.c:677
filter_init
static void filter_init(struct nsec3_filter *filter, struct ub_packed_rrset_key **list, size_t num, struct query_info *qinfo)
Initialize the filter structure.
Definition: val_nsec3.c:406
gen_dns_msg
static struct dns_msg * gen_dns_msg(struct regional *region, struct query_info *q, size_t num)
allocate dns_msg from query_info and reply_info
Definition: dns.c:512
sldns_wire2str_b64_scan
int sldns_wire2str_b64_scan(uint8_t **data, size_t *data_len, char **str, size_t *str_len)
Scan wireformat b64 field to string, with user buffers.
Definition: wire2str.c:1240
testbound_selftest
void testbound_selftest(void)
testbounds self test
Definition: replay.c:936
sldns_buffer_set_position
INLINE void sldns_buffer_set_position(sldns_buffer *buffer, size_t mark)
sets the buffer's position to MARK.
Definition: sbuffer.h:245
zone_del_msg
static void zone_del_msg(struct lruhash_entry *e, void *arg)
callback to delete messages in a zone
Definition: remote.c:1702
log_buf
void void void log_buf(enum verbosity_value level, const char *msg, struct sldns_buffer *buf)
Easy alternative for log_hex, takes a sldns_buffer.
Definition: log.c:424
sldns_bgetc
int sldns_bgetc(struct sldns_buffer *buffer)
returns the next character from a buffer.
Definition: parse.c:227
ub_libevent_get_event_base
struct event_base * ub_libevent_get_event_base(struct ub_event_base *)
Return the libevent base underlying the given ub_event_base.
Definition: ub_event.c:252
lruhash_traverse
void lruhash_traverse(struct lruhash *h, int wr, void(*func)(struct lruhash_entry *, void *), void *arg)
Traverse a lruhash.
Definition: lruhash.c:524
sldns_rr_descriptor_field_type
sldns_rdf_type sldns_rr_descriptor_field_type(const sldns_rr_descriptor *descriptor, size_t index)
returns the rdf type for the given rdata field number of the rr type for the given descriptor.
Definition: rrdef.c:674
auth_zones_answer
int auth_zones_answer(struct auth_zones *az, struct module_env *env, struct query_info *qinfo, struct edns_data *edns, struct comm_reply *repinfo, struct sldns_buffer *buf, struct regional *temp)
Answer query from auth zone.
Definition: authzone.c:3320
sldns_buffer::_position
size_t _position
The current position used for reading/writing.
Definition: sbuffer.h:119
worker_send_cmd
void worker_send_cmd(struct worker *worker, enum worker_commands cmd)
Send a command to a worker.
Definition: worker.c:230
lru_push
static void lru_push(struct addrtree *tree, struct addrnode *node)
Add node to LRU list as most recently used.
Definition: addrtree.c:184
val_verify_rrset
enum sec_status val_verify_rrset(struct module_env *env, struct val_env *ve, struct ub_packed_rrset_key *rrset, struct ub_packed_rrset_key *keys, uint8_t *sigalg, char **reason, sldns_pkt_section section, struct module_qstate *qstate)
Verify RRset with keys.
Definition: val_utils.c:336
isendline
static int isendline(char c)
return if string is empty or comment
Definition: testpkts.c:65
perfmain
static void perfmain(struct perfinfo *info)
perform the performance test
Definition: perf.c:452
timeval_add
static void timeval_add(struct timeval *d, const struct timeval *add)
add timers and the values do not overflow or become negative
Definition: fake_event.c:98
cachedb_backend
Backend call routines.
Definition: cachedb.h:71
unique_mesh_state
int unique_mesh_state(struct edns_option *list, struct module_env *env)
Check if an unique mesh state is required.
Definition: module.c:206
reply_addr2str
void reply_addr2str(struct comm_reply *reply, char *dest, int maxlen)
Convert reply->addr to string.
Definition: pythonmod_utils.c:169
stop_flush_info::stop_frame
void * stop_frame
the stop control frame
Definition: dtstream.c:1575
lruhash::lru_end
struct lruhash_entry * lru_end
lru list end item (least recently used)
Definition: lruhash.h:173
xml_selectbio
static BIO * xml_selectbio(struct xml_data *data, const char *tag)
The BIO for the tag.
Definition: unbound-anchor.c:1221
az_find_wildcard_domain
static struct auth_data * az_find_wildcard_domain(struct auth_zone *z, uint8_t *nm, size_t nmlen)
see if the domain has a wildcard child '*.domain'
Definition: authzone.c:2153
dnskey_get_algo
int dnskey_get_algo(struct ub_packed_rrset_key *k, size_t idx)
Get DNSKEY RR signature algorithm.
Definition: val_sigcrypt.c:178
options_remote_is_address
int options_remote_is_address(struct config_file *cfg)
check if config for remote control turns on IP-address interface with certificates or a named pipe wi...
Definition: config_file.c:2499
infra_cache::client_ip_rates
struct slabhash * client_ip_rates
hash table with query rates per client ip: ip_rate_key, ip_rate_data
Definition: infra.h:122
tube::res_last
struct tube_res_list * res_last
last in list
Definition: tube.h:91
pending::addrlen
socklen_t addrlen
length of addr field in use.
Definition: outside_network.h:227
outside_network::udp_buff
struct sldns_buffer * udp_buff
buffer shared by UDP connections, since there is only one datagram at any time.
Definition: outside_network.h:80
iter_store_parentside_NS
void iter_store_parentside_NS(struct module_env *env, struct reply_info *rep)
Store parent-side NS records from a referral message.
Definition: iter_utils.c:1098
delegpt_create
struct delegpt * delegpt_create(struct regional *region)
Create new delegation point.
Definition: iter_delegpt.c:54
wait_probe_time
static time_t wait_probe_time(struct val_anchors *anchors)
what is first probe time (anchors must be locked)
Definition: autotrust.c:2017
config_file::local_zone_tags
struct config_strbytelist * local_zone_tags
list of zonename, tagbitlist
Definition: config_file.h:413
infra_update_tcp_works
void infra_update_tcp_works(struct infra_cache *infra, struct sockaddr_storage *addr, socklen_t addrlen, uint8_t *name, size_t namelen)
Update information for the host, store that a TCP transaction works.
Definition: infra.c:544
respip_sockaddr_delete
void respip_sockaddr_delete(struct respip_set *set, struct resp_addr *node)
Delete resp_addr node from tree.
Definition: respip.c:127
tcp_send_list::next
struct tcp_send_list * next
next in list
Definition: delayer.c:110
INIT_REQUEST_STATE
@ INIT_REQUEST_STATE
Externally generated queries start at this state.
Definition: iterator.h:175
PTR_OFFSET
#define PTR_OFFSET(x, y)
Calculate destination offset of a compression pointer.
Definition: msgparse.h:201
sec_status_secure_sentinel_fail
@ sec_status_secure_sentinel_fail
SECURE_SENTINEL_FAIL means that the object (RRset or message) validated according to local policy but...
Definition: packed_rrset.h:193
algo_needs_set_bogus
void algo_needs_set_bogus(struct algo_needs *n, uint8_t algo)
Mark this algorithm a failure, sec_bogus.
Definition: val_sigcrypt.c:461
verbose
void verbose(enum verbosity_value lvl, const char *msg,...) ATTR_FORMAT(printf
logging routine, provided by caller
pending_udp_timer_delay_cb
void pending_udp_timer_delay_cb(void *arg)
callback for udp delay for timeout
Definition: outside_network.c:649
tap_data::ssl_brief_write
int ssl_brief_write
we are briefly waiting to write (in the struct event)
Definition: unbound-dnstap-socket.c:115
perftimeout
static void perftimeout(struct perfinfo *info, size_t n, struct timeval *now)
got timeout for io
Definition: perf.c:329
daemon::superalloc
struct alloc_cache superalloc
master allocation cache
Definition: daemon.h:109
processQueryResponse
static int processQueryResponse(struct module_qstate *qstate, struct iter_qstate *iq, int id)
Process the query response.
Definition: iterator.c:2658
iter_fwd.h
ub_result::data
char ** data
a list of network order DNS rdata items, terminated with a NULL pointer, so that data[0] is the first...
Definition: unbound.h:137
config_file::dnstap_log_forwarder_query_messages
int dnstap_log_forwarder_query_messages
true to log dnstap FORWARDER_QUERY message events
Definition: config_file.h:518
tube_handle_write
int tube_handle_write(struct comm_point *c, void *arg, int error, struct comm_reply *reply_info)
for fptr wlist, callback function
sec_status_indeterminate
@ sec_status_indeterminate
INDETERMINATE means that the object is insecure, but not authoritatively so.
Definition: packed_rrset.h:185
ce_response
Closest encloser (ce) proof results Contains the ce and the next-closer (nc) proof.
Definition: val_nsec3.c:78
val_block
static struct module_func_block val_block
The validator function block.
Definition: validator.c:3267
config_file::num_tags
int num_tags
number of items in the taglist
Definition: config_file.h:431
PRIME_RESP_STATE
@ PRIME_RESP_STATE
Responses to priming queries finish at this state.
Definition: iterator.h:204
have_probe_targets
static int have_probe_targets(struct auth_master *list)
return true if there are probe (SOA UDP query) targets in the master list
Definition: authzone.c:6510
comm_base::stop_accept
void(* stop_accept)(void *)
callback to stop listening on accept sockets, performed when accept() will not function properly
Definition: netevent.h:102
comm_base_exit
void comm_base_exit(struct comm_base *b)
Exit from dispatch loop.
Definition: netevent.c:253
replay_range::addrlen
socklen_t addrlen
length of addr, if 0, then any address will do
Definition: replay.h:254
fptr_whitelist_inplace_cb_query_response
int fptr_whitelist_inplace_cb_query_response(inplace_cb_query_response_func_type *fptr)
Check function pointer whitelist for inplace_cb_query_response func values.
Definition: fptr_wlist.c:664
config_file::jostle_time
size_t jostle_time
number of msec to wait before items can be jostled out
Definition: config_file.h:156
daemon_remote::active
int active
number of active commpoints that are handling remote control
Definition: remote.h:97
replay_scenario_delete
void replay_scenario_delete(struct replay_scenario *scen)
Delete scenario.
Definition: replay.c:508
replay_range::match
struct entry * match
Matching list.
Definition: replay.h:257
config_file::tcp_connection_limits
struct config_str2list * tcp_connection_limits
list of tcp connection limitss, linked list
Definition: config_file.h:245
delegpt_ns::got6
uint8_t got6
if the ipv6 address is in the delegpt, 0=not, 1=yes 2=negative
Definition: iter_delegpt.h:113
ub_result::secure
int secure
True, if the result is validated securely.
Definition: unbound.h:183
dname_print
void dname_print(FILE *out, struct sldns_buffer *pkt, uint8_t *dname)
Debug helper.
Definition: dname.c:389
config_file::ip_ratelimit
int ip_ratelimit
ratelimit for ip addresses.
Definition: config_file.h:526
auth_rrset::type
uint16_t type
RR type in host byteorder.
Definition: authzone.h:175
ipset_inform_super
void ipset_inform_super(struct module_qstate *qstate, int id, struct module_qstate *super)
Subordinate query done, inform this super request of its conclusion.
remote_handshake_later
static int remote_handshake_later(struct daemon_remote *rc, struct rc_state *s, struct comm_point *c, int r, int r2)
handle SSL_do_handshake changes to the file descriptor to wait for later
Definition: remote.c:3156
az_generate_cname_answer
static int az_generate_cname_answer(struct auth_zone *z, struct query_info *qinfo, struct regional *region, struct dns_msg *msg, struct auth_data *node, struct auth_rrset *rrset)
generate answer for cname answer
Definition: authzone.c:2965
iter_env::target_fetch_policy
int * target_fetch_policy
The target fetch policy for each dependency level.
Definition: iterator.h:136
forwards_lookup_root
struct delegpt * forwards_lookup_root(struct iter_forwards *fwd, uint16_t qclass)
Same as forwards_lookup, but for the root only.
Definition: iter_fwd.c:390
sldns_buffer_init_frm_data
void sldns_buffer_init_frm_data(sldns_buffer *buffer, void *data, size_t size)
Setup a buffer with the data pointed to.
Definition: sbuffer.c:65
rbtree_first
rbnode_type * rbtree_first(rbtree_type *rbtree)
Returns first (smallest) node in the tree.
Definition: rbtree.c:549
ub_event_base_vmt::loopexit
int(* loopexit)(struct ub_event_base *, struct timeval *)
Exit the given event loop.
Definition: unbound-event.h:95
delayer_sigh
static RETSIGTYPE delayer_sigh(int sig)
signal handler for user quit
Definition: delayer.c:348
modstack_setup
int modstack_setup(struct module_stack *stack, const char *module_conf, struct module_env *env)
Setup modules.
Definition: modstack.c:223
newdata
static testdata_type * newdata(int val)
new data el
Definition: unitslabhash.c:73
comm_point_close
void comm_point_close(struct comm_point *c)
Close a comm point fd.
Definition: netevent.c:3070
module_env::rnd
struct ub_randstate * rnd
random table to generate random numbers
Definition: module.h:479
ub_server_stats::num_queries_prefetch
long long num_queries_prefetch
number of prefetch queries - cachehits with prefetch
Definition: unbound.h:671
compress_tree_lookup
static struct compress_tree_node * compress_tree_lookup(struct compress_tree_node **tree, uint8_t *dname, int labs, struct compress_tree_node ***insertpt)
Lookup a domain name in compression tree.
Definition: msgencode.c:147
auth_rr_to_string
static int auth_rr_to_string(uint8_t *nm, size_t nmlen, uint16_t tp, uint16_t cl, struct packed_rrset_data *data, size_t i, char *s, size_t buflen)
convert auth rr to string
Definition: authzone.c:1647
test_anchor_one
static void test_anchor_one(sldns_buffer *buff, struct val_anchors *a)
test set of one anchor
Definition: unitanchor.c:67
LDNS_RR_TYPE_KX
@ LDNS_RR_TYPE_KX
RFC2230.
Definition: rrdef.h:155
sldns_str2wire_a_buf
int sldns_str2wire_a_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_A from string to wireformat.
Definition: str2wire.c:1065
verify_dnskeys_with_ds_rr
static enum sec_status verify_dnskeys_with_ds_rr(struct module_env *env, struct val_env *ve, struct ub_packed_rrset_key *dnskey_rrset, struct ub_packed_rrset_key *ds_rrset, size_t ds_idx, char **reason, struct module_qstate *qstate)
verify that a DS RR hashes to a key and that key signs the set
Definition: val_utils.c:415
comm_base
A communication point dispatcher.
Definition: netevent.h:97
iter_env::queries_ratelimit_lock
lock_basic_type queries_ratelimit_lock
lock on ratelimit counter
Definition: iterator.h:139
auth_xfer::zone_expired
int zone_expired
is the zone currently considered expired? after expiry also older serial numbers are allowed (not jus...
Definition: authzone.h:251
fname_after_chroot
char * fname_after_chroot(const char *fname, struct config_file *cfg, int use_chdir)
Convert a filename to full pathname in original filesys.
Definition: config_file.c:2116
nsec3_filter::num
size_t num
number of rrsets in list
Definition: val_nsec3.c:105
read_ssl_line
static int read_ssl_line(SSL *ssl, char *buf, size_t len)
Read one line from SSL zero terminates.
Definition: petal.c:152
sldns_buffer_write_u16_at
INLINE void sldns_buffer_write_u16_at(sldns_buffer *buffer, size_t at, uint16_t data)
writes the given 2 byte integer at the given position in the buffer
Definition: sbuffer.h:524
auth_zones_create
struct auth_zones * auth_zones_create(void)
Create auth zones structure.
Definition: authzone.c:289
iter_ds_toolow
int iter_ds_toolow(struct dns_msg *msg, struct delegpt *dp)
See if a DS response (type ANSWER) is too low: a nodata answer with a SOA record in the authority sec...
Definition: iter_utils.c:1330
val_qstate::chain_blacklist
struct sock_list * chain_blacklist
The blacklist saved for chainoftrust elements.
Definition: validator.h:163
comm_point::tcp_handlers
struct comm_point ** tcp_handlers
malloced array of tcp handlers for a tcp-accept, of size max_tcp_count.
Definition: netevent.h:185
xfr_transfer_lookup_host
static int xfr_transfer_lookup_host(struct auth_xfer *xfr, struct module_env *env)
lookup a host name for its addresses, if needed
Definition: authzone.c:5064
listen_port::fd
int fd
file descriptor, open and ready for use
Definition: listen_dnsport.h:109
auth_master::allow_notify
int allow_notify
this is an allow notify member, the master can send notifies to us, but we don't send SOA probes,...
Definition: authzone.h:445
infra_ip_ratelimit_inc
int infra_ip_ratelimit_inc(struct infra_cache *infra, struct comm_reply *repinfo, time_t timenow, struct sldns_buffer *buffer)
Update query ratelimit hash and decide whether or not a query should be dropped.
Definition: infra.c:1006
val_env::nsec3_maxiter
size_t * nsec3_maxiter
NSEC3 maximum iteration count per signing key size.
Definition: validator.h:120
auth_probe::lookup_target
struct auth_master * lookup_target
for the hostname lookups, which master is current
Definition: authzone.h:319
proxy::numwait
size_t numwait
number of queries waiting (in total)
Definition: delayer.c:86
LABEL_IS_PTR
#define LABEL_IS_PTR(x)
Check if label length is first octet of a compression pointer, pass u8.
Definition: msgparse.h:198
bogus_del_msg
static void bogus_del_msg(struct lruhash_entry *e, void *arg)
callback to delete bogus messages
Definition: remote.c:1788
autr_point_data::last_queried
time_t last_queried
last queried DNSKEY set Not all failures are captured in this entry.
Definition: autotrust.h:104
respip_block
static struct module_func_block respip_block
The response-ip function block.
Definition: respip.c:1274
make_stub_holes
static int make_stub_holes(struct iter_forwards *fwd, struct config_file *cfg)
make NULL entries for stubs
Definition: iter_fwd.c:302
timehist_print
void timehist_print(struct timehist *hist)
Printout histogram.
Definition: timehist.c:147
serviced_query::serviced_query_TCP_EDNS
@ serviced_query_TCP_EDNS
TCP with EDNS sent.
Definition: outside_network.h:365
addr_tree_node::net
int net
netblock size
Definition: dnstree.h:87
read_assign_step
static void read_assign_step(char *remain, struct replay_moment *mom)
read assign step info
Definition: replay.c:240
tcp_req_open_item::mesh
struct mesh_area * mesh
the mesh area of the mesh_state
Definition: listen_dnsport.h:282
ub_rrset_compare
int ub_rrset_compare(void *k1, void *k2)
compares two rrset keys.
Definition: packed_rrset.c:95
serviced_query::addr
struct sockaddr_storage addr
where to send it
Definition: outside_network.h:347
S_STRLIST_APPEND
#define S_STRLIST_APPEND(str, var)
append string to strlist
Definition: config_file.c:431
reply_all_rrsets_secure
int reply_all_rrsets_secure(struct reply_info *rep)
Check security status of all RRs in the message.
Definition: msgreply.c:915
acl_list_str_cfg
static int acl_list_str_cfg(struct acl_list *acl, const char *str, const char *s2, int complain_duplicates)
apply acl_list string
Definition: acl_list.c:95
daemon::reuseport
int reuseport
reuseport is enabled if true
Definition: daemon.h:91
fptr_whitelist_comm_point_raw
int fptr_whitelist_comm_point_raw(comm_point_callback_type *fptr)
Check function pointer whitelist for raw comm_point callback values.
Definition: fptr_wlist.c:117
codeline::codeline
char * codeline
the name of the file:linenumber
Definition: memstats.c:56
iter_lookup_parent_NS_from_cache
int iter_lookup_parent_NS_from_cache(struct module_env *env, struct delegpt *dp, struct regional *region, struct query_info *qinfo)
Add parent NS record if that exists in the cache.
Definition: iter_utils.c:1167
get_has_edns
static int get_has_edns(uint8_t *pkt, size_t len)
return true if the packet has EDNS OPT record
Definition: testpkts.c:865
tube_res_list::len
uint32_t len
length to write
Definition: tube.h:121
ub_libevent_event_base
struct ub_event_base * ub_libevent_event_base(struct event_base *base)
Return an ub_event_base constructed for the given libevent event base.
Definition: ub_event_pluggable.c:391
comm_point_create_raw
struct comm_point * comm_point_create_raw(struct comm_base *base, int fd, int writing, comm_point_callback_type *callback, void *callback_arg)
Create commpoint to listen to a local domain pipe descriptor.
Definition: netevent.c:3008
perform_zone_remove
static int perform_zone_remove(RES *ssl, struct local_zones *zones, char *arg)
Remove a zone.
Definition: remote.c:1252
nsec3_hash_algo_size_supported
size_t nsec3_hash_algo_size_supported(int id)
Return size of nsec3 hash algorithm, 0 if not supported.
rrset_parse::rrsig_first
struct rr_parse * rrsig_first
linked list of RRsig RRs over this rrset.
Definition: msgparse.h:173
do_list_auth_zones
static void do_list_auth_zones(RES *ssl, struct auth_zones *az)
do the list_auth_zones command
Definition: remote.c:2661
config_add_tag
int config_add_tag(struct config_file *cfg, const char *tag)
Add a tag name to the config.
Definition: config_file.c:1923
replay_moment::repevt_back_reply
@ repevt_back_reply
reply arrives from the network
Definition: replay.h:202
sldns_cert_algorithms
struct sldns_struct_lookup_table * sldns_cert_algorithms
Taken from RFC 2538, section 2.1.
Definition: wire2str.c:84
auth_zones::ztree
rbtree_type ztree
rbtree of struct auth_zone
Definition: authzone.h:76
replay_var::name
char * name
the variable name
Definition: replay.h:401
module_qstate::mesh_info
struct mesh_state * mesh_info
mesh related information for this query
Definition: module.h:631
mini_event.h
LDNS_RR_TYPE_MAILB
@ LDNS_RR_TYPE_MAILB
A request for mailbox-related records (MB, MG or MR)
Definition: rrdef.h:220
mesh_area::jostle_last
struct mesh_state * jostle_last
last entry in jostle list - this is the entry that is newest
Definition: mesh.h:148
lzdel
static void lzdel(rbnode_type *n, void *ATTR_UNUSED(arg))
helper traverse to delete zones
Definition: localzone.c:75
reportev
static void reportev(const char *str)
report event to system event log For use during startup and shutdown.
Definition: win_svc.c:128
nsec3_do_prove_nameerror
static enum sec_status nsec3_do_prove_nameerror(struct module_env *env, struct nsec3_filter *flt, rbtree_type *ct, struct query_info *qinfo)
Do the name error proof.
Definition: val_nsec3.c:1022
delegpt_count_targets
size_t delegpt_count_targets(struct delegpt *dp)
count total number of targets in dp
Definition: iter_delegpt.c:316
cfg_set_bit
static void cfg_set_bit(uint8_t *bitlist, size_t len, int id)
set a bit in a bit array
Definition: config_file.c:1948
packed_rrset_list::rrset
struct packed_rrset rrset
rrset key and data
Definition: packed_rrset.h:280
priv_delete
void priv_delete(struct iter_priv *priv)
Delete priv structure.
Definition: iter_priv.c:70
read_forwards
static int read_forwards(struct iter_forwards *fwd, struct config_file *cfg)
read forwards config
Definition: iter_fwd.c:258
del_info::worker
struct worker * worker
worker
Definition: remote.c:1599
rdata2sockaddr
static int rdata2sockaddr(const struct packed_rrset_data *rd, uint16_t rtype, size_t i, struct sockaddr_storage *ss, socklen_t *addrlenp)
Convert a packed AAAA or A RRset to sockaddr.
Definition: respip.c:566
outnet_serviced_query_stop
void outnet_serviced_query_stop(struct serviced_query *sq, void *cb_arg)
Remove service query callback.
Definition: fake_event.c:1267
prime_stub
static int prime_stub(struct module_qstate *qstate, struct iter_qstate *iq, int id, uint8_t *qname, uint16_t qclass)
Generate and process a stub priming request.
Definition: iterator.c:838
SERVE_EXPIRED_REPLY_TTL
time_t SERVE_EXPIRED_REPLY_TTL
TTL to use for expired records.
Definition: msgreply.c:69
xfr_probe_disown
static void xfr_probe_disown(struct auth_xfer *xfr)
disown task_probe.
Definition: authzone.c:5996
addrtree::last
struct addrnode * last
last node in LRU list, last candidate to go
Definition: addrtree.h:88
reply_find_rrset
struct ub_packed_rrset_key * reply_find_rrset(struct reply_info *rep, uint8_t *name, size_t namelen, uint16_t type, uint16_t dclass)
Find rrset in reply, inside any section.
Definition: msgreply.c:803
mark_additional_rrset
static void mark_additional_rrset(sldns_buffer *pkt, struct msg_parse *msg, struct rrset_parse *rrset)
Place mark on rrsets in additional section they are OK.
Definition: iter_scrub.c:151
local_zones_del_data
void local_zones_del_data(struct local_zones *zones, uint8_t *name, size_t len, int labs, uint16_t dclass)
Remove data from domain name in the tree.
Definition: localzone.c:1965
replay_moment::repevt_error
@ repevt_error
an error happens to outbound query
Definition: replay.h:210
xfr_transfer_init_fetch
static int xfr_transfer_init_fetch(struct auth_xfer *xfr, struct module_env *env)
initiate TCP to the target and fetch zone.
Definition: authzone.c:5130
subnetmod_clear
void subnetmod_clear(struct module_qstate *qstate, int id)
subnet module cleanup query state
fptr_whitelist_modenv_detach_subs
int fptr_whitelist_modenv_detach_subs(void(*fptr)(struct module_qstate *qstate))
Check function pointer whitelist for module_env detach_subs callback values.
Definition: fptr_wlist.c:346
fptr_whitelist_print_func
int fptr_whitelist_print_func(void(*fptr)(char *, void *))
Check function pointer whitelist for config_get_option func values.
Definition: fptr_wlist.c:584
ip_list_free
static void ip_list_free(struct ip_list *p)
free ip_list
Definition: unbound-anchor.c:498
listen_dnsport
Listening for queries structure.
Definition: listen_dnsport.h:56
val_fill_reply
void val_fill_reply(struct reply_info *chase, struct reply_info *orig, size_t cname_skip, uint8_t *name, size_t len, uint8_t *signer)
Fill up the chased reply with the content from the original reply; as pointers to those rrsets.
Definition: val_utils.c:853
sldns_mktime_from_utc
time_t sldns_mktime_from_utc(const struct tm *tm)
Convert TM to seconds since epoch (midnight, January 1st, 1970).
Definition: parseutil.c:72
LDNS_RDF_TYPE_AAAA
@ LDNS_RDF_TYPE_AAAA
AAAA record.
Definition: rrdef.h:278
auth_zones_cfg
static int auth_zones_cfg(struct auth_zones *az, struct config_auth *c)
set config items and create zones
Definition: authzone.c:1863
validator.h
ub_ctx::logfile_override
int logfile_override
if logfile is overridden
Definition: context.h:98
val_get_funcblock
struct module_func_block * val_get_funcblock(void)
Get the validator function block.
Definition: validator.c:3274
msg_parse::qname
uint8_t * qname
query dname (pointer to start location in packet, NULL if none
Definition: msgparse.h:118
LDNS_RDF_TYPE_HEX
@ LDNS_RDF_TYPE_HEX
hex string
Definition: rrdef.h:288
delegpt_find_addr
struct delegpt_addr * delegpt_find_addr(struct delegpt *dp, struct sockaddr_storage *addr, socklen_t addrlen)
Find address record in total list of delegation point.
Definition: iter_delegpt.c:146
config_file::outgoing_tcp_mss
int outgoing_tcp_mss
maximum segment size of tcp socket for outgoing queries
Definition: config_file.h:103
dnskey_flags
static int dnskey_flags(uint16_t t, uint8_t *rdata, size_t len)
Get DNSKEY flags rdata without rdatalen in front of it.
Definition: autotrust.c:276
RETVAL_TRUNC
#define RETVAL_TRUNC
return code that means the data did not fit (completely) in the packet
Definition: msgencode.c:62
az_insert_rr_decompress
static int az_insert_rr_decompress(struct auth_zone *z, uint8_t *pkt, size_t pktlen, struct sldns_buffer *scratch_buffer, uint8_t *dname, uint16_t rr_type, uint16_t rr_class, uint32_t rr_ttl, uint8_t *rr_data, uint16_t rr_rdlen, int *duplicate)
insert RR into zone, from packet, decompress RR, if duplicate is nonNULL set the flag but otherwise i...
Definition: authzone.c:1413
sldns_wire2str_class
char * sldns_wire2str_class(uint16_t rrclass)
Convert wire RR class to a string, 'IN', 'CLASS1'.
Definition: wire2str.c:224
ub_thread_sig_unblock
void ub_thread_sig_unblock(int sig)
unblock one signal, so we can catch it
Definition: locks.c:76
test_long_table
static void test_long_table(struct lruhash *table)
test with long sequence of adds, removes and updates, and lookups
Definition: unitlruhash.c:360
config_file::port
int port
port on which queries are answered.
Definition: config_file.h:83
slabhash_get_mem
size_t slabhash_get_mem(struct slabhash *table)
Retrieve slab hash current memory use.
Definition: slabhash.c:169
alloc_cache::thread_num
int thread_num
thread number for id creation
Definition: alloc.h:82
log_get_lock
void * log_get_lock(void)
get log lock
Definition: log.c:208
read_entry
struct entry * read_entry(FILE *in, const char *name, struct sldns_file_parse_state *pstate, int skip_whitespace)
Read one entry from the data file.
Definition: testpkts.c:524
tcp_req_pickup_next_result
static void tcp_req_pickup_next_result(struct tcp_req_info *req)
pick up the next result and start writing it to the channel
Definition: listen_dnsport.c:1749
trust_anchor::lock
lock_basic_type lock
lock on the entire anchor and its keys; for autotrust changes
Definition: val_anchor.h:98
ub_server_stats::num_queries_missed_cache
long long num_queries_missed_cache
number of queries that had a cache-miss.
Definition: unbound.h:669
sldns_str2wire_aaaa_buf
int sldns_str2wire_aaaa_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_AAAA from string to wireformat.
Definition: str2wire.c:1077
net_test
static void net_test(void)
test net code
Definition: unitmain.c:114
sldns_wire2str_rdata_buf
int sldns_wire2str_rdata_buf(uint8_t *rdata, size_t rdata_len, char *str, size_t str_len, uint16_t rrtype)
Convert RDATA to string presentation format, on one line.
Definition: wire2str.c:265
dns64_qstate
Per-query module-specific state.
Definition: dns64.c:87
val_get_mem
size_t val_get_mem(struct module_env *env, int id)
Debug helper routine that assists worker in determining memory in use.
Definition: validator.c:3254
infra_edns_update
int infra_edns_update(struct infra_cache *infra, struct sockaddr_storage *addr, socklen_t addrlen, uint8_t *nm, size_t nmlen, int edns_version, time_t timenow)
Update edns information for the host.
Definition: infra.c:641
az_generate_wildcard_answer
static int az_generate_wildcard_answer(struct auth_zone *z, struct query_info *qinfo, struct regional *region, struct dns_msg *msg, struct auth_data *ce, struct auth_data *wildcard, struct auth_data *node)
generate answer for wildcard answer
Definition: authzone.c:3051
comm_point_tcp_accept_callback
void comm_point_tcp_accept_callback(int fd, short event, void *arg)
This routine is published for checks and tests, and is only used internally.
Definition: netevent.c:918
dtio_tap_callback
void dtio_tap_callback(int fd, short ATTR_UNUSED(bits), void *arg)
callback for dnstap listener
Definition: unbound-dnstap-socket.c:973
slabhash_delete
void slabhash_delete(struct slabhash *sl)
Delete hash table.
Definition: slabhash.c:87
anchor_has_keytag
int anchor_has_keytag(struct val_anchors *anchors, uint8_t *name, int namelabs, size_t namelen, uint16_t dclass, uint16_t keytag)
Check if there is a trust anchor for given zone with this keytag.
Definition: val_anchor.c:1314
edns_data::ext_rcode
uint8_t ext_rcode
Extended RCODE.
Definition: msgparse.h:219
mesh_state::reply_list
struct mesh_reply * reply_list
the list of replies to clients for the results
Definition: mesh.h:176
acl_addr::tag_datas
struct config_strlist ** tag_datas
array per tagnumber, with per tag a list of rdata strings.
Definition: acl_list.h:103
autr_write_file
void autr_write_file(struct module_env *env, struct trust_anchor *tp)
Write autotrust file.
Definition: autotrust.c:1173
nsec3_prove_nodata
enum sec_status nsec3_prove_nodata(struct module_env *env, struct val_env *ve, struct ub_packed_rrset_key **list, size_t num, struct query_info *qinfo, struct key_entry_key *kkey)
Determine if the NSEC3s provided in a response prove the NOERROR/NODATA status.
Definition: val_nsec3.c:1224
autr_global_data::probe
rbtree_type probe
rbtree of autotrust anchors sorted by next probe time.
Definition: autotrust.h:130
val_env::neg_cache
struct val_neg_cache * neg_cache
aggressive negative cache.
Definition: validator.h:86
worker_alloc_cleanup
void worker_alloc_cleanup(void *arg)
cleanup the cache to remove all rrset IDs from it, arg is worker
Definition: worker.c:2020
ub_event_free
void ub_event_free(struct ub_event *ev)
free the event
Definition: ub_event.c:380
compress_tree_node::right
struct compress_tree_node * right
right node in tree, all larger than this
Definition: msgencode.c:81
msgparse.h
timehist_setup
struct timehist * timehist_setup(void)
Setup a histogram, default.
Definition: timehist.c:84
server_stats_init
void server_stats_init(struct ub_server_stats *stats, struct config_file *cfg)
Initialize server stats to 0.
Definition: stats.c:87
cachedb_backend::deinit
void(* deinit)(struct module_env *, struct cachedb_env *)
Deinit - close db for program exit.
Definition: cachedb.h:79
mesh_state::node
rbnode_type node
node in mesh_area all tree, key is this struct.
Definition: mesh.h:169
config_file::serve_expired_ttl
int serve_expired_ttl
serve expired entries until TTL after expiration
Definition: config_file.h:368
donotq_apply_cfg
int donotq_apply_cfg(struct iter_donotq *dq, struct config_file *cfg)
Process donotqueryaddresses config.
Definition: iter_donotq.c:123
LDNS_RR_TYPE_ANY
@ LDNS_RR_TYPE_ANY
any type (wildcard)
Definition: rrdef.h:224
PF_INET6
#define PF_INET6
define in case streamtcp is compiled on legacy systems
Definition: streamtcp.c:65
get_opcode
static int get_opcode(uint8_t *pkt, size_t pktlen)
returns opcode from packet
Definition: testpkts.c:750
ub_strerror
const char * ub_strerror(int err)
Convert error value to a human readable string.
Definition: libunbound.c:888
SENTINEL_IS
#define SENTINEL_IS
Root key sentinel is ta preamble.
Definition: validator.h:71
daemon::pidfile
char * pidfile
pidfile that is used
Definition: daemon.h:82
config_parser_state::errors
int errors
number of errors encountered
Definition: config_file.h:1207
sldns_wire2str_nsec3_salt_scan
int sldns_wire2str_nsec3_salt_scan(uint8_t **data, size_t *data_len, char **str, size_t *str_len)
Scan wireformat nsec3_salt field to string, with user buffers.
Definition: wire2str.c:1302
LDNS_RDF_TYPE_EUI64
@ LDNS_RDF_TYPE_EUI64
8 * 8 bit hex numbers separated by dashes.
Definition: rrdef.h:339
RESPONSE_TYPE_REC_LAME
@ RESPONSE_TYPE_REC_LAME
Recursion lame means that the nameserver is some sort of open recursor, and not authoritative for the...
Definition: iter_resptype.h:91
respip_rewrite_reply
int respip_rewrite_reply(const struct query_info *qinfo, const struct respip_client_info *cinfo, const struct reply_info *rep, struct reply_info **new_repp, struct respip_action_info *actinfo, struct ub_packed_rrset_key **alias_rrset, int search_only, struct regional *region, struct auth_zones *az)
See if any IP-based action should apply to any IP address of AAAA/A answer record in the reply.
Definition: respip.c:896
NUM_BUCKETS_HIST
#define NUM_BUCKETS_HIST
Number of buckets in a histogram.
Definition: timehist.h:46
stream_wait_lock_inited
static int stream_wait_lock_inited
is the lock initialised for stream wait buffers
Definition: listen_dnsport.c:86
az_add_additionals_from
static int az_add_additionals_from(struct auth_zone *z, struct regional *region, struct dns_msg *msg, struct auth_rrset *rrset, size_t offset)
add additional A/AAAA from domain names in rrset rdata (+offset) offset is number of bytes in rdata w...
Definition: authzone.c:2299
dnskeyset_verify_rrset_sig
enum sec_status dnskeyset_verify_rrset_sig(struct module_env *env, struct val_env *ve, time_t now, struct ub_packed_rrset_key *rrset, struct ub_packed_rrset_key *dnskey, size_t sig_idx, struct rbtree_type **sortree, char **reason, sldns_pkt_section section, struct module_qstate *qstate)
verify rrset, with dnskey rrset, for a specific rrsig in rrset
Definition: val_sigcrypt.c:594
context_obtain_alloc
struct alloc_cache * context_obtain_alloc(struct ub_ctx *ctx, int locking)
Get a new alloc.
Definition: context.c:180
packed_rrset_data::rrsig_count
size_t rrsig_count
number of rrsigs, if 0 no rrsigs
Definition: packed_rrset.h:242
sldns_wire2str_pkt_buf
int int sldns_wire2str_pkt_buf(uint8_t *data, size_t data_len, char *str, size_t str_len)
Convert wireformat packet to a string representation with user buffer It appends every RR with defaul...
Definition: wire2str.c:247
sldns_str2wire_tag_buf
int sldns_str2wire_tag_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_TAG from string to wireformat.
Definition: str2wire.c:2015
dname_test_canoncmp
static void dname_test_canoncmp(void)
test dname_canonical_compare
Definition: unitdname.c:511
autr_point_data::keys
struct autr_ta * keys
the keys
Definition: autotrust.h:97
lruhash_insert_or_retrieve
struct lruhash_entry * lruhash_insert_or_retrieve(struct lruhash *table, hashvalue_type hash, struct lruhash_entry *entry, void *data, void *cb_arg)
Insert a new element into the hashtable, or retrieve the corresponding element of it exits.
Definition: lruhash.c:576
comm_point_tcp_handle_callback
void comm_point_tcp_handle_callback(int fd, short event, void *arg)
This routine is published for checks and tests, and is only used internally.
Definition: netevent.c:1768
sldns_wire2str_unknown_scan
int sldns_wire2str_unknown_scan(uint8_t **d, size_t *dl, char **s, size_t *sl)
Scan wireformat type unknown field to string, with user buffers.
Definition: wire2str.c:1342
tcp_send_list::done
size_t done
how much of the item has already been transmitted
Definition: delayer.c:108
accept_open
static int accept_open(struct daemon_remote *rc, int fd)
open accept commpoint
Definition: remote.c:395
copy_state_to_super
void copy_state_to_super(struct module_qstate *qstate, int id, struct module_qstate *super)
Copy state that may have happened in the subquery and is always relevant to the super.
ub_timer_add
int ub_timer_add(struct ub_event *ev, struct ub_event_base *base, void(*cb)(int, short, void *), void *arg, struct timeval *tv)
Reconfigure and activate a timeout event.
Definition: ub_event.c:399
config_auth
Auth config options.
Definition: config_file.h:654
dt_io_thread::client_key_file
char * client_key_file
client cert files: the .key file
Definition: dtstream.h:218
cfg_scan_ports
int cfg_scan_ports(int *avail, int num)
Scan ports available.
Definition: config_file.c:1590
val_neg_zone_compare
int val_neg_zone_compare(const void *a, const void *b)
Comparison function for rbtree val neg zone elements.
Definition: val_neg.c:73
RR_COUNT_MAX
#define RR_COUNT_MAX
number of rrs and rrsets for integer overflow protection.
Definition: packed_rrset.h:69
algo_needs_init_ds
void algo_needs_init_ds(struct algo_needs *n, struct ub_packed_rrset_key *ds, int fav_ds_algo, uint8_t *sigalg)
Initialize algo needs structure, set algos from rrset as needed.
Definition: val_sigcrypt.c:425
infra_data::edns_lame_known
uint8_t edns_lame_known
if the EDNS lameness is already known or not.
Definition: infra.h:89
auth_data_del
static void auth_data_del(rbnode_type *n, void *ATTR_UNUSED(arg))
helper traverse to delete zones
Definition: authzone.c:378
respip_addr_lookup
static struct resp_addr * respip_addr_lookup(const struct reply_info *rep, struct respip_set *rs, size_t *rrset_id)
Search the given 'iptree' for response address information that matches any of the IP addresses in an...
Definition: respip.c:604
LDNS_RR_TYPE_GPOS
@ LDNS_RR_TYPE_GPOS
RFC1712.
Definition: rrdef.h:137
lookinfo::async_id
int async_id
tracking number that can be used to cancel the query
Definition: asynclook.c:86
process_answer_detail
static int process_answer_detail(struct ub_ctx *ctx, uint8_t *msg, uint32_t len, ub_callback_type *cb, void **cbarg, int *err, struct ub_result **res)
process answer from bg worker
Definition: libunbound.c:518
nsec3_cached_hash::node
rbnode_type node
rbtree node, key is this structure
Definition: val_nsec3.h:230
outbound_entry::next
struct outbound_entry * next
next in list
Definition: outbound_list.h:63
iter_merge_retry_counts
void iter_merge_retry_counts(struct delegpt *dp, struct delegpt *old)
Add retry counts from older delegpt to newer delegpt.
Definition: iter_utils.c:1299
sldns_wire2str_ipseckey_scan
int sldns_wire2str_ipseckey_scan(uint8_t **d, size_t *dl, char **s, size_t *sl, uint8_t *pkt, size_t pktlen, int *comprloop)
Scan wireformat IPSECKEY field to string, with user buffers.
Definition: wire2str.c:1586
comm_point::tcp_req_info
struct tcp_req_info * tcp_req_info
the structure to keep track of open requests on this channel
Definition: netevent.h:272
iter_apply_cfg
int iter_apply_cfg(struct iter_env *iter_env, struct config_file *cfg)
Process config options and set iterator module state.
Definition: iter_utils.c:144
slabhash_setmarkdel
void slabhash_setmarkdel(struct slabhash *sl, lruhash_markdelfunc_type md)
Set markdel function.
Definition: slabhash.c:218
val_kentry.h
pending_cmp
int pending_cmp(const void *key1, const void *key2)
compare function of pending rbtree
Definition: outside_network.c:93
comm_point_callback_type
int comm_point_callback_type(struct comm_point *, void *, int, struct comm_reply *)
callback from communication point function type
Definition: netevent.h:77
outgoing_ssl_fd
void * outgoing_ssl_fd(void *sslctx, int fd)
connect a new fd and wrap it in a BIO in SSL
Definition: net_help.c:1227
processCollectClass
static int processCollectClass(struct module_qstate *qstate, int id)
Collect class ANY responses and make them into one response.
Definition: iterator.c:3462
comm_point_start_listening
void comm_point_start_listening(struct comm_point *c, int newfd, int msec)
Start listening again for input on the comm point.
Definition: netevent.c:3204
node_create
static struct addrnode * node_create(struct addrtree *tree, void *elem, addrlen_t scope, time_t ttl)
Create a new node.
Definition: addrtree.c:90
bin_delete
void bin_delete(struct lruhash *table, struct lruhash_bin *bin)
delete the hash bin and entries inside it
Definition: lruhash.c:98
pending
A query that has an answer pending for it.
Definition: outside_network.h:217
module_env::add_sub
int(* add_sub)(struct module_qstate *qstate, struct query_info *qinfo, uint16_t qflags, int prime, int valrec, struct module_qstate **newq, struct mesh_state **sub)
Add detached query.
Definition: module.h:433
http_write_more
static int http_write_more(int fd, struct comm_point *c)
write more data for http
Definition: netevent.c:2357
msgparse_hashtable_lookup
struct rrset_parse * msgparse_hashtable_lookup(struct msg_parse *msg, struct sldns_buffer *pkt, hashvalue_type h, uint32_t rrset_flags, uint8_t *dname, size_t dnamelen, uint16_t type, uint16_t dclass)
Lookup in msg hashtable to find a rrset.
Definition: msgparse.c:221
dns_cache_lookup
struct dns_msg * dns_cache_lookup(struct module_env *env, uint8_t *qname, size_t qnamelen, uint16_t qtype, uint16_t qclass, uint16_t flags, struct regional *region, struct regional *scratch, int no_partial)
Find cached message.
Definition: dns.c:801
libworker_alloc_cleanup
void libworker_alloc_cleanup(void *arg)
cleanup the cache to remove all rrset IDs from it, arg is libworker
Definition: libworker.c:846
val_neg_zone::dclass
uint16_t dclass
class of node; host order
Definition: val_neg.h:126
main_sigh
static RETSIGTYPE main_sigh(int sig)
signal handler for user quit
Definition: unbound-dnstap-socket.c:1205
comm_point_perform_accept
int comm_point_perform_accept(struct comm_point *c, struct sockaddr_storage *addr, socklen_t *addrlen)
perform accept(2) with error checking.
Definition: netevent.c:789
auth_zone_find_less_equal
static int auth_zone_find_less_equal(struct auth_zones *az, uint8_t *nm, size_t nmlen, uint16_t dclass, struct auth_zone **z)
find an auth zone or sorted less-or-equal, return true if exact
Definition: authzone.c:471
waiting_tcp_delete
static void waiting_tcp_delete(struct waiting_tcp *w)
delete waiting_tcp entry.
Definition: outside_network.c:138
auth_probe::lookup_aaaa
int lookup_aaaa
are we looking up A or AAAA, first A, then AAAA (if ip6 enabled)
Definition: authzone.h:321
fptr_whitelist_start_accept
int fptr_whitelist_start_accept(void(*fptr)(void *))
Check function pointer whitelist for start_accept callback values.
Definition: fptr_wlist.c:151
sldns_str2wire_b32_ext_buf
int sldns_str2wire_b32_ext_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_B32_EXT from string to wireformat.
Definition: str2wire.c:1222
config_file::val_permissive_mode
int val_permissive_mode
should validator allow bogus messages to go through
Definition: config_file.h:360
edns-subnet.h
addrtree_insert
void addrtree_insert(struct addrtree *tree, const addrkey_t *addr, addrlen_t sourcemask, addrlen_t scope, void *elem, time_t ttl, time_t now)
Insert an element in the tree.
Definition: addrtree.c:359
soa_in_auth
static int soa_in_auth(struct msg_parse *msg)
Check if there are SOA records in the authority section (negative)
Definition: iter_scrub.c:339
parseutil.h
iter_qstate::deleg_msg
struct dns_msg * deleg_msg
Current delegation message - returned for non-RD queries.
Definition: iterator.h:295
sldns_wire2str_type
char * sldns_wire2str_type(uint16_t rrtype)
Convert wire RR type to a string, 'MX', 'TYPE1234'...
Definition: wire2str.c:217
ecs_query_response
int ecs_query_response(struct module_qstate *qstate, struct dns_msg *response, int id, void *cbargs)
Remove ECS record from back_out when query resulted in REFUSED response.
infra_data::rec_lame
uint8_t rec_lame
is the host recursion lame (not AA, but RA)
Definition: infra.h:95
remove_configfile
void remove_configfile(void)
remove config file at exit
Definition: testbound.c:336
serviced_query::pending
void * pending
the UDP or TCP query that is pending, see status which
Definition: outside_network.h:394
fptr_whitelist_pending_udp
int fptr_whitelist_pending_udp(comm_point_callback_type *fptr)
Check function pointer whitelist for pending udp callback values.
Definition: fptr_wlist.c:193
iter_qstate::an_prepend_list
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...
Definition: iterator.h:257
dt_frame_read_buf::frame_len
uint32_t frame_len
Frame length field.
Definition: dtstream.h:104
donotq_create
struct iter_donotq * donotq_create(void)
Create donotqueryaddresses structure.
Definition: iter_donotq.c:52
msgreply_entry
Structure to keep hash table entry for message replies.
Definition: msgreply.h:217
sldns_str2wire_eui48_buf
int sldns_str2wire_eui48_buf(const char *str, uint8_t *rd, size_t *len)
Convert rdf of type LDNS_RDF_TYPE_EUI48 from string to wireformat.
Definition: str2wire.c:1971
ub_event_base_dispatch
int ub_event_base_dispatch(struct ub_event_base *base)
Run the event base.
Definition: ub_event_pluggable.c:486
lz_enter_data
static int lz_enter_data(struct local_zones *zones, struct config_file *cfg)
enter auth data
Definition: localzone.c:1029
chunklist_sum
static size_t chunklist_sum(struct auth_chunk *list)
sum sizes of chunklist
Definition: authzone.c:4351
rbtree_type
definition for tree struct
Definition: rbtree.h:76
mesh_state_add_reply
int mesh_state_add_reply(struct mesh_state *s, struct edns_data *edns, struct comm_reply *rep, uint16_t qid, uint16_t qflags, const struct query_info *qinfo)
Create new reply structure and attach it to a mesh state.
Definition: mesh.c:1474
serviced_query::serviced_query_UDP
@ serviced_query_UDP
UDP without EDNS sent.
Definition: outside_network.h:363
ALLOC_REG_SIZE
#define ALLOC_REG_SIZE
custom size of cached regional blocks
Definition: alloc.c:49
respip_conf_data_test
static void respip_conf_data_test(void)
Test global respip redirect w/ data directives.
Definition: unitmain.c:772
az_add_negative_soa
static int az_add_negative_soa(struct auth_zone *z, struct regional *region, struct dns_msg *msg)
add negative SOA record (with negative TTL)
Definition: authzone.c:2331
infra_ip_create_ratedata
static void infra_ip_create_ratedata(struct infra_cache *infra, struct comm_reply *repinfo, time_t timenow)
create rate data item for ip address
Definition: infra.c:855
handle_event_moddone
static enum module_ext_state handle_event_moddone(struct module_qstate *qstate, int id)
Handles the "done" event for a query.
Definition: dns64.c:611
THRNUM_SHIFT
#define THRNUM_SHIFT
number of bits for ID part of uint64, rest for number of threads.
Definition: alloc.c:51
auth_xfer_probe_udp_callback
int auth_xfer_probe_udp_callback(struct comm_point *c, void *arg, int err, struct comm_reply *repinfo)
callback for task_probe udp packets
Definition: authzone.c:6157
autr_read_file
int autr_read_file(struct val_anchors *anchors, const char *nm)
Read autotrust file.
Definition: autotrust.c:985
match_all
int match_all(uint8_t *q, size_t qlen, uint8_t *p, size_t plen, int mttl, int noloc)
match two packets, all must match
Definition: testpkts.c:1297
name_tree_lookup
struct name_tree_node * name_tree_lookup(rbtree_type *tree, uint8_t *name, size_t len, int labs, uint16_t dclass)
Lookup closest encloser in name tree.
Definition: dnstree.c:178
key_entry_get_reason
char * key_entry_get_reason(struct key_entry_key *kkey)
Get reason why a key is bad.
Definition: val_kentry.c:248
outside_network_quit_prepare
void outside_network_quit_prepare(struct outside_network *outnet)
Prepare for quit.
Definition: outside_network.c:903
sldns_wire2str_aaaa_scan
int sldns_wire2str_aaaa_scan(uint8_t **data, size_t *data_len, char **str, size_t *str_len)
Scan wireformat ip6 AAAA field to string, with user buffers.
Definition: wire2str.c:1104
log_query_in
void log_query_in(const char *str, uint8_t *name, uint16_t type, uint16_t dclass)
Like log_nametypeclass, but logs with log_query for query logging.
Definition: net_help.c:513
ub_libevent_get_event_base
struct event_base * ub_libevent_get_event_base(struct ub_event_base *base)
Return the libevent base underlying the given ub_event_base.
Definition: ub_event.c:252
config_file::control_cert_file
char * control_cert_file
certificate file for unbound-control
Definition: config_file.h:448
new_rrset
static struct ub_packed_rrset_key * new_rrset(struct regional *region, uint16_t rrtype, uint16_t rrclass)
allocate and initialize an rrset structure; this function is based on new_local_rrset() from the loca...
Definition: respip.c:223
config_auth::for_downstream
int for_downstream
provide downstream answers
Definition: config_file.h:668
donotq_apply_cfg
int donotq_apply_cfg(struct iter_donotq *donotq, struct config_file *cfg)
Process donotqueryaddresses config.
Definition: iter_donotq.c:123
mesh_new_client
void mesh_new_client(struct mesh_area *mesh, struct query_info *qinfo, struct respip_client_info *cinfo, uint16_t qflags, struct edns_data *edns, struct comm_reply *rep, uint16_t qid)
New query incoming from clients.
Definition: mesh.c:453
last_space_pos
static char * last_space_pos(const char *str)
return last space character in string
Definition: config_file.c:2180
config_file::shm_key
int shm_key
SHM data - key for the shm.
Definition: config_file.h:554
listen_sslctx_setup_ticket_keys
int listen_sslctx_setup_ticket_keys(void *sslctx, struct config_strlist *tls_session_ticket_keys)
setup TLS session ticket
Definition: net_help.c:1374
check_hints
static void check_hints(struct config_file *cfg)
check hints
Definition: unbound-checkconf.c:841
tcl_addr
An address span with connection limit information.
Definition: tcp_conn_limit.h:67
rrset_trust_auth_noAA
@ rrset_trust_auth_noAA
Data from the authority section of a non-authoritative answer.
Definition: packed_rrset.h:146
lru_front
void lru_front(struct lruhash *table, struct lruhash_entry *entry)
Put entry at front of lru.
Definition: lruhash.c:266
rate_key::entry
struct lruhash_entry entry
lruhash key entry
Definition: infra.h:145
tcl_new_connection
int tcl_new_connection(struct tcl_addr *tcl)
Increment TCP connection count if found, provided the count was below the limit.
Definition: tcp_conn_limit.c:155
ub_thr_fork_create
void ub_thr_fork_create(ub_thread_type *thr, void *(*func)(void *), void *arg)
No threading available: fork a new process.
Definition: locks.c:113
addr_tree_node::node
rbnode_type node
rbtree node, key is this struct : proto and subnet
Definition: dnstree.h:79
local_zones_delete
void local_zones_delete(struct local_zones *zones)
Delete local zones storage.
Definition: localzone.c:82
send_file
static void send_file(SSL *ssl, int fd, FILE *in, char *buf, size_t sz)
send stdin to server
Definition: unbound-control.c:737
neg_find_data
static struct val_neg_data * neg_find_data(struct val_neg_zone *zone, uint8_t *nm, size_t len, int labs)
Find the given data.
Definition: val_neg.c:304
ub_signal_new
struct ub_event * ub_signal_new(struct ub_event_base *base, int fd, void(*cb)(int, short, void *), void *arg)
Create a new ub_event signal for the event base.
Definition: ub_event.c:314
http_parse_origin
static int http_parse_origin(sldns_buffer *buf, struct sldns_file_parse_state *pstate)
process $ORIGIN for http
Definition: authzone.c:4254
iter_priv::a
rbtree_type a
Tree of the address spans that are blocked.
Definition: iter_priv.h:63
testadd
static void testadd(struct slabhash *table, testdata_type *ref[])
test adding a random element
Definition: unitslabhash.c:109
sldns_wirerr_get_rdatawl
uint8_t * sldns_wirerr_get_rdatawl(uint8_t *rr, size_t len, size_t dname_len)
Get the rdata pointer of the RR.
Definition: str2wire.c:833
rrset_get_ttl
static uint32_t rrset_get_ttl(struct ub_packed_rrset_key *k)
get ttl of rrset
Definition: val_nsec.c:54
neg_closest_data
static int neg_closest_data(struct val_neg_zone *zone, uint8_t *qname, size_t len, int labs, struct val_neg_data **data)
Lookup closest data record.
Definition: val_neg.c:948
mesh_state::run_node
rbnode_type run_node
node in mesh_area runnable tree, key is this struct
Definition: mesh.h:171
proxy::s
int s
the fd to listen for replies from server
Definition: delayer.c:78
outbound_list_remove
void outbound_list_remove(struct outbound_list *list, struct outbound_entry *e)
Remove an entry from the list, and deletes it.
Definition: outbound_list.c:78
sanitize_nsec_is_overreach
static int sanitize_nsec_is_overreach(struct rrset_parse *rrset, uint8_t *zonename)
Check if right hand name in NSEC is within zone.
Definition: iter_scrub.c:647
chunk_rrlist_start
static void chunk_rrlist_start(struct auth_xfer *xfr, struct auth_chunk **rr_chunk, int *rr_num, size_t *rr_pos)
RR list iterator, returns RRs from answer section one by one from the dns packets in the chunklist.
Definition: authzone.c:4416
get_additional_name
static int get_additional_name(struct rrset_parse *rrset, struct rr_parse *rr, uint8_t **nm, size_t *nmlen, sldns_buffer *pkt)
get additional name from rrset RR, return false if no name present
Definition: iter_scrub.c:111
respip_redirect
@ respip_redirect
redirect as per provided data
Definition: localzone.h:542
PREFETCH_EXPIRY_ADD
#define PREFETCH_EXPIRY_ADD
seconds to add to prefetch leeway.
Definition: worker.c:110
worker::thr_id
ub_thread_type thr_id
thread id
Definition: worker.h:88
dt_io_thread::cur_msg_len
size_t cur_msg_len
length of the current message
Definition: dtstream.h:162
lruhash::size
size_t size
the size of the lookup array
Definition: lruhash.h:164
newkey
static testkey_type * newkey(int id)
allocate new key, fill in hash
Definition: unitslabhash.c:63
sldns_wirerr_get_rdatalen
uint16_t sldns_wirerr_get_rdatalen(uint8_t *rr, size_t len, size_t dname_len)
Get the rdata length of the RR.
Definition: str2wire.c:819
lruhash_insert
void lruhash_insert(struct lruhash *table, hashvalue_type hash, struct lruhash_entry *entry, void *data, void *cb_override)
Insert a new element into the hashtable.
Definition: lruhash.c:300
infra_ratelimit_dec
void infra_ratelimit_dec(struct infra_cache *infra, uint8_t *name, size_t namelen, time_t timenow)
Decrement the query rate counter for a delegation point.
Definition: infra.c:958
dns64_adjust_a
static void dns64_adjust_a(int id, struct module_qstate *super, struct module_qstate *qstate)
Synthesize an AAAA RR set from an A sub-query's answer and add it to the original empty response.
Definition: dns64.c:803
VAL_CLASS_REFERRAL
@ VAL_CLASS_REFERRAL
A referral, from cache with a nonRD query.
Definition: val_utils.h:78
respip_state
respip_state
Query state regarding the response-ip module.
Definition: respip.c:38
domain_remove_rrset
static void domain_remove_rrset(struct auth_data *node, uint16_t rr_type)
remove rrset of this type from domain
Definition: authzone.c:662
ub_signal_del
int ub_signal_del(struct ub_event *ev)
Deactivate a signal event.
Definition: ub_event_pluggable.c:641
comm_reply::addr
struct sockaddr_storage addr
the address (for UDP based communication)
Definition: netevent.h:117
iter_store_parentside_NS
void iter_store_parentside_NS(struct module_env *env, struct reply_info *rep)
Store parent-side NS records from a referral message.
Definition: iter_utils.c:1098
taglist_intersect
int taglist_intersect(uint8_t *list1, size_t list1len, const uint8_t *list2, size_t list2len)
see if two taglists intersect (have tags in common).
Definition: config_file.c:2015
respip_refuse
@ respip_refuse
serves response data (if any), else, drops queries.
Definition: localzone.h:564
slab_test_thr::table
struct slabhash * table
hash table
Definition: unitslabhash.c:306
connect_sslctx_create
void * connect_sslctx_create(char *key, char *pem, char *verifypem, int wincert)
create SSL connect context
Definition: net_help.c:1127
config_file::dnstap_log_client_query_messages
int dnstap_log_client_query_messages
true to log dnstap CLIENT_QUERY message events
Definition: config_file.h:514
ring_add
static void ring_add(struct ringbuf *r, sldns_buffer *pkt, struct timeval *now, struct timeval *delay, struct proxy *p)
add entry to ringbuffer
Definition: delayer.c:225
service
static void service(const char *bind_str, int bindport, const char *serv_str, size_t memsize, int delay_msec)
delayer main service routine
Definition: delayer.c:993
check_contains_revoked
static void check_contains_revoked(struct module_env *env, struct val_env *ve, struct trust_anchor *tp, struct ub_packed_rrset_key *dnskey_rrset, int *changed, struct module_qstate *qstate)
check for revoked keys without trusting any other information
Definition: autotrust.c:1523
infra_cache
Infra cache.
Definition: infra.h:112
str_find_first_of_chars
static char * str_find_first_of_chars(char *s, char a, char b)
find first of two characters
Definition: authzone.c:6834
UB_STATS_QTYPE_NUM
#define UB_STATS_QTYPE_NUM
number of qtype that is stored for in array
Definition: unbound.h:650
fptr_whitelist_inplace_cb_edns_back_parsed
int fptr_whitelist_inplace_cb_edns_back_parsed(inplace_cb_edns_back_parsed_func_type *fptr)
Check function pointer whitelist for inplace_cb_edns_back_parsed func values.
Definition: fptr_wlist.c:648
sldns_fget_token
ssize_t sldns_fget_token(FILE *f, char *token, const char *delim, size_t limit)
returns a token/char from the stream F.
Definition: parse.c:27
pending_tcp
Pending TCP query to server.
Definition: outside_network.h:255
tcp_req_info::is_reply
int is_reply
is the comm point set to send_reply (by mesh new client in worker handle), if so answer is available ...
Definition: listen_dnsport.h:260
parse_edns_options
static int parse_edns_options(uint8_t *rdata_ptr, size_t rdata_len, struct edns_data *edns, struct regional *region)
parse EDNS options from EDNS wireformat rdata
Definition: msgparse.c:943
module_func_block::init
int(* init)(struct module_env *env, int id)
init the module.
Definition: module.h:682
reset_worker_timer
static void reset_worker_timer(struct module_env *env)
reset worker timer
Definition: autotrust.c:2027
UB_STATS_BUCKET_NUM
#define UB_STATS_BUCKET_NUM
number of histogram buckets
Definition: unbound.h:658
sldns_buffer::_status_err
unsigned _status_err
The current state of the buffer.
Definition: sbuffer.h:136
dname_query_hash
hashvalue_type dname_query_hash(uint8_t *dname, hashvalue_type h)
Hash dname, label by label, lowercasing, into hashvalue.
Definition: dname.c:287
comm_point_send_udp_msg
int comm_point_send_udp_msg(struct comm_point *c, sldns_buffer *packet, struct sockaddr *addr, socklen_t addrlen)
Send an udp message over a commpoint.
Definition: fake_event.c:1734
sldns_buffer_available
INLINE int sldns_buffer_available(sldns_buffer *buffer, size_t count)
checks if the buffer has count bytes available at the current position
Definition: sbuffer.h:421
ub_ctx_get_option
int ub_ctx_get_option(struct ub_ctx *ctx, const char *opt, char **str)
Get an option from the context.
Definition: libunbound.c:361
ipsecmod_qstate::is_whitelisted
int is_whitelisted
If the qname is whitelisted or not.
Definition: ipsecmod.h:68
ds_digest_algo_is_supported
int ds_digest_algo_is_supported(struct ub_packed_rrset_key *ds_rrset, size_t ds_idx)
See if DS digest algorithm is supported.
Definition: val_sigcrypt.c:359
addr_in_common
int addr_in_common(struct sockaddr_storage *addr1, int net1, struct sockaddr_storage *addr2, int net2, socklen_t addrlen)
See how many bits are shared, equal, between two addrs.
Definition: net_help.c:698
daemon_remote_stop_accept
void daemon_remote_stop_accept(struct daemon_remote *rc)
Stop accept handlers for TCP (until enabled again)
Definition: remote.c:428
config_file::serve_expired
int serve_expired
serve expired entries and prefetch them
Definition: config_file.h:366
tcp_req_info_setup_listen
static void tcp_req_info_setup_listen(struct tcp_req_info *req)
setup listening for read or write
Definition: listen_dnsport.c:1682
replay_var_compare
int replay_var_compare(const void *a, const void *b)
compare two replay_vars
Definition: replay.c:556
dnsc_chroot_path
static char * dnsc_chroot_path(struct config_file *cfg, char *path)
Given an absolute path on the original root, returns the absolute path within the chroot.
Definition: dnscrypt.c:559
slabhash_get_size
size_t slabhash_get_size(struct slabhash *table)
Retrieve slab hash total size.
Definition: slabhash.c:145
get_rdf_size
size_t get_rdf_size(sldns_rdf_type rdf)
Obtain size in the packet of an rr type, that is before dname type.
Definition: msgparse.c:599
MAX_VALUE
#define MAX_VALUE
Max random value.
Definition: random.c:79
ub_ctx_config
int ub_ctx_config(struct ub_ctx *ctx, const char *fname)
setup configuration for the given context.
Definition: libunbound.c:374
ta_key::len
size_t len
length of the rdata (including rdlength).
Definition: val_anchor.h:85
perffree
static void perffree(struct perfinfo *info)
cleanup perf test environment
Definition: perf.c:257
probe_copy_masters_for_allow_notify
static void probe_copy_masters_for_allow_notify(struct auth_xfer *xfr)
copy the master addresses from the task_probe lookups to the allow_notify list of masters
Definition: authzone.c:3728
local_zone_invalid
@ local_zone_invalid
Invalid type, cannot be used to generate answer.
Definition: localzone.h:102
acl_list_get_mem
size_t acl_list_get_mem(struct acl_list *acl)
Get memory used by acl structure.
Definition: acl_list.c:485
select_ifport
static int select_ifport(struct outside_network *outnet, struct pending *pend, int num_if, struct port_if *ifs)
Select random interface and port.
Definition: outside_network.c:1115
infra_cache::hosts
struct slabhash * hosts
The hash table with hosts.
Definition: infra.h:114
parse_rr_copy
static int parse_rr_copy(sldns_buffer *pkt, struct rrset_parse *pset, struct packed_rrset_data *data)
copy over the data into packed rrset
Definition: msgreply.c:268
val_neg_zone::nsec3_iter
size_t nsec3_iter
nsec3 iteration count in use
Definition: val_neg.h:115
msg_parse
Data stored in scratch pad memory during parsing.
Definition: msgparse.h:95
libworker_handle_control_cmd
void libworker_handle_control_cmd(struct tube *tube, uint8_t *msg, size_t len, int err, void *arg)
handle control command coming into server
addr_matches_master
static int addr_matches_master(struct auth_master *master, struct sockaddr_storage *addr, socklen_t addrlen, struct auth_master **fromhost)
check if an address matches a master specification (or one of its addresses in the addr list)
Definition: authzone.c:3452
forwards_lookup_root
struct delegpt * forwards_lookup_root(struct iter_forwards *fwd, uint16_t qclass)
Same as forwards_lookup, but for the root only.
Definition: iter_fwd.c:390
val_qstate::empty_DS_name
uint8_t * empty_DS_name
domain name for empty nonterminal detection
Definition: validator.h:203
O_LST
#define O_LST(opt, name, lst)
compare and print list option
Definition: config_file.c:858
libworker_handle_reply
int libworker_handle_reply(struct comm_point *c, void *arg, int error, struct comm_reply *reply_info)
process incoming replies from the network
Definition: libworker.c:876
dtio_reconnect_slow
static void dtio_reconnect_slow(struct dt_io_thread *dtio, int msec)
reconnect slowly, because we already know we have to wait for a bit
Definition: dtstream.c:546
auth_transfer::on_ixfr
int on_ixfr
we are doing IXFR right now
Definition: authzone.h:399
sldns_wire2str_edns_option_code_print
int sldns_wire2str_edns_option_code_print(char **str, size_t *str_len, uint16_t opcode)
Print host format EDNS0 option to string.
Definition: wire2str.c:899
wsvc_rc_stop
void wsvc_rc_stop(FILE *out)
Stop the service from servicecontrolmanager, tells OS to stop daemon.
Definition: w_inst.c:300
slabhash_create
struct slabhash * slabhash_create(size_t numtables, size_t start_size, size_t maxmem, lruhash_sizefunc_type sizefunc, lruhash_compfunc_type compfunc, lruhash_delkeyfunc_type delkeyfunc, lruhash_deldatafunc_type deldatafunc, void *arg)
Create new slabbed hash table.
Definition: slabhash.c:48
auth_transfer::incoming_xfr_serial
uint32_t incoming_xfr_serial
the serial number for the current AXFR/IXFR incoming reply, for IXFR, the outermost SOA records seria...
Definition: authzone.h:409
auth_transfer::lookup_aaaa
int lookup_aaaa
are we looking up A or AAAA, first A, then AAAA (if ip6 enabled)
Definition: authzone.h:375
dt_io_thread_stop
void dt_io_thread_stop(struct dt_io_thread *dtio)
Stop the io thread.
Definition: dtstream.c:2084
comm_signal_delete
void comm_signal_delete(struct comm_signal *comsig)
Delete the signal communication point.
Definition: fake_event.c:990
val_neg_get_mem
size_t val_neg_get_mem(struct val_neg_cache *neg)
see how much memory is in use by the negative cache.
Definition: val_neg.c:103
sig_is_double
static int sig_is_double(sldns_buffer *pkt, struct rrset_parse *rrset, uint8_t *ttldata)
see if RRSIG is a duplicate of another
Definition: msgparse.c:707
reply_info_delete
void reply_info_delete(void *d, void *arg)
delete reply_info data structure
xml_data::tag
char * tag
the current tag; malloced; or NULL outside of tags
Definition: unbound-anchor.c:1197
sldns_wire2str_wks_scan
int sldns_wire2str_wks_scan(uint8_t **d, size_t *dl, char **s, size_t *sl)
Scan wireformat WKS field to string, with user buffers.
Definition: wire2str.c:1470
sldns_b64_pton_calculate_size
size_t sldns_b64_pton_calculate_size(size_t srcsize)
calculates the size needed to store the result of sldns_b64_pton
Definition: parseutil.c:672
auth_error_encode
static void auth_error_encode(struct query_info *qinfo, struct module_env *env, struct edns_data *edns, struct comm_reply *repinfo, sldns_buffer *buf, struct regional *temp, int rcode)
encode auth error answer
Definition: authzone.c:3303
sock_list
Linked list of sockaddrs May be allocated such that only 'len' bytes of addr exist for the structure.
Definition: module.h:574
config_file::num_queries_per_thread
size_t num_queries_per_thread
number of queries every thread can service
Definition: config_file.h:154
module_env::need_to_validate
int need_to_validate
is validation required for messages, controls client-facing validation status (AD bits) and servfails
Definition: module.h:486
val_operate
void val_operate(struct module_qstate *qstate, enum module_ev event, int id, struct outbound_entry *outbound)
validator operate on a query
Definition: validator.c:2480
optarg
char * optarg
getopt global, in case header files fail to declare it.
optarg
char * optarg
getopt global, in case header files fail to declare it.
entry::match_serial
uint8_t match_serial
match SOA serial number, from auth section
Definition: testpkts.h:184
usage
static void usage(void)
print usage.
Definition: unbound.c:143
pending_udp_timer_cb
void pending_udp_timer_cb(void *arg)
callback for udp timeout
Definition: outside_network.c:660
infra_ip_ratelimit_inc
int infra_ip_ratelimit_inc(struct infra_cache *infra, struct comm_reply *repinfo, time_t timenow, struct sldns_buffer *buffer)
Update query ratelimit hash and decide whether or not a query should be dropped.
Definition: infra.c:1006
O_LS3
#define O_LS3(opt, name, lst)
compare and print list option
Definition: config_file.c:872
val_deinit
void val_deinit(struct module_env *env, int id)
validator deinit
Definition: validator.c:193
find_tag_id
int find_tag_id(struct config_file *cfg, const char *tag)
Find tag ID in the tag list.
Definition: config_file.c:1912
dnskeyset_verify_rrset
enum sec_status dnskeyset_verify_rrset(struct module_env *env, struct val_env *ve, struct ub_packed_rrset_key *rrset, struct ub_packed_rrset_key *dnskey, uint8_t *sigalg, char **reason, sldns_pkt_section section, struct module_qstate *qstate)
Verify rrset against dnskey rrset.
Definition: val_sigcrypt.c:486
UB_STATS_QCLASS_NUM
#define UB_STATS_QCLASS_NUM
number of qclass that is stored for in array
Definition: unbound.h:652
log_hex_f
static void log_hex_f(enum verbosity_value v, const char *msg, void *data, size_t length)
log hex data
Definition: log.c:372
find_rrset
static int find_rrset(struct msg_parse *msg, sldns_buffer *pkt, uint8_t *dname, size_t dnamelen, uint16_t type, uint16_t dclass, hashvalue_type *hash, uint32_t *rrset_flags, uint8_t **prev_dname_first, uint8_t **prev_dname_last, size_t *prev_dnamelen, uint16_t *prev_type, uint16_t *prev_dclass, struct rrset_parse **rrset_prev, sldns_pkt_section section, struct regional *region)
Find rrset.
Definition: msgparse.c:461
comm_point_create_udp_ancil
struct comm_point * comm_point_create_udp_ancil(struct comm_base *base, int fd, struct sldns_buffer *buffer, comm_point_callback_type *callback, void *callback_arg)
Create an UDP with ancillary data comm point.
Definition: netevent.c:2574
priv_rrset_bad
int priv_rrset_bad(struct iter_priv *priv, sldns_buffer *pkt, struct rrset_parse *rrset)
See if rrset is bad.
Definition: iter_priv.c:232
mesh_create
struct mesh_area * mesh_create(struct module_stack *stack, struct module_env *env)
Allocate mesh, to empty.
Definition: mesh.c:242
perfinfo::exit
volatile int exit
need to exit
Definition: perf.c:79
auth_xfer_transfer_lookup_callback
void auth_xfer_transfer_lookup_callback(void *arg, int rcode, struct sldns_buffer *buf, enum sec_status sec, char *why_bogus, int was_ratelimited)
mesh callback for task_transfer on lookup of host names
service_tcp_relay
static void service_tcp_relay(struct tcp_proxy **tcp_proxies, struct timeval *now, struct timeval *delay, struct timeval *tcp_timeout, sldns_buffer *pkt, fd_set *rset, fd_set *rorig, fd_set *worig)
perform TCP relaying
Definition: delayer.c:743
sldns_buffer_rewind
INLINE void sldns_buffer_rewind(sldns_buffer *buffer)
make the buffer ready for re-reading the data.
Definition: sbuffer.h:220
q_ans::query
const char * query
query name, class, type
Definition: unitauth.c:60
auth_probe::only_lookup
int only_lookup
we only want to do lookups for making config work (for notify), don't proceed with UDP SOA probe quer...
Definition: authzone.h:324
match_noloc
static int match_noloc(char *q, char *p, uint8_t *q_pkt, size_t q_pkt_len, uint8_t *p_pkt, size_t p_pkt_len)
match two strings for unordered equality of RRs and everything else
Definition: testpkts.c:973
xfer_set_masters
int xfer_set_masters(struct auth_master **list, struct config_auth *c, int with_http)
Set masters in auth xfer structure from config.
Definition: authzone.c:6917
th_buck::count
size_t count
number of items
Definition: timehist.h:57
checkerr
static void checkerr(const char *desc, int err)
check error, if bad, exit with error message
Definition: asynclook.c:155
daemon.h
tcp_req_info_clear
void tcp_req_info_clear(struct tcp_req_info *req)
Clear tcp request structure.
Definition: listen_dnsport.c:1621
serve_expired_data
Struct to hold relevant data for serve expired.
Definition: module.h:588
val_env::bogus_lock
lock_basic_type bogus_lock
lock on bogus counter
Definition: validator.h:123
cfg_region_strlist_insert
int cfg_region_strlist_insert(struct regional *region, struct config_strlist **head, char *item)
insert with region for allocation.
Definition: config_file.c:1673
outside_network::base
struct comm_base * base
Base for select calls.
Definition: outside_network.h:72
anchors_get_mem
size_t anchors_get_mem(struct val_anchors *anchors)
Get memory in use by the trust anchor storage.
Definition: val_anchor.c:1202
acl_addr
An address span with access control information.
Definition: acl_list.h:88
LDNS_RR_TYPE_PTR
@ LDNS_RR_TYPE_PTR
a domain name pointer
Definition: rrdef.h:107
ub_server_stats::qbit_AD
long long qbit_AD
number of queries with AD bit
Definition: unbound.h:715
service_callback::cb_arg
void * cb_arg
user argument for callback function
Definition: outside_network.h:312
neg_clear_datas
static void neg_clear_datas(rbnode_type *n, void *ATTR_UNUSED(arg))
clear datas on cache deletion
Definition: val_neg.c:114
config_strbytelist::next
struct config_strbytelist * next
next item in list
Definition: config_file.h:760
NULL_KEY_TTL
#define NULL_KEY_TTL
This is the TTL to use when a trust anchor fails to prime.
Definition: validator.h:59
tcp_req_info_handle_read_close
int tcp_req_info_handle_read_close(struct tcp_req_info *req)
the read channel has closed
Definition: listen_dnsport.c:1762
outbound_list_insert
void outbound_list_insert(struct outbound_list *list, struct outbound_entry *e)
Insert new entry into the list.
Definition: outbound_list.c:68
ub_server_stats::num_query_subnet
long long num_query_subnet
number of queries answered from edns-subnet specific data
Definition: unbound.h:784
worker_work
void worker_work(struct worker *worker)
Make worker work.
Definition: worker.c:1947
anchor_insert_insecure
static struct trust_anchor * anchor_insert_insecure(struct val_anchors *anchors, const char *str)
Insert insecure anchor.
Definition: val_anchor.c:381
server_stats_obtain
void server_stats_obtain(struct worker *worker, struct worker *who, struct ub_stats_info *s, int reset)
Obtain the stats info for a given thread.
Definition: stats.c:361
infra_find_ratelimit
int infra_find_ratelimit(struct infra_cache *infra, uint8_t *name, size_t namelen)
find the ratelimit in qps for a domain.
Definition: infra.c:752
next_state
static int next_state(struct iter_qstate *iq, enum iter_state nextstate)
Transition to the next state.
Definition: iterator.c:186
neg_closest_data_parent
static struct val_neg_data * neg_closest_data_parent(struct val_neg_zone *zone, uint8_t *nm, size_t nm_len, int labs)
Find closest existing parent data for the given name.
Definition: val_neg.c:410
sldns_buffer_remaining
INLINE size_t sldns_buffer_remaining(sldns_buffer *buffer)
returns the number of bytes remaining between the buffer's position and limit.
Definition: sbuffer.h:394
reply_find_rrset
struct ub_packed_rrset_key * reply_find_rrset(struct reply_info *rep, uint8_t *name, size_t namelen, uint16_t type, uint16_t dclass)
Find rrset in reply, inside any section.
Definition: msgreply.c:803
check_chroot_filelist_wild
static void check_chroot_filelist_wild(const char *desc, struct config_strlist *list, const char *chrootdir, struct config_file *cfg)
check file list, with wildcard processing
Definition: unbound-checkconf.c:487
sockaddr_cmp_addr
int sockaddr_cmp_addr(struct sockaddr_storage *addr1, socklen_t len1, struct sockaddr_storage *addr2, socklen_t len2)
Compare two sockaddrs.
Definition: net_help.c:638
config_delauths
void config_delauths(struct config_auth *p)
Delete items in config auth list.
Definition: config_file.c:1339
tube_delete
void tube_delete(struct tube *tube)
Delete and destroy a pipe.
Definition: tube.c:88
ub_result::havedata
int havedata
If there is any data, this is true.
Definition: unbound.h:166
ecs_whitelist_apply_cfg
int ecs_whitelist_apply_cfg(struct ecs_whitelist *whitelist, struct config_file *cfg)
Process ecs_whitelist config.
sldns_wire2str_rr_buf
int sldns_wire2str_rr_buf(uint8_t *rr, size_t rr_len, char *str, size_t str_len)
Convert RR to string presentation format, on one line.
Definition: wire2str.c:253
key_entry_data
Key entry for the validator.
Definition: val_kentry.h:76
ub_server_stats::sum_query_list_size
long long sum_query_list_size
Sum of the querylistsize of the worker for every query that missed cache.
Definition: unbound.h:677
ub_winsock_tcp_wouldblock
void ub_winsock_tcp_wouldblock(struct ub_event *, int bits)
Signal the eventloop when a TCP windows socket will block on next read or write (given by the eventbi...
Definition: ub_event.c:438
sockaddr_store_port
void sockaddr_store_port(struct sockaddr_storage *addr, socklen_t addrlen, int port)
Store port number into sockaddr structure.
Definition: net_help.c:469
print_data
static void print_data(const char *msg, const char *data, int len)
print hex data
Definition: unbound-anchor.c:255
VERB_QUERY
@ VERB_QUERY
3 - query level information
Definition: log.h:57
strip_dname_origin
static size_t strip_dname_origin(uint8_t *dname, size_t dnamelen, size_t originlen, uint8_t *newdname, size_t maxnewdnamelen)
Remove RPZ zone name from dname Copy dname to newdname, without the originlen number of trailing byte...
Definition: rpz.c:453
lruhash
Hash table that keeps LRU list of entries.
Definition: lruhash.h:147
call_root_update
static void call_root_update(void)
Perform root anchor update if so configured, by calling that process.
Definition: win_svc.c:271
config_file::respip_data
struct config_str2list * respip_data
RRs configured for response-driven access controls.
Definition: config_file.h:427
create_tcp_accept_sock
int create_tcp_accept_sock(struct addrinfo *addr, int v6only, int *noproto, int *reuseport, int transparent, int mss, int freebind, int use_systemd, int dscp)
Create and bind TCP listening socket.
Definition: listen_dnsport.c:644
views_find_view
struct view * views_find_view(struct views *vs, const char *name, int write)
find a view by name
Definition: view.c:224
stop_flush_info::base
struct ub_event_base * base
the event base during stop flush
Definition: dtstream.c:1567
local_zone::override_tree
struct rbtree_type * override_tree
netblock addr_tree with struct local_zone_override information or NULL if there are no override eleme...
Definition: localzone.h:148
DNSTAP_CONTENT_TYPE
#define DNSTAP_CONTENT_TYPE
the content type for DNSTAP frame streams
Definition: dnstap_fstrm.h:113
read_acl_tags
static int read_acl_tags(struct acl_list *acl, struct config_file *cfg)
read acl tags config
Definition: acl_list.c:346
hints_create
struct iter_hints * hints_create(void)
Create hints.
Definition: iter_hints.c:54
stop_flush_info::stop_frame_done
size_t stop_frame_done
how much we have done of the stop frame
Definition: dtstream.c:1579
dump_rrset_cache
static int dump_rrset_cache(RES *ssl, struct worker *worker)
dump rrset cache
Definition: cachedump.c:121
ub_c_out
FILE * ub_c_out
lex out file
rbtree_next
rbnode_type * rbtree_next(rbnode_type *node)
Returns next larger node in the tree.
Definition: rbtree.c:571
dnstap_fstrm.h
match_ednsdata
static int match_ednsdata(uint8_t *q, size_t qlen, uint8_t *p, size_t plen)
Match OPT RDATA (not the EDNS payload size or flags)
Definition: testpkts.c:1402
macro_store_create
rbtree_type * macro_store_create(void)
Create variable storage.
Definition: replay.c:564
xfr_transfer_nextmaster
static void xfr_transfer_nextmaster(struct auth_xfer *xfr)
move to next master in list, task_transfer
Definition: authzone.c:3899
auth_data::node
rbnode_type node
rbtree node, key is name only
Definition: authzone.h:153
respip_set_is_empty
int respip_set_is_empty(const struct respip_set *set)
respip set emptiness test
Definition: respip.c:1299
trust_anchor::namelabs
int namelabs
number of labels in name of rrset
Definition: val_anchor.h:104
MAX_MODULE
#define MAX_MODULE
Maximum number of modules in operation.
Definition: module.h:185
val_check_nonsecure
void val_check_nonsecure(struct module_env *env, struct reply_info *rep)
Remove all unsigned or non-secure status rrsets from NS and AR sections.
Definition: val_utils.c:927
acl_addr_lookup
struct acl_addr * acl_addr_lookup(struct acl_list *acl, struct sockaddr_storage *addr, socklen_t addrlen)
Lookup address to see its acl structure.
Definition: acl_list.c:477
outside_network_delete
void outside_network_delete(struct outside_network *outnet)
Delete outside_network structure.
Definition: outside_network.c:912
sldns_rr_descriptor_maximum
size_t sldns_rr_descriptor_maximum(const sldns_rr_descriptor *descriptor)
returns the maximum number of rdata fields of the rr type this descriptor describes.
Definition: rrdef.c:660
read_multiline
static int read_multiline(char *buf, size_t len, FILE *in, int *linenr)
Read one line and put multiline RRs onto one line string.
Definition: autotrust.c:924
tcl_list_create
struct tcl_list * tcl_list_create(void)
Create TCP connection limit structure.
Definition: tcp_conn_limit.c:51
config_delview
void config_delview(struct config_view *p)
Delete a view item.
Definition: config_file.c:1371
az_add_nsec3_proof
static int az_add_nsec3_proof(struct auth_zone *z, struct regional *region, struct dns_msg *msg, uint8_t *cenm, size_t cenmlen, uint8_t *qname, size_t qname_len, int nodataproof, int ceproof, int nxproof, int wcproof)
add NSEC3 records to the zone for the nsec3 proof.
Definition: authzone.c:2811
bin_clear
static void bin_clear(struct lruhash *table, struct lruhash_bin *bin)
clear bin, respecting locks, does not do space, LRU
Definition: lruhash.c:416
dtio_wakeup
static void dtio_wakeup(struct dt_io_thread *dtio)
make the dtio wake up by sending a wakeup command
Definition: dtstream.c:140
rpz_remove_rr
void rpz_remove_rr(struct rpz *r, size_t aznamelen, uint8_t *dname, size_t dnamelen, uint16_t rr_type, uint16_t rr_class, uint8_t *rdatawl, size_t rdatalen)
Delete policy matching RR, used for IXFR.
Definition: rpz.c:884
sldns_wire2str_nsec_scan
int sldns_wire2str_nsec_scan(uint8_t **d, size_t *dl, char **s, size_t *sl)
Scan wireformat nsec bitmap field to string, with user buffers.
Definition: wire2str.c:1256
val_nsec_proves_positive_wildcard
int val_nsec_proves_positive_wildcard(struct ub_packed_rrset_key *nsec, struct query_info *qinf, uint8_t *wc)
Determine if the given NSEC proves a positive wildcard response.
Definition: val_nsec.c:490
config_delstub
void config_delstub(struct config_stub *p)
Delete a stub item.
Definition: config_file.c:1350
xfr_transfer_end_of_list
static int xfr_transfer_end_of_list(struct auth_xfer *xfr)
true if at end of list, task_transfer
Definition: authzone.c:3884
LDNS_RDF_TYPE_NSAP
@ LDNS_RDF_TYPE_NSAP
NSAP.
Definition: rrdef.h:321
config_file::dnstap_tls_client_cert_file
char * dnstap_tls_client_cert_file
dnstap client cert for client authentication
Definition: config_file.h:499
tap_socket_new_local
static struct tap_socket * tap_socket_new_local(char *socketpath, void(*ev_cb)(int, short, void *), void *data)
create new socket (unconnected, not base-added), or NULL malloc fail
Definition: unbound-dnstap-socket.c:193
ub_packed_rrset_key
This structure contains an RRset.
Definition: packed_rrset.h:107
as112.h
rpz_delete
void rpz_delete(struct rpz *r)
Delete RPZ.
Definition: rpz.c:300
ub_result::qclass
int qclass
the class asked for
Definition: unbound.h:129
do_flush_zone
static void do_flush_zone(RES *ssl, struct worker *worker, char *arg)
remove all rrsets and keys from zone from cache
Definition: remote.c:1736
UNKNOWN_SERVER_NICENESS
int UNKNOWN_SERVER_NICENESS
how nice is a server without further information, in msec Equals rtt initial timeout value.
Definition: iterator.c:73
my_event_base
Definition: ub_event_pluggable.c:137
match_question
static int match_question(uint8_t *q, size_t qlen, uint8_t *p, size_t plen, int mttl)
match question section of packet
Definition: testpkts.c:1165
name_tree_node::len
size_t len
length of name
Definition: dnstree.h:63
testlookup_unlim
static void testlookup_unlim(struct slabhash *table, testdata_type **ref)
test adding a random element (unlimited range)
Definition: unitslabhash.c:221
sldns_b32_ntop_calculate_size
size_t sldns_b32_ntop_calculate_size(size_t src_data_length)
calculates the size needed to store the result of b32_ntop
Definition: parseutil.c:332
cfg_gid
gid_t cfg_gid
from cfg username, after daemonize setup performed
Definition: config_file.c:76
generate_dnskey_prefetch
static void generate_dnskey_prefetch(struct module_qstate *qstate, struct iter_qstate *iq, int id)
Generate a DNSKEY prefetch query to get the DNSKEY for the DS record we just got in a referral (where...
Definition: iterator.c:1143
dt_msg_entry::next
struct dt_msg_entry * next
next in the list.
Definition: dtstream.h:84
outside_network::want_to_quit
int want_to_quit
outside network wants to quit.
Definition: outside_network.h:87
DTIO_RECV_FRAME_MAX_LEN
#define DTIO_RECV_FRAME_MAX_LEN
maximum length of received frame
Definition: dtstream.c:73
worker_win_stop_cb
void worker_win_stop_cb(int fd, short ev, void *arg)
windows worker stop event callback handler
Definition: win_svc.c:515
iter_qstate::target_count
int * target_count
number of target queries spawned in [1], for this query and its subqueries, the malloced-array is sha...
Definition: iterator.h:315
mesh_state_remove_reply
void mesh_state_remove_reply(struct mesh_area *mesh, struct mesh_state *m, struct comm_point *cp)
Remove mesh reply entry from the reply entry list.
Definition: mesh.c:1817
outnet_tcp_take_into_use
static int outnet_tcp_take_into_use(struct waiting_tcp *w, uint8_t *pkt, size_t pkt_len)
use next free buffer to service a tcp query
Definition: outside_network.c:299
context_obtain_alloc
struct alloc_cache * context_obtain_alloc(struct ub_ctx *ctx, int locking)
Get a new alloc.
Definition: context.c:180
module_qstate::edns_opts_back_out
struct edns_option * edns_opts_back_out
outgoing edns options to the back end
Definition: module.h:640
infra_ratelimit_inc
int infra_ratelimit_inc(struct infra_cache *infra, uint8_t *name, size_t namelen, time_t timenow, struct query_info *qinfo, struct comm_reply *replylist)
Increment the query rate counter for a delegation point.
Definition: infra.c:911
addr_action
Definition: unitmain.c:566
comm_point::comm_ssl_shake_write
@ comm_ssl_shake_write
ssl initial handshake wants to write
Definition: netevent.h:200
error_response_cache
static int error_response_cache(struct module_qstate *qstate, int id, int rcode)
Return an error to the client and cache the error code in the message cache (so per qname,...
Definition: iterator.c:298
ce_response::ce_rrset
struct ub_packed_rrset_key * ce_rrset
NSEC3 record that proved ce.
Definition: val_nsec3.c:84
calc_size
static int calc_size(sldns_buffer *pkt, uint16_t type, struct rr_parse *rr)
calculate the size of one rr
Definition: msgparse.c:634
mesh_list_insert
void mesh_list_insert(struct mesh_state *m, struct mesh_state **fp, struct mesh_state **lp)
Insert mesh state into a double linked list.
Definition: mesh.c:1794
lookup3.h
config_delviews
void config_delviews(struct config_view *p)
Delete items in config view list.
Definition: config_file.c:1385
DNS64_NEW_QUERY
@ DNS64_NEW_QUERY
Query for which we're the first module in line.
Definition: dns64.c:78
packed_rrset_key::flags
uint32_t flags
Flags.
Definition: packed_rrset.h:92
perfio
I/O port for perf.
Definition: perf.c:131
config_str2list::str
char * str
first string
Definition: config_file.h:735
msg_parse::arcount
uint16_t arcount
count of RRs, host format
Definition: msgparse.h:107
PACKED_RRSET_FIXEDTTL
#define PACKED_RRSET_FIXEDTTL
This rrset is considered to have a fixed TTL; its TTL doesn't have to be updated on encoding in a rep...
Definition: packed_rrset.h:63
config_tag_test
static void config_tag_test(void)
test config_file: test tag code
Definition: unitmain.c:385
dt_io_thread::upstream_is_tls
int upstream_is_tls
if the log server is connected to over TLS.
Definition: dtstream.h:196
as112_zones
const char ** as112_zones
Array of text-format domain names of the AS112 zones.
Definition: as112.c:143
ip_rate_key
key for ip_ratelimit lookups, a source IP.
Definition: infra.h:158
rr_parse::ttl_data
uint8_t * ttl_data
Pointer to the RR.
Definition: msgparse.h:187
val_neg_zone_compare
int val_neg_zone_compare(const void *a, const void *b)
Comparison function for rbtree val neg zone elements.
Definition: val_neg.c:73
rtt_info::rttvar
int rttvar
smoothed mean deviation, in milliseconds
Definition: rtt.h:53
mesh_state::super_set
rbtree_type super_set
set of superstates (that want this state's result) contains struct mesh_state_ref*
Definition: mesh.h:181
auth_zone_find
struct auth_zone * auth_zone_find(struct auth_zones *az, uint8_t *nm, size_t nmlen, uint16_t dclass)
find an auth zone by name (exact match by name or NULL returned)
Definition: authzone.c:444
ub_server_stats::msg_cache_count
long long msg_cache_count
number of message cache entries
Definition: unbound.h:749
comm_point::comm_tcp
@ comm_tcp
TCP handler socket - handle byteperbyte readwrite.
Definition: netevent.h:231
packed_rrset
An RRset can be represented using both key and data together.
Definition: packed_rrset.h:266
tcp_req_done_item::next
struct tcp_req_done_item * next
next in list
Definition: listen_dnsport.h:292
log_set_time_asc
void log_set_time_asc(int use_asc)
Set if the time value is printed ascii or decimal in log entries.
Definition: log.c:203
libworker
The library-worker status structure Internal to the worker.
Definition: libworker.h:68
smart_compare
static int smart_compare(sldns_buffer *pkt, uint8_t *dnow, uint8_t *dprfirst, uint8_t *dprlast)
smart comparison of (compressed, valid) dnames from packet
Definition: msgparse.c:53
auth_xfer_probe_lookup_callback
void auth_xfer_probe_lookup_callback(void *arg, int rcode, struct sldns_buffer *buf, enum sec_status sec, char *why_bogus, int was_ratelimited)
mesh callback for task_probe on lookup of host names
serviced_callbacks
static void serviced_callbacks(struct serviced_query *sq, int error, struct comm_point *c, struct comm_reply *rep)
call the callbacks for a serviced query
Definition: outside_network.c:1713