Skip to content

Commit

Permalink
dnsdist: Create the default pool early, before parsing the configuration
Browse files Browse the repository at this point in the history
(cherry picked from commit e9da418)
  • Loading branch information
rgacogne committed Sep 9, 2024
1 parent 157ca62 commit ac3ab63
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pdns/dnsdist.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit ac3ab63

Please sign in to comment.