From c411d5719adf7a1240dce4b2f142485fa168eb57 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Wed, 21 Aug 2024 10:51:27 +0200 Subject: [PATCH] dnsdist: Create the default pool early, before parsing the configuration (cherry picked from commit e9da418978236be775ee39aca49b71afce52f645) --- pdns/dnsdist.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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; -- 2.47.2