From 4c4e4a25c6e1bdb251ca7d2297b1916d9f362725 Mon Sep 17 00:00:00 2001 From: TotalGriffLock Date: Thu, 10 Oct 2024 18:44:22 +0100 Subject: [PATCH] Enable AgentX Integration in LLDP (#4249) * Update lldpd Add handler for agentx to add -x switch * Update General.xml Added AgentX field to model * Update general.xml Add field for agentx support * Update lldpd Rearrange ifs slightly * Update Makefile Reflect version changes * Update net-mgmt/lldpd/Makefile Co-authored-by: Franco Fichtner * Update net-mgmt/lldpd/src/opnsense/mvc/app/controllers/OPNsense/Lldpd/forms/general.xml Co-authored-by: Franco Fichtner --------- Co-authored-by: Franco Fichtner --- net-mgmt/lldpd/Makefile | 3 +-- .../mvc/app/controllers/OPNsense/Lldpd/forms/general.xml | 6 ++++++ .../src/opnsense/mvc/app/models/OPNsense/Lldpd/General.xml | 6 +++++- .../src/opnsense/service/templates/OPNsense/Lldpd/lldpd | 2 +- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/net-mgmt/lldpd/Makefile b/net-mgmt/lldpd/Makefile index 96a79b57a..ae63bd512 100644 --- a/net-mgmt/lldpd/Makefile +++ b/net-mgmt/lldpd/Makefile @@ -1,6 +1,5 @@ PLUGIN_NAME= lldpd -PLUGIN_VERSION= 1.1 -PLUGIN_REVISION= 2 +PLUGIN_VERSION= 1.2 PLUGIN_COMMENT= LLDP allows you to know exactly on which port is a server PLUGIN_DEPENDS= lldpd PLUGIN_MAINTAINER= m.muenz@gmail.com diff --git a/net-mgmt/lldpd/src/opnsense/mvc/app/controllers/OPNsense/Lldpd/forms/general.xml b/net-mgmt/lldpd/src/opnsense/mvc/app/controllers/OPNsense/Lldpd/forms/general.xml index 93809a4d0..48da1c1d5 100644 --- a/net-mgmt/lldpd/src/opnsense/mvc/app/controllers/OPNsense/Lldpd/forms/general.xml +++ b/net-mgmt/lldpd/src/opnsense/mvc/app/controllers/OPNsense/Lldpd/forms/general.xml @@ -29,6 +29,12 @@ checkbox This will activate the SONMP Protocol by Nortel. + + general.agentx + + checkbox + This will enable AgentX support, which can then be queried via SNMP. + general.interface diff --git a/net-mgmt/lldpd/src/opnsense/mvc/app/models/OPNsense/Lldpd/General.xml b/net-mgmt/lldpd/src/opnsense/mvc/app/models/OPNsense/Lldpd/General.xml index 43bf37a88..30304bf6f 100644 --- a/net-mgmt/lldpd/src/opnsense/mvc/app/models/OPNsense/Lldpd/General.xml +++ b/net-mgmt/lldpd/src/opnsense/mvc/app/models/OPNsense/Lldpd/General.xml @@ -1,7 +1,7 @@ //OPNsense/lldpd/general Lldpd configuration - 1.0.0 + 1.0.1 0 @@ -23,6 +23,10 @@ 0 Y + + 0 + Y + N diff --git a/net-mgmt/lldpd/src/opnsense/service/templates/OPNsense/Lldpd/lldpd b/net-mgmt/lldpd/src/opnsense/service/templates/OPNsense/Lldpd/lldpd index 9595e7d7d..4e627eb95 100644 --- a/net-mgmt/lldpd/src/opnsense/service/templates/OPNsense/Lldpd/lldpd +++ b/net-mgmt/lldpd/src/opnsense/service/templates/OPNsense/Lldpd/lldpd @@ -1,6 +1,6 @@ {% if helpers.exists('OPNsense.lldpd.general.enabled') and OPNsense.lldpd.general.enabled == '1' %} lldpd_enable="YES" -lldpd_flags="{% if helpers.exists('OPNsense.lldpd.general.cdp') and OPNsense.lldpd.general.cdp == '1' %}-c{% endif %}{% if helpers.exists('OPNsense.lldpd.general.fdp') and OPNsense.lldpd.general.fdp == '1' %} -f{% endif %}{% if helpers.exists('OPNsense.lldpd.general.edp') and OPNsense.lldpd.general.edp == '1' %} -e{% endif %}{% if helpers.exists('OPNsense.lldpd.general.sonmp') and OPNsense.lldpd.general.sonmp == '1' %} -s{% endif %}{% if helpers.exists('OPNsense.lldpd.general.interface') and OPNsense.lldpd.general.interface != '' %} -I {{ OPNsense.lldpd.general.interface }}{% endif %} -M 4" +lldpd_flags="{% if helpers.exists('OPNsense.lldpd.general.cdp') and OPNsense.lldpd.general.cdp == '1' %}-c{% endif %}{% if helpers.exists('OPNsense.lldpd.general.fdp') and OPNsense.lldpd.general.fdp == '1' %} -f{% endif %}{% if helpers.exists('OPNsense.lldpd.general.edp') and OPNsense.lldpd.general.edp == '1' %} -e{% endif %}{% if helpers.exists('OPNsense.lldpd.general.sonmp') and OPNsense.lldpd.general.sonmp == '1' %} -s{% endif %}{% if helpers.exists('OPNsense.lldpd.general.agentx') and OPNsense.lldpd.general.agentx == '1' %} -x{% endif %}{% if helpers.exists('OPNsense.lldpd.general.interface') and OPNsense.lldpd.general.interface != '' %} -I {{ OPNsense.lldpd.general.interface }}{% endif %} -M 4" {% else %} lldpd_enable="NO" {% endif %}