[openwrt/openwrt] lldpd: add portidsubtype option

LEDE Commits lede-commits at lists.infradead.org
Tue Sep 17 03:36:21 PDT 2024


robimarko pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/ed3f182d63c13dfe5bf386242de128b16da6c66f

commit ed3f182d63c13dfe5bf386242de128b16da6c66f
Author: Stephen Howell <howels at allthatwemight.be>
AuthorDate: Sat Dec 16 23:49:44 2023 +0000

    lldpd: add portidsubtype option
    
    add option portidsubtype to correct port identifiers and descriptions
    
    Signed-off-by: Stephen Howell <howels at allthatwemight.be>
    (cherry picked from commit ac771313ebedd2c4bfda8adef47650d45d77c32d)
    Link: https://github.com/openwrt/openwrt/pull/15299
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 package/network/services/lldpd/files/lldpd.init | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/package/network/services/lldpd/files/lldpd.init b/package/network/services/lldpd/files/lldpd.init
index 31dca872cc..db81f8a9ae 100644
--- a/package/network/services/lldpd/files/lldpd.init
+++ b/package/network/services/lldpd/files/lldpd.init
@@ -105,6 +105,9 @@ write_lldpd_conf()
 	local lldp_agenttype
 	config_get lldp_agenttype 'config' 'lldp_agenttype' 'nearest-bridge'
 
+	local lldp_portidsubtype
+	config_get lldp_portidsubtype 'config' 'lldp_portidsubtype' 'macaddress'
+
 	# Clear out the config file first
 	echo -n > "$LLDPD_CONF"
 	[ -n "$ifnames" ] && echo "configure system interface pattern" "$ifnames" >> "$LLDPD_CONF"
@@ -120,7 +123,7 @@ write_lldpd_conf()
 		fi
 	fi
 	[ -n "$lldp_agenttype" ] && echo "configure lldp agent-type" "\"$lldp_agenttype\"" >> "$LLDPD_CONF"
-
+	[ -n "$lldp_portidsubtype" ] && echo "configure lldp portidsubtype" "\"$lldp_portidsubtype\"" >> "$LLDPD_CONF"
 
 	# Since lldpd's sysconfdir is /tmp, we'll symlink /etc/lldpd.d to /tmp/$LLDPD_CONFS_DIR
 	[ -e $LLDPD_CONFS_DIR ] || ln -s /etc/lldpd.d $LLDPD_CONFS_DIR




More information about the lede-commits mailing list