From: Remi Gacogne Date: Fri, 10 Feb 2023 10:39:22 +0000 (+0100) Subject: dnsdist: List version number early X-Git-Tag: dnsdist-1.8.0-rc1~33^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F12530%2Fhead;p=thirdparty%2Fpdns.git dnsdist: List version number early This is very useful when investigating an issue that prevent dnsdist from starting, for example. --- 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);