]> git.ipfire.org Git - thirdparty/bind9.git/commit
chg: dev: Refactoring in lib/isccfg
authorEvan Hunt <each@isc.org>
Thu, 23 Oct 2025 20:43:07 +0000 (20:43 +0000)
committerEvan Hunt <each@isc.org>
Thu, 23 Oct 2025 20:43:07 +0000 (20:43 +0000)
commit3d0ddb5f9ba60ee12b06cc8128fd71b91f09a5ff
tree2e972be22577152c167ceb0c6a93b1b2888d50dc
parent09ad0ded7515657974a09dbfafdf5a63903ea250
parent2877b577356c9c6b25758f92b253157ddea32a48
chg: dev: Refactoring in lib/isccfg

`cfg_obj_t` objects no longer depend on the `cfg_parser_t` life-cycle; they can now persist until the last reference is detached. The `file` field, which was previously a pointer to memory allocated in the parser, is now a pointer to a subsidiary `cfg_obj_t` of type string. The API calls for creating and detaching these objects have been simplified accordingly.

Since `cfg_obj_t` is now long-lived, a zone can hold a reference to its own configuration data, making it possible to use `rndc showzone` even if `allow-new-zones` is disabled.

Several API calls related to the parser have been removed or hidden. The `cfg_parse_file()` and `cfg_parse_buffer()` functions now internally create and destroy their own parsers, eliminating the need for the caller to do so.

Most of these changes are intended to simplify dumping of running configuration data in a future commit.

Merge branch 'colin/hide-cfg-parser' into 'main'

See merge request isc-projects/bind9!11132