pdns
pdns copied to clipboard
When running with `--config=diff`, produce an error when the configuration file is invalid
- Program: Authoritative, Recursor
- Issue type: Bug report
Short description
When running with --config=diff
, produce an error when the configuration file is invalid.
Environment
- Operating system: N/A
- Software version: -git
- Software source: PowerDNS repository
Steps to reproduce
Using the auth, as an example, with the following configuration file:
local-address=0.0.0.0,::
foo=yes
and running pdns_server --config=diff --config-dir=.
, the output is the diff without an error message stating that foo
is an invalid configuration key:
# Autogenerated configuration file based on running instance (2022-09-09 13:50:22 +0200)
config-dir=.
domain-metadata-cache-ttl=60
local-address=0.0.0.0,::
Expected behaviour
The expected output should be an error message like the following (taken from running with --config=check
):
Fatal error: Trying to set unknown setting 'foo'
Actual behaviour
Got the diff output while using an erroneous configuration file.
Other information
For the time being, the recursor also behaves the same way for consistency.