]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Create the default pool early, before parsing the configuration 14640/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 21 Aug 2024 08:51:27 +0000 (10:51 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 9 Sep 2024 13:35:43 +0000 (15:35 +0200)
(cherry picked from commit e9da418978236be775ee39aca49b71afce52f645)

pdns/dnsdist.cc

index 8a53e2b8fbd1dace25079e8a4ce9280371b32c50..e6805eea6e1f617f04de34485da9c515d9f5f971 100644 (file)
@@ -3270,6 +3270,13 @@ int main(int argc, char** argv)
 
     dnsdist::g_asyncHolder = std::make_unique<dnsdist::AsynchronousHolder>();
 
+    /* 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;