mirror of
https://github.com/isc-projects/bind9.git
synced 2026-02-23 01:40:23 -05:00
4172. [bug] Named / named-checkconf didn't handle a view of CLASS0.
[RT #40265]
This commit is contained in:
parent
9b8f93083d
commit
151f1bcd5e
3 changed files with 8 additions and 2 deletions
3
CHANGES
3
CHANGES
|
|
@ -1,3 +1,6 @@
|
|||
4172. [bug] Named / named-checkconf didn't handle a view of CLASS0.
|
||||
[RT #40265]
|
||||
|
||||
4171. [bug] Fixed incorrect class checks in TSIG RR
|
||||
implementation. [RT #40287]
|
||||
|
||||
|
|
|
|||
1
bin/tests/system/checkconf/good-class.conf
Normal file
1
bin/tests/system/checkconf/good-class.conf
Normal file
|
|
@ -0,0 +1 @@
|
|||
view "example" class00 { };
|
||||
|
|
@ -3183,6 +3183,7 @@ bind9_check_namedconf(const cfg_obj_t *config, isc_log_t *logctx,
|
|||
dns_rdataclass_t vclass = dns_rdataclass_in;
|
||||
const char *key = cfg_obj_asstring(vname);
|
||||
isc_symvalue_t symvalue;
|
||||
unsigned int symtype;
|
||||
|
||||
tresult = ISC_R_SUCCESS;
|
||||
if (cfg_obj_isstring(vclassobj)) {
|
||||
|
|
@ -3196,16 +3197,17 @@ bind9_check_namedconf(const cfg_obj_t *config, isc_log_t *logctx,
|
|||
"view '%s': invalid class %s",
|
||||
cfg_obj_asstring(vname), r.base);
|
||||
}
|
||||
symtype = vclass + 1;
|
||||
if (tresult == ISC_R_SUCCESS && symtab != NULL) {
|
||||
symvalue.as_cpointer = view;
|
||||
tresult = isc_symtab_define(symtab, key, vclass,
|
||||
tresult = isc_symtab_define(symtab, key, symtype,
|
||||
symvalue,
|
||||
isc_symexists_reject);
|
||||
if (tresult == ISC_R_EXISTS) {
|
||||
const char *file;
|
||||
unsigned int line;
|
||||
RUNTIME_CHECK(isc_symtab_lookup(symtab, key,
|
||||
vclass, &symvalue) == ISC_R_SUCCESS);
|
||||
symtype, &symvalue) == ISC_R_SUCCESS);
|
||||
file = cfg_obj_file(symvalue.as_cpointer);
|
||||
line = cfg_obj_line(symvalue.as_cpointer);
|
||||
cfg_obj_log(view, logctx, ISC_LOG_ERROR,
|
||||
|
|
|
|||
Loading…
Reference in a new issue