]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
snmp-master-socket -> snmp-daemon-socket
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 4 Nov 2020 09:35:18 +0000 (10:35 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 8 Dec 2020 09:40:08 +0000 (10:40 +0100)
pdns/pdns_recursor.cc
pdns/recursordist/docs/settings.rst

index 94ddd976b37fd6f174d59920d844d18b386497b7..4c06ffe5de5631a17be058526de4782ec4615041 100644 (file)
@@ -4881,7 +4881,11 @@ static int serviceMain(int argc, char*argv[])
   blacklistStats(StatComponent::SNMP, ::arg()["stats-snmp-blacklist"]);
 
   if (::arg().mustDo("snmp-agent")) {
-    g_snmpAgent = std::make_shared<RecursorSNMPAgent>("recursor", ::arg()["snmp-master-socket"]);
+    string setting =  ::arg()["snmp-daemon-socket"];
+    if (setting.empty()) {
+      setting = ::arg()["snmp-master-socket"];
+    }
+    g_snmpAgent = std::make_shared<RecursorSNMPAgent>("recursor", setting);
     g_snmpAgent->run();
   }
 
@@ -5372,7 +5376,8 @@ int main(int argc, char **argv)
     ::arg().setSwitch("reuseport","Enable SO_REUSEPORT allowing multiple recursors processes to listen to 1 address")="no";
 
     ::arg().setSwitch("snmp-agent", "If set, register as an SNMP agent")="no";
-    ::arg().set("snmp-master-socket", "If set and snmp-agent is set, the socket to use to register to the SNMP master")="";
+    ::arg().set("snmp-master-socket", "If set and snmp-agent is set, the socket to use to register to the SNMP daemon (deprecated)")="";
+    ::arg().set("snmp-daemon-socket", "If set and snmp-agent is set, the socket to use to register to the SNMP daemon")="";
 
     std::string defaultBlacklistedStats = "cache-bytes, packetcache-bytes, special-memory-usage";
     for (size_t idx = 0; idx < 32; idx++) {
index c5f5a9cc31068ba90c7be34dd148e3d09c06049f..369e3fef67aea72c7acb611e5adabe157b2976a1 100644 (file)
@@ -1549,12 +1549,21 @@ If set to true and PowerDNS has been compiled with SNMP support, it will registe
 
 ``snmp-master-socket``
 ----------------------
+
 .. versionadded:: 4.1.0
+.. deprecated:: 4.5.0
+  Use :ref:`setting-snmp-daemon-socket`.
+
+.. _setting-snmp-daemon-socket:
+
+``snmp-daemon-socket``
+----------------------
+.. versionadded:: 4.5.0
 
 -  String
 -  Default: empty
 
-If not empty and ``snmp-agent`` is set to true, indicates how PowerDNS should contact the SNMP master to register as an SNMP agent.
+If not empty and ``snmp-agent`` is set to true, indicates how PowerDNS should contact the SNMP daemon to register as an SNMP agent.
 
 .. _setting-socket-dir: