From: Remi Gacogne Date: Wed, 21 Aug 2024 08:51:27 +0000 (+0200) Subject: dnsdist: Create the default pool early, before parsing the configuration X-Git-Tag: dnsdist-1.9.7~5^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F14640%2Fhead;p=thirdparty%2Fpdns.git dnsdist: Create the default pool early, before parsing the configuration (cherry picked from commit e9da418978236be775ee39aca49b71afce52f645) --- diff --git a/pdns/dnsdist.cc b/pdns/dnsdist.cc index 8a53e2b8fb..e6805eea6e 100644 --- a/pdns/dnsdist.cc +++ b/pdns/dnsdist.cc @@ -3270,6 +3270,13 @@ int main(int argc, char** argv) dnsdist::g_asyncHolder = std::make_unique(); + /* create the default pool no matter what */ + { + auto localPools = g_pools.getCopy(); + createPoolIfNotExists(localPools, ""); + g_pools.setState(localPools); + } + auto todo = setupLua(*(g_lua.lock()), false, false, g_cmdLine.config); setupPools(); @@ -3355,8 +3362,6 @@ int main(int argc, char** argv) } auto localPools = g_pools.getCopy(); - /* create the default pool no matter what */ - createPoolIfNotExists(localPools, ""); if (!g_cmdLine.remotes.empty()) { for (const auto& address : g_cmdLine.remotes) { DownstreamState::Config config;