+4737. [cleanup] Address Coverity warnings. [RT #46012]
+
4736. [cleanup] (a) Added comments to NSEC3-related functions in
lib/dns/zone.c. (b) Refactored NSEC3 salt formatting
code. (c) Minor tweaks to lock and result handling.
return (result);
}
+#ifdef USE_DNSRPS
typedef struct conf_dnsrps_ctx conf_dnsrps_ctx_t;
struct conf_dnsrps_ctx {
isc_result_t result;
}
return (ctx.result);
}
+#endif
static isc_result_t
configure_rpz_name(dns_view_t *view, const cfg_obj_t *obj, dns_name_t *name,
if (!cfg_obj_isvoid(sub_obj)) {
dnsrps_enabled = cfg_obj_asboolean(sub_obj);
}
-#ifdef USE_DNSRPS
- if (dnsrps_enabled && librpz == NULL) {
- cfg_obj_log(rpz_obj, named_g_lctx, DNS_RPZ_ERROR_LEVEL,
- "\"dnsrps-enable yes\" but %s",
- librpz_lib_open_emsg.c);
- return (ISC_R_FAILURE);
- }
-#else
+#ifndef USE_DNSRPS
if (dnsrps_enabled) {
cfg_obj_log(rpz_obj, named_g_lctx, DNS_RPZ_ERROR_LEVEL,
"\"dnsrps-enable yes\" but"
" with `./configure --enable-dnsrps`");
return (ISC_R_FAILURE);
}
-#endif
-
+#else
if (dnsrps_enabled) {
+ if (librpz == NULL) {
+ cfg_obj_log(rpz_obj, named_g_lctx, DNS_RPZ_ERROR_LEVEL,
+ "\"dnsrps-enable yes\" but %s",
+ librpz_lib_open_emsg.c);
+ return (ISC_R_FAILURE);
+ }
+
/*
* Generate the DNS Response Policy Service
* configuration string.
if (result != ISC_R_SUCCESS)
return (result);
}
+#endif
result = dns_rpz_new_zones(&view->rpzs, rps_cstr,
rps_cstr_size, view->mctx,