From 8f96cd8e36cb5086c0f9e09171f04cfa067f5257 Mon Sep 17 00:00:00 2001 From: Karl Palsson Date: Mon, 8 Oct 2018 11:27:53 +0000 Subject: [PATCH] luci-app-snmpd: Allow turning off agentx AgentX support doesn't actually require TCP, it also works over unix domain sockets, and UDS is the only method that's compiled in by default. Remove that misleading text, and make the section add/removable so that you can remove it to disable agentx support. Behaviour with multiple sections is undefined. (don't do that!) This matches the current behaviour of the snmpd init script, which will enable agentx with the compile time default settings if the agentx socket config is blank/missing. Signed-off-by: Karl Palsson --- applications/luci-app-snmpd/luasrc/model/cbi/snmpd.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/applications/luci-app-snmpd/luasrc/model/cbi/snmpd.lua b/applications/luci-app-snmpd/luasrc/model/cbi/snmpd.lua index b3c0f2660..cc6951e17 100644 --- a/applications/luci-app-snmpd/luasrc/model/cbi/snmpd.lua +++ b/applications/luci-app-snmpd/luasrc/model/cbi/snmpd.lua @@ -26,11 +26,12 @@ s.anonymous = true p = s:option(Value, "agentaddress", "The address the agent should listen on", [[Eg: UDP:161, or UDP:10.5.4.3:161 to only listen on a given interface]]) -s = m:section(TypedSection, "agentx", "AgentX settings") +s = m:section(TypedSection, "agentx", "AgentX settings", "Delete this section to disable agentx") s.anonymous = true p = s:option(Value, "agentxsocket", "The address the agent should allow agentX connections to", [[This is only necessary if you have subagents using the agentX socket protocol. - Note that agentX requires TCP transport]]) + Eg: /var/run/agentx.sock]]) +s.addremove=true s = m:section(TypedSection, "com2sec", "com2sec security") p = s:option(Value, "secname", "secname") -- 2.25.1