mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
Fix parsing of hostnames in rndc.conf
When DSCP was removed the parsing of hostnames was accidentally
broken resulting in an assertion failure. Call cfg_parse_tuple
rather than using custom code in parse_sockaddrnameport.
(cherry picked from commit 6c095f89f5)
This commit is contained in:
parent
d233f12080
commit
6918c9d17a
1 changed files with 1 additions and 13 deletions
|
|
@ -3858,7 +3858,6 @@ static isc_result_t
|
|||
parse_sockaddrnameport(cfg_parser_t *pctx, const cfg_type_t *type,
|
||||
cfg_obj_t **ret) {
|
||||
isc_result_t result;
|
||||
cfg_obj_t *obj = NULL;
|
||||
UNUSED(type);
|
||||
|
||||
CHECK(cfg_peektoken(pctx, CFG_LEXOPT_QSTRING));
|
||||
|
|
@ -3870,17 +3869,7 @@ parse_sockaddrnameport(cfg_parser_t *pctx, const cfg_type_t *type,
|
|||
CHECK(cfg_parse_sockaddr(pctx, &cfg_type_sockaddr,
|
||||
ret));
|
||||
} else {
|
||||
const cfg_tuplefielddef_t *fields =
|
||||
cfg_type_nameport.of;
|
||||
CHECK(cfg_create_tuple(pctx, &cfg_type_nameport, &obj));
|
||||
CHECK(cfg_parse_obj(pctx, fields[0].type,
|
||||
&obj->value.tuple[0]));
|
||||
CHECK(cfg_parse_obj(pctx, fields[1].type,
|
||||
&obj->value.tuple[1]));
|
||||
CHECK(cfg_parse_obj(pctx, fields[2].type,
|
||||
&obj->value.tuple[2]));
|
||||
*ret = obj;
|
||||
obj = NULL;
|
||||
CHECK(cfg_parse_tuple(pctx, &cfg_type_nameport, ret));
|
||||
}
|
||||
} else {
|
||||
cfg_parser_error(pctx, CFG_LOG_NEAR,
|
||||
|
|
@ -3888,7 +3877,6 @@ parse_sockaddrnameport(cfg_parser_t *pctx, const cfg_type_t *type,
|
|||
return (ISC_R_UNEXPECTEDTOKEN);
|
||||
}
|
||||
cleanup:
|
||||
CLEANUP_OBJ(obj);
|
||||
return (result);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue