diff options
| author | Paul Donald | 2024-04-02 11:43:03 +0000 |
|---|---|---|
| committer | Robert Marko | 2024-09-17 10:36:03 +0000 |
| commit | 7ee813b3ef02d28fa741218918f85c93bb7a8b03 (patch) | |
| tree | 14ccbd4d16a518ce5a08be34c6df2c5d1c0599e4 | |
| parent | af6a852ced9f11d162f678c2496e8f6594c10caf (diff) | |
| download | openwrt-7ee813b3ef02d28fa741218918f85c93bb7a8b03.tar.gz | |
lldpd: make management address advertisement controllable
Defaults to off.
Available from >= 0.7.15
These are sent in TLV
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
(cherry picked from commit 50021d3222667a9a239451de0422f0508aef4419)
Link: https://github.com/openwrt/openwrt/pull/15299
Signed-off-by: Robert Marko <robimarko@gmail.com>
| -rw-r--r-- | package/network/services/lldpd/files/lldpd.init | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/package/network/services/lldpd/files/lldpd.init b/package/network/services/lldpd/files/lldpd.init index 6685aa11af..31cd7fd389 100644 --- a/package/network/services/lldpd/files/lldpd.init +++ b/package/network/services/lldpd/files/lldpd.init @@ -114,6 +114,10 @@ write_lldpd_conf() local lldp_capability_advertisements config_get_bool lldp_capability_advertisements 'config' 'lldp_capability_advertisements' 0 + # Broadcast management address in lldpd >= 0.7.15 + local lldp_mgmt_addr_advertisements + config_get_bool lldp_mgmt_addr_advertisements 'config' 'lldp_mgmt_addr_advertisements' 0 + if [ "$CONFIG_LLDPD_WITH_LLDPMED" = "y" ]; then local lldpmed_fast_start config_get_bool lldpmed_fast_start 'config' 'lldpmed_fast_start' 0 @@ -181,6 +185,7 @@ write_lldpd_conf() [ -n "$lldp_tx_interval" ] && 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" [ "$lldp_capability_advertisements" -gt 0 ] && echo "configure lldp capabilities-advertisements" >> "$LLDPD_CONF" + [ "$lldp_mgmt_addr_advertisements" -gt 0 ] && echo "configure lldp management-addresses-advertisements" >> "$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" @@ -360,6 +365,7 @@ reload_service() { pause unconfigure lldp custom-tlv unconfigure lldp capabilities-advertisements + unconfigure lldp management-addresses-advertisements unconfigure system interface pattern unconfigure system description unconfigure system hostname |