aboutsummaryrefslogtreecommitdiff
path: root/contrib/unbound/util/module.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/unbound/util/module.h')
-rw-r--r--contrib/unbound/util/module.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/contrib/unbound/util/module.h b/contrib/unbound/util/module.h
index 8a9da3f931a1..c9df74624918 100644
--- a/contrib/unbound/util/module.h
+++ b/contrib/unbound/util/module.h
@@ -180,6 +180,7 @@ struct iter_hints;
struct respip_set;
struct respip_client_info;
struct respip_addr_info;
+struct module_stack;
/** Maximum number of modules in operation */
#define MAX_MODULE 16
@@ -511,10 +512,10 @@ struct module_env {
/** auth zones */
struct auth_zones* auth_zones;
/** Mapping of forwarding zones to targets.
- * iterator forwarder information. per-thread, created by worker */
+ * iterator forwarder information. */
struct iter_forwards* fwds;
/**
- * iterator forwarder information. per-thread, created by worker.
+ * iterator stub information.
* The hints -- these aren't stored in the cache because they don't
* expire. The hints are always used to "prime" the cache. Note
* that both root hints and stub zone "hints" are stored in this
@@ -537,6 +538,12 @@ struct module_env {
/** EDNS client string information */
struct edns_strings* edns_strings;
+ /** module stack */
+ struct module_stack* modstack;
+#ifdef USE_CACHEDB
+ /** the cachedb enabled value, copied and stored here. */
+ int cachedb_enabled;
+#endif
/* Make every mesh state unique, do not aggregate mesh states. */
int unique_mesh;
};
@@ -824,10 +831,11 @@ void errinf_dname(struct module_qstate* qstate, const char* str,
/**
* Create error info in string. For validation failures.
* @param qstate: query state.
+ * @param region: the region for the result or NULL for malloced result.
* @return string or NULL on malloc failure (already logged).
- * This string is malloced and has to be freed by caller.
+ * This string is malloced if region is NULL and has to be freed by caller.
*/
-char* errinf_to_str_bogus(struct module_qstate* qstate);
+char* errinf_to_str_bogus(struct module_qstate* qstate, struct regional* region);
/**
* Check the sldns_ede_code of the qstate->errinf.
@@ -840,7 +848,6 @@ sldns_ede_code errinf_to_reason_bogus(struct module_qstate* qstate);
* Create error info in string. For other servfails.
* @param qstate: query state.
* @return string or NULL on malloc failure (already logged).
- * This string is malloced and has to be freed by caller.
*/
char* errinf_to_str_servfail(struct module_qstate* qstate);
@@ -848,7 +855,6 @@ char* errinf_to_str_servfail(struct module_qstate* qstate);
* Create error info in string. For misc failures that are not servfail.
* @param qstate: query state.
* @return string or NULL on malloc failure (already logged).
- * This string is malloced and has to be freed by caller.
*/
char* errinf_to_str_misc(struct module_qstate* qstate);