]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
chg: dev: Load the effective configuration
authorColin Vidal <colin@isc.org>
Wed, 29 Oct 2025 22:48:38 +0000 (23:48 +0100)
committerColin Vidal <colin@isc.org>
Wed, 29 Oct 2025 22:48:38 +0000 (23:48 +0100)
The configuration mechanism for `named` has been changed: instead of loading the user configuration from `named.conf` and then, statement-by-statement, picking values from there or from the built-in default configuration, we now merge the user configuration and the default configuration together, then pass the resulting "effective configuration" to `apply_configuration()`.

The new `cfg_effective_config()` function takes a user configuration tree and the built-in default configuration tree, and returns a new effective configuration tree. It works by cloning the user configuration (see !11124) into the effective tree, then walking through the clauses defined in it. If a clause is not in the user config but is present in the defaults, the default version is cloned and attached to the effective tree. If a clause is in both trees, then depending on the statement semantics, either the user configuration overrides the default, or the two are merged. Because these semantics are now handled before `apply_configuration()` runs, that function has been substantially simplified.

Future MRs will enable the effective configuration to be printed, either by `rndc` (!11123) or `named-checkconf` (!11122). The default configuration has been moved to an include file which is accessible to both `named` and `named-checkconf`.

Merge branch 'colin/effective-config-internal' into 'main'

See merge request isc-projects/bind9!11121


Trivial merge