`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.).
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_mem_t *mctx);
static void
freekey(char *key, unsigned int type, isc_symvalue_t value, void *userarg) {
UNUSED(type);
result = tresult;
break;
}
+
+ uint32_t dummy = 0;
+ result = validate_remotes(obj, cctx, &dummy, mctx);
+ if (result != ISC_R_SUCCESS) {
+ break;
+ }
}
return result;
}