[openwrt/openwrt] lldpd: add option for tx delay and tx hold
LEDE Commits
lede-commits at lists.infradead.org
Tue Sep 17 03:36:27 PDT 2024
robimarko pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/a7f749ded4a6d4c3d597052182b632c2d435b6d5
commit a7f749ded4a6d4c3d597052182b632c2d435b6d5
Author: Stephen Howell <howels at allthatwemight.be>
AuthorDate: Sun Dec 17 00:39:48 2023 +0000
lldpd: add option for tx delay and tx hold
add option to set LLDP transmit delay, hold timers to set update frequency
Signed-off-by: Stephen Howell <howels at allthatwemight.be>
(cherry picked from commit a5f715da713304972467612d6934130ce3aa2837)
Link: https://github.com/openwrt/openwrt/pull/15299
Signed-off-by: Robert Marko <robimarko at gmail.com>
---
package/network/services/lldpd/files/lldpd.init | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/package/network/services/lldpd/files/lldpd.init b/package/network/services/lldpd/files/lldpd.init
index 656128ef5d..b69ec16086 100644
--- a/package/network/services/lldpd/files/lldpd.init
+++ b/package/network/services/lldpd/files/lldpd.init
@@ -125,6 +125,12 @@ write_lldpd_conf()
local lldp_platform
config_get lldp_platform 'config' 'lldp_platform' ""
+ local lldp_tx_interval
+ config_get lldp_tx_interval 'config' 'lldp_tx_interval' 0
+
+ local lldp_tx_hold
+ config_get lldp_tx_hold 'config' 'lldp_tx_hold' 0
+
# Clear out the config file first
echo -n > "$LLDPD_CONF"
[ -n "$ifnames" ] && echo "configure system interface pattern" "$ifnames" >> "$LLDPD_CONF"
@@ -142,6 +148,8 @@ write_lldpd_conf()
[ -n "$lldp_agenttype" ] && echo "configure lldp agent-type" "\"$lldp_agenttype\"" >> "$LLDPD_CONF"
[ -n "$lldp_portidsubtype" ] && echo "configure lldp portidsubtype" "\"$lldp_portidsubtype\"" >> "$LLDPD_CONF"
[ -n "$lldp_platform" ] && echo "configure system platform" "\"$lldp_platform\"" >> "$LLDPD_CONF"
+ [ $lldp_tx_interval -gt 0 ] && echo "configure lldp tx-interval" "$lldp_tx_interval" >> "$LLDPD_CONF"
+ [ $lldp_tx_hold -gt 0 ] && echo "configure lldp tx-hold" "$lldp_tx_hold" >> "$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