[openwrt/openwrt] lldpd: add lldp_syscapabilities config option
LEDE Commits
lede-commits at lists.infradead.org
Tue Sep 17 03:36:13 PDT 2024
robimarko pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/8f714af40b303628e30f74fc25dfcd30ed7318e9
commit 8f714af40b303628e30f74fc25dfcd30ed7318e9
Author: Sebastian Pflieger <sebastian at pflieger.email>
AuthorDate: Wed Sep 20 20:13:14 2023 +0200
lldpd: add lldp_syscapabilities config option
allow to overwrite the detected system capabilities e.g. if devices
does not operate as bridge.
Signed-off-by: Sebastian Pflieger <sebastian at pflieger.email>
(cherry picked from commit 3ce909914a12647bec52bcee0a162dd6d158a4f6)
Link: https://github.com/openwrt/openwrt/pull/15299
Signed-off-by: Robert Marko <robimarko at gmail.com>
---
package/network/services/lldpd/files/lldpd.init | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/package/network/services/lldpd/files/lldpd.init b/package/network/services/lldpd/files/lldpd.init
index 5b39144921..e1e8ac9fd4 100644
--- a/package/network/services/lldpd/files/lldpd.init
+++ b/package/network/services/lldpd/files/lldpd.init
@@ -45,12 +45,16 @@ write_lldpd_conf()
local lldp_mgmt_ip
config_get lldp_mgmt_ip 'config' 'lldp_mgmt_ip'
+ local lldp_syscapabilities
+ config_get lldp_syscapabilities 'config' 'lldp_syscapabilities'
+
# Clear out the config file first
echo -n > "$LLDPD_CONF"
[ -n "$ifnames" ] && echo "configure system interface pattern" "$ifnames" >> "$LLDPD_CONF"
[ -n "$lldp_description" ] && echo "configure system description" "\"$lldp_description\"" >> "$LLDPD_CONF"
[ -n "$lldp_hostname" ] && echo "configure system hostname" "\"$lldp_hostname\"" >> "$LLDPD_CONF"
[ -n "$lldp_mgmt_ip" ] && echo "configure system ip management pattern" "\"$lldp_mgmt_ip\"" >> "$LLDPD_CONF"
+ [ -n "$lldp_syscapabilities" ] && echo "configure system capabilities enabled" "\"$lldp_syscapabilities\"" >> "$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