From 57d02825b6ec230c38d8a3908a9cf78079d8f37e Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Fri, 10 Feb 2023 11:39:22 +0100 Subject: [PATCH] dnsdist: List version number early This is very useful when investigating an issue that prevent dnsdist from starting, for example. --- pdns/dnsdist.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pdns/dnsdist.cc b/pdns/dnsdist.cc index b5a2f24dea..c083c6afab 100644 --- a/pdns/dnsdist.cc +++ b/pdns/dnsdist.cc @@ -2593,7 +2593,7 @@ int main(int argc, char** argv) argv += optind; (void) argc; - for(auto p = argv; *p; ++p) { + for (auto p = argv; *p; ++p) { if(g_cmdLine.beClient) { clientAddress = ComboAddress(*p, 5199); } else { @@ -2642,6 +2642,8 @@ int main(int argc, char** argv) #endif } + infolog("dnsdist %s comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it according to the terms of the GPL version 2", VERSION); + dnsdist::g_asyncHolder = std::make_unique(); auto todo = setupLua(*(g_lua.lock()), false, false, g_cmdLine.config); @@ -2684,7 +2686,7 @@ int main(int argc, char** argv) } } - for(const auto& loc : g_cmdLine.locals) { + for (const auto& loc : g_cmdLine.locals) { /* UDP */ g_frontends.push_back(std::unique_ptr(new ClientState(ComboAddress(loc, 53), false, false, 0, "", {}))); /* TCP */ @@ -2714,8 +2716,6 @@ int main(int argc, char** argv) } } - infolog("dnsdist %s comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it according to the terms of the GPL version 2", VERSION); - vector vec; std::string acls; g_ACL.getLocal()->toStringVector(&vec); -- 2.47.2