diff options
Diffstat (limited to 'util/config_file.h')
| -rw-r--r-- | util/config_file.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/util/config_file.h b/util/config_file.h index 7cf27cc2c3e3..aed6812dafe8 100644 --- a/util/config_file.h +++ b/util/config_file.h @@ -93,6 +93,12 @@ struct config_file { int do_udp; /** do tcp query support. */ int do_tcp; + /** max number of queries on a reuse connection. */ + size_t max_reuse_tcp_queries; + /** timeout for REUSE entries in milliseconds. */ + int tcp_reuse_timeout; + /** timeout in milliseconds for TCP queries to auth servers. */ + int tcp_auth_query_timeout; /** tcp upstream queries (no UDP upstream queries) */ int tcp_upstream; /** udp upstream enabled when no UDP downstream is enabled (do_udp no)*/ @@ -334,10 +340,14 @@ struct config_file { int hide_version; /** do not report trustanchor (trustanchor.unbound) */ int hide_trustanchor; + /** do not report the User-Agent HTTP header */ + int hide_http_user_agent; /** identity, hostname is returned if "". */ char* identity; /** version, package version returned if "". */ char* version; + /** User-Agent for HTTP header */ + char* http_user_agent; /** nsid */ char *nsid_cfg_str; uint8_t *nsid; @@ -367,6 +377,8 @@ struct config_file { int32_t val_sig_skew_min; /** the maximum for signature clock skew */ int32_t val_sig_skew_max; + /** max number of query restarts, number of IPs to probe */ + int32_t val_max_restart; /** this value sets the number of seconds before revalidating bogus */ int bogus_ttl; /** should validator clean additional section for secure msgs */ @@ -396,6 +408,8 @@ struct config_file { int serve_original_ttl; /** nsec3 maximum iterations per key size, string */ char* val_nsec3_key_iterations; + /** if zonemd failures are permitted, only logged */ + int zonemd_permissive_mode; /** autotrust add holddown time, in seconds */ unsigned int add_holddown; /** autotrust del holddown time, in seconds */ @@ -727,6 +741,10 @@ struct config_auth { /** Always reply with this CNAME target if the cname override action is * used */ char* rpz_cname; + /** Check ZONEMD records for this zone */ + int zonemd_check; + /** Reject absence of ZONEMD records, zone must have one */ + int zonemd_reject_absence; }; /** @@ -1173,6 +1191,13 @@ int cfg_mark_ports(const char* str, int allow, int* avail, int num); int cfg_condense_ports(struct config_file* cfg, int** avail); /** + * Apply system specific port range policy. + * @param cfg: config file. + * @param num: size of the array (65536). + */ +void cfg_apply_local_port_policy(struct config_file* cfg, int num); + +/** * Scan ports available * @param avail: the array from cfg. * @param num: size of the array (65536). @@ -1301,5 +1326,19 @@ void w_config_adjust_directory(struct config_file* cfg); /** debug option for unit tests. */ extern int fake_dsa, fake_sha1; +/** see if interface is https, its port number == the https port number */ +int if_is_https(const char* ifname, const char* port, int https_port); + +/** + * Return true if the config contains settings that enable https. + * @param cfg: config information. + * @return true if https ports are used for server. + */ +int cfg_has_https(struct config_file* cfg); + +#ifdef USE_LINUX_IP_LOCAL_PORT_RANGE +#define LINUX_IP_LOCAL_PORT_RANGE_PATH "/proc/sys/net/ipv4/ip_local_port_range" +#endif + #endif /* UTIL_CONFIG_FILE_H */ |
