mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-06 06:22:05 -04:00
[9.20] fix: usr: Parsing of hostnames in rndc.conf was broken
When DSCP support was removed, parsing of hostnames in rndc.conf was accidentally broken, resulting in an assertion failure. This has been fixed. Closes #4991 Backport of MR !9669 Merge branch 'backport-4991-rndc-fix-parsing-hostnames-9.20' into 'bind-9.20' See merge request isc-projects/bind9!9676
This commit is contained in:
commit
b46f2376d0
2 changed files with 7 additions and 13 deletions
|
|
@ -19,3 +19,9 @@ key rndc_key {
|
|||
algorithm hmac-sha256;
|
||||
secret "1234abcd8765";
|
||||
};
|
||||
|
||||
/* Regresssion test for [GL #4991] */
|
||||
server example.com {
|
||||
key rndc-key;
|
||||
addresses { localhost; 127.0.0.1; ::1; };
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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