]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: List version number early 12530/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 10 Feb 2023 10:39:22 +0000 (11:39 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 10 Feb 2023 10:39:22 +0000 (11:39 +0100)
This is very useful when investigating an issue that prevent dnsdist
from starting, for example.

pdns/dnsdist.cc

index b5a2f24dea567d7b2f2850a60ee54b0ddad2dfe1..c083c6afab13a5d337ee1d681c3e867adfb6316b 100644 (file)
@@ -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<dnsdist::AsynchronousHolder>();
 
     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<ClientState>(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<string> vec;
     std::string acls;
     g_ACL.getLocal()->toStringVector(&vec);