summaryrefslogtreecommitdiff
path: root/services/authzone.h
diff options
context:
space:
mode:
Diffstat (limited to 'services/authzone.h')
-rw-r--r--services/authzone.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/services/authzone.h b/services/authzone.h
index a695bd029b56..9bb131ad8b39 100644
--- a/services/authzone.h
+++ b/services/authzone.h
@@ -46,6 +46,7 @@
#include "util/rbtree.h"
#include "util/locks.h"
#include "services/mesh.h"
+#include "services/rpz.h"
struct ub_packed_rrset_key;
struct regional;
struct config_file;
@@ -81,6 +82,11 @@ struct auth_zones {
size_t num_query_up;
/** number of queries downstream */
size_t num_query_down;
+ /** first rpz item in linked list */
+ struct rpz* rpz_first;
+ /** rw lock for rpz linked list, needed when iterating or editing linked
+ * list. */
+ lock_rw_type rpz_lock;
};
/**
@@ -126,6 +132,8 @@ struct auth_zone {
/** for upstream: this zone answers queries that unbound intends to
* send upstream. */
int for_upstream;
+ /** RPZ zones */
+ struct rpz* rpz;
/** zone has been deleted */
int zone_deleted;
/** deletelist pointer, unused normally except during delete */
@@ -460,10 +468,11 @@ struct auth_zones* auth_zones_create(void);
* @param az: auth zones structure
* @param cfg: config to apply.
* @param setup: if true, also sets up values in the auth zones structure
+ * @param is_rpz: set to 1 if at least one RPZ zone is configured.
* @return false on failure.
*/
int auth_zones_apply_cfg(struct auth_zones* az, struct config_file* cfg,
- int setup);
+ int setup, int* is_rpz);
/** initial pick up of worker timeouts, ties events to worker event loop
* @param az: auth zones structure