diff options
author | Stijn Tintel <stijn@linux-ipv6.be> | 2017-01-05 13:05:57 +0100 |
---|---|---|
committer | Stijn Tintel <stijn@linux-ipv6.be> | 2017-01-10 13:02:00 +0100 |
commit | 046606a05eaece636dae1565fd1445b02a37d940 (patch) | |
tree | feea24eaf40954f1e6282cbb4f1b34f92ce30fe5 /package/network/services/lldpd/files | |
parent | 0d3dc169316616103dc30252c9aae4de27ab3d50 (diff) | |
download | upstream-046606a05eaece636dae1565fd1445b02a37d940.tar.gz upstream-046606a05eaece636dae1565fd1445b02a37d940.tar.bz2 upstream-046606a05eaece636dae1565fd1445b02a37d940.zip |
lldpd: add Net-SNMP AgentX support
Enabling this makes it possible to query LLDP neighbors via SNMP.
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Acked-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'package/network/services/lldpd/files')
-rw-r--r-- | package/network/services/lldpd/files/lldpd.config | 2 | ||||
-rw-r--r-- | package/network/services/lldpd/files/lldpd.init | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/package/network/services/lldpd/files/lldpd.config b/package/network/services/lldpd/files/lldpd.config index 92ab42116b..d2b3d15450 100644 --- a/package/network/services/lldpd/files/lldpd.config +++ b/package/network/services/lldpd/files/lldpd.config @@ -3,6 +3,8 @@ config lldpd config option enable_fdp 1 option enable_sonmp 1 option enable_edp 1 + + option agentxsocket /var/run/agentx.sock option lldp_class 4 option lldp_location "2:FR:6:Commercial Rd:3:Roseville:19:4" diff --git a/package/network/services/lldpd/files/lldpd.init b/package/network/services/lldpd/files/lldpd.init index 4e9efcae0d..4495551567 100644 --- a/package/network/services/lldpd/files/lldpd.init +++ b/package/network/services/lldpd/files/lldpd.init @@ -57,6 +57,7 @@ start_service() { local lldp_class local lldp_location local readonly_mode + local agentxsocket config_load 'lldpd' config_get_bool enable_cdp 'config' 'enable_cdp' 0 @@ -66,6 +67,7 @@ start_service() { config_get lldp_class 'config' 'lldp_class' config_get lldp_location 'config' 'lldp_location' config_get_bool readonly_mode 'config' 'readonly_mode' 0 + config_get agentxsocket 'config' 'agentxsocket' mkdir -p /var/run/lldp chown lldp:lldp /var/run/lldp @@ -83,6 +85,7 @@ start_service() { [ $enable_edp -gt 0 ] && procd_append_param command '-e' [ $readonly_mode -gt 0 ] && procd_append_param command '-r' [ -n "$lldp_class" ] && procd_append_param command -M "$lldp_class" + [ -n "$agentxsocket" ] && procd_append_param command -x -X "$agentxsocket" # set auto respawn behavior procd_set_param respawn |