[openwrt/openwrt] lldpd: add agent-type option
LEDE Commits
lede-commits at lists.infradead.org
Tue Sep 17 03:36:20 PDT 2024
robimarko pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/6cbc1007627a7e7a2ce10de1a4721107adf248da
commit 6cbc1007627a7e7a2ce10de1a4721107adf248da
Author: Stephen Howell <howels at allthatwemight.be>
AuthorDate: Sat Dec 16 23:49:21 2023 +0000
lldpd: add agent-type option
add option to set agent-type to control propogation
Signed-off-by: Stephen Howell <howels at allthatwemight.be>
(cherry picked from commit c98ee4dbb3db0f064d990941cdd82e872da76946)
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 55fbe61fc4..31dca872cc 100644
--- a/package/network/services/lldpd/files/lldpd.init
+++ b/package/network/services/lldpd/files/lldpd.init
@@ -102,6 +102,9 @@ write_lldpd_conf()
config_get lldpmed_fast_start_tx_interval 'config' 'lldpmed_fast_start_tx_interval' 0
fi
+ local lldp_agenttype
+ config_get lldp_agenttype 'config' 'lldp_agenttype' 'nearest-bridge'
+
# Clear out the config file first
echo -n > "$LLDPD_CONF"
[ -n "$ifnames" ] && echo "configure system interface pattern" "$ifnames" >> "$LLDPD_CONF"
@@ -116,6 +119,7 @@ write_lldpd_conf()
echo "configure med fast-start" "enable" >> "$LLDPD_CONF"
fi
fi
+ [ -n "$lldp_agenttype" ] && echo "configure lldp agent-type" "\"$lldp_agenttype\"" >> "$LLDPD_CONF"
# Since lldpd's sysconfdir is /tmp, we'll symlink /etc/lldpd.d to /tmp/$LLDPD_CONFS_DIR
More information about the lede-commits
mailing list