mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 14:07:59 +00:00
4737. [cleanup] Address Coverity warnings. [RT #46012]
This commit is contained in:
parent
acc3728c47
commit
08151d7fce
2
CHANGES
2
CHANGES
@ -1,3 +1,5 @@
|
||||
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.
|
||||
|
@ -1865,6 +1865,7 @@ cleanup:
|
||||
return (result);
|
||||
}
|
||||
|
||||
#ifdef USE_DNSRPS
|
||||
typedef struct conf_dnsrps_ctx conf_dnsrps_ctx_t;
|
||||
struct conf_dnsrps_ctx {
|
||||
isc_result_t result;
|
||||
@ -2088,6 +2089,7 @@ conf_dnsrps(dns_view_t *view, const cfg_obj_t **maps,
|
||||
}
|
||||
return (ctx.result);
|
||||
}
|
||||
#endif
|
||||
|
||||
static isc_result_t
|
||||
configure_rpz_name(dns_view_t *view, const cfg_obj_t *obj, dns_name_t *name,
|
||||
@ -2322,23 +2324,22 @@ configure_rpz(dns_view_t *view, const cfg_obj_t **maps,
|
||||
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.
|
||||
@ -2351,6 +2352,7 @@ configure_rpz(dns_view_t *view, const cfg_obj_t **maps,
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
}
|
||||
#endif
|
||||
|
||||
result = dns_rpz_new_zones(&view->rpzs, rps_cstr,
|
||||
rps_cstr_size, view->mctx,
|
||||
|
@ -320,7 +320,6 @@ getnameinfo(const struct sockaddr *sa, IRS_GETNAMEINFO_SOCKLEN_T salen,
|
||||
case DNS_R_NOVALIDDS:
|
||||
case DNS_R_NOVALIDSIG:
|
||||
ERR(EAI_INSECUREDATA);
|
||||
break;
|
||||
default:
|
||||
ERR(EAI_FAIL);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user