From: Peter van Dijk Date: Wed, 4 Nov 2020 13:43:55 +0000 (+0100) Subject: simplify, also improve --config output, thanks @mind04 X-Git-Tag: dnsdist-1.6.0-rc1~32^2~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2c70d169bff6e39e6cdf6e2a8c5d1c704c8f49f9;p=thirdparty%2Fpdns.git simplify, also improve --config output, thanks @mind04 --- diff --git a/pdns/common_startup.cc b/pdns/common_startup.cc index 7d646f5bfa..3635a66615 100644 --- a/pdns/common_startup.cc +++ b/pdns/common_startup.cc @@ -578,7 +578,7 @@ void mainthread() } #endif triggerLoadOfLibraries(); - if(::arg().mustDo("master") || ::arg().mustDo("slave") || ::arg().mustDo("primary") || ::arg().mustDo("secondary")) + if(::arg().mustDo("primary") || ::arg().mustDo("secondary")) gethostbyname("a.root-servers.net"); // this forces all lookup libraries to be loaded Utility::dropGroupPrivs(newuid, newgid); if(chroot(::arg()["chroot"].c_str())<0 || chdir("/")<0) { @@ -655,7 +655,7 @@ void mainthread() if(::arg().mustDo("webserver") || ::arg().mustDo("api")) webserver.go(); - if(::arg().mustDo("slave") || ::arg().mustDo("master") || ::arg().mustDo("primary") || ::arg().mustDo("secondary")|| !::arg()["forward-notify"].empty()) + if(::arg().mustDo("primary") || ::arg().mustDo("secondary")|| !::arg()["forward-notify"].empty()) Communicator.go(); TN->go(); // tcp nameserver launch diff --git a/pdns/dynhandler.cc b/pdns/dynhandler.cc index 96ab1ce4e8..d78f38ccc1 100644 --- a/pdns/dynhandler.cc +++ b/pdns/dynhandler.cc @@ -289,7 +289,7 @@ string DLNotifyHostHandler(const vector&parts, Utility::pid_t ppid) ostringstream os; if(parts.size()!=3) return "syntax: notify-host domain ip"; - if(!(::arg().mustDo("master") || ::arg().mustDo("primary")) && !((::arg().mustDo("slave") || ::arg().mustDo("secondary")) && ::arg().mustDo("slave-renotify"))) + if(!::arg().mustDo("primary") && !(::arg().mustDo("secondary") && ::arg().mustDo("secondary-renotify"))) return "PowerDNS not configured as primary (master), or secondary (slave) with re-notifications"; DNSName domain; @@ -317,7 +317,7 @@ string DLNotifyHandler(const vector&parts, Utility::pid_t ppid) UeberBackend B; if(parts.size()!=2) return "syntax: notify domain"; - if(!(::arg().mustDo("master") || ::arg().mustDo("primary")) && !((::arg().mustDo("slave") || ::arg().mustDo("secondary")) && ::arg().mustDo("slave-renotify"))) + if(!::arg().mustDo("primary") && !(::arg().mustDo("secondary") && ::arg().mustDo("secondary-renotify"))) return "PowerDNS not configured as primary (master), or secondary (slave) with re-notifications"; g_log<getBackend(); diff --git a/pdns/packethandler.cc b/pdns/packethandler.cc index 5e77a80d76..f7fa4eb030 100644 --- a/pdns/packethandler.cc +++ b/pdns/packethandler.cc @@ -961,7 +961,7 @@ int PacketHandler::processNotify(const DNSPacket& p) g_log<getBackend(); vector rdomains;