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 <franco@lastsummer.de>

* Update net-mgmt/lldpd/src/opnsense/mvc/app/controllers/OPNsense/Lldpd/forms/general.xml

Co-authored-by: Franco Fichtner <franco@lastsummer.de>

---------

Co-authored-by: Franco Fichtner <franco@lastsummer.de>
This commit is contained in:
TotalGriffLock
2024-10-10 19:44:22 +02:00
committed by GitHub
co-authored by Franco Fichtner
parent f25a1fa6d5
commit 4c4e4a25c6
4 changed files with 13 additions and 4 deletions
+1 -2
View File
@@ -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
@@ -29,6 +29,12 @@
<type>checkbox</type>
<help>This will activate the SONMP Protocol by Nortel.</help>
</field>
<field>
<id>general.agentx</id>
<label>Enable AgentX SNMP Integration</label>
<type>checkbox</type>
<help>This will enable AgentX support, which can then be queried via SNMP.</help>
</field>
<field>
<id>general.interface</id>
<label>Interface Configuration</label>
@@ -1,7 +1,7 @@
<model>
<mount>//OPNsense/lldpd/general</mount>
<description>Lldpd configuration</description>
<version>1.0.0</version>
<version>1.0.1</version>
<items>
<enabled type="BooleanField">
<default>0</default>
@@ -23,6 +23,10 @@
<default>0</default>
<Required>Y</Required>
</sonmp>
<agentx type="BooleanField">
<default>0</default>
<Required>Y</Required>
</agentx>
<interface type="TextField">
<Required>N</Required>
</interface>
@@ -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 %}