mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 14:07:59 +00:00
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 Merge branch '4991-rndc-fix-parsing-hostnames' into 'main' See merge request isc-projects/bind9!9669
This commit is contained in:
@@ -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; };
|
||||
};
|
||||
|
@@ -3715,7 +3715,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));
|
||||
@@ -3727,17 +3726,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,
|
||||
@@ -3745,7 +3734,6 @@ parse_sockaddrnameport(cfg_parser_t *pctx, const cfg_type_t *type,
|
||||
return (ISC_R_UNEXPECTEDTOKEN);
|
||||
}
|
||||
cleanup:
|
||||
CLEANUP_OBJ(obj);
|
||||
return (result);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user