]> git.ipfire.org Git - thirdparty/pdns.git/commit
rec: allow recursor.conf file to contain YAML
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 29 May 2024 09:20:52 +0000 (11:20 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 21 Jun 2024 09:06:26 +0000 (11:06 +0200)
commitee223b6f63cf9ff24554e5c459d0075e8f71748a
treec3367a59858dd637cbf942caee70348f649c22cb
parent7dcbcb59ecc7b755ed62f10a795e146d1be692aa
rec: allow recursor.conf file to contain YAML

This should us to work around the packaging issues discussed in #13935.
THe idea is that modify the parsing so that .conf files also *may* contain YAML.

The search for a config file then becomes:

1. Try read recuror.yml if it exists. If valid, done. If it is invalid punt.
2. Try read recursor.conf as YAML. If it is valid, done.
3. If it is invalid, try to read as old-style.

This means that the status of recursor.conf as a config file does not change.

This allows us to install a default YAML config into recursor.conf for new installs.
Of course we leave recursor.conf (and recursor.yml) alone for existing installs.

This is a draft. I will add docs and packaging changes after this is deemed
the way to proceed.
pdns/recursordist/rec-main.cc
pdns/recursordist/rec-main.hh
pdns/recursordist/rec_control.cc
pdns/recursordist/reczones.cc