mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-11 06:49:58 -04:00
check remote-servers list correctness
`check.c` only checks if `remote-servers`, `primaries`, etc. are not
duplicated inside the configuration file, but does not check the
correctness of its definition. This commit fixes this by calling
`validate_remotes()` for each `remote-servers` (and other aliases),
which validates the correctness of the definition itself (this is the
same call done to validate other cases like `also-notify`, etc.).
(cherry picked from commit 1a732b6b8e)
This commit is contained in:
parent
f2b46d8a6a
commit
b260f7be90
1 changed files with 9 additions and 0 deletions
|
|
@ -86,6 +86,9 @@ keydirexist(const cfg_obj_t *zcgf, const char *optname, dns_name_t *zname,
|
|||
static const cfg_obj_t *
|
||||
find_maplist(const cfg_obj_t *config, const char *listname, const char *name);
|
||||
|
||||
static isc_result_t
|
||||
validate_remotes(const cfg_obj_t *obj, const cfg_obj_t *config,
|
||||
uint32_t *countp, isc_log_t *logctx, isc_mem_t *mctx);
|
||||
static void
|
||||
freekey(char *key, unsigned int type, isc_symvalue_t value, void *userarg) {
|
||||
UNUSED(type);
|
||||
|
|
@ -2209,6 +2212,12 @@ check_remoteserverlist(const cfg_obj_t *cctx, const char *list,
|
|||
break;
|
||||
}
|
||||
|
||||
uint32_t dummy = 0;
|
||||
result = validate_remotes(obj, cctx, &dummy, logctx, mctx);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
break;
|
||||
}
|
||||
|
||||
elt = cfg_list_next(elt);
|
||||
}
|
||||
return result;
|
||||
|
|
|
|||
Loading…
Reference in a new issue