Re: [PATCH 6/7] lldpd: make management address advertisement controllable

2024-04-02 Thread Jo-Philipp Wich

Hi,

comment below.

Am 4/2/24 um 15:02 schrieb Paul Donald:

Defaults to off.

Available from >= 0.7.15

These are sent in TLV

Signed-off-by: Paul Donald 
---
  package/network/services/lldpd/files/lldpd.init | 6 ++
  1 file changed, 6 insertions(+)

diff --git a/package/network/services/lldpd/files/lldpd.init 
b/package/network/services/lldpd/files/lldpd.init
index 3e804cd033..72baf19cc5 100644
--- a/package/network/services/lldpd/files/lldpd.init
+++ b/package/network/services/lldpd/files/lldpd.init
@@ -128,6 +128,10 @@ write_lldpd_conf()
local lldp_capadv
config_get_bool lldp_capadv 'config' 'lldp_capadv' 0
  
+	# Broadcast management address in lldpd >= 0.7.15

+   local lldp_maddradv
+   config_get_bool lldp_maddradv 'config' 'lldp_maddradv' 0


Same remark as for the previous patch, please spell out those option names. 
Nobody will be able to guess what a "maddradv" is. It is not a widely used 
acronym and it is not similar to the native 
"management-addresses-advertisements" setting name.


Also there's an existing option "lldp_mgmt_ip" and I guess this new option 
controls whether it is advertised in TLVs or not, so it should follow its 
naming, something like "lldp_mgmt_ip_advertisement" or similar.


~ Jo

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH 6/7] lldpd: make management address advertisement controllable

2024-04-02 Thread Jo-Philipp Wich

Hi,

comment below.

Am 4/2/24 um 15:02 schrieb Paul Donald:

Defaults to off.

Available from >= 0.7.15

These are sent in TLV

Signed-off-by: Paul Donald 
---
  package/network/services/lldpd/files/lldpd.init | 6 ++
  1 file changed, 6 insertions(+)

diff --git a/package/network/services/lldpd/files/lldpd.init 
b/package/network/services/lldpd/files/lldpd.init
index 3e804cd033..72baf19cc5 100644
--- a/package/network/services/lldpd/files/lldpd.init
+++ b/package/network/services/lldpd/files/lldpd.init
@@ -128,6 +128,10 @@ write_lldpd_conf()
local lldp_capadv
config_get_bool lldp_capadv 'config' 'lldp_capadv' 0
  
+	# Broadcast management address in lldpd >= 0.7.15

+   local lldp_maddradv
+   config_get_bool lldp_maddradv 'config' 'lldp_maddradv' 0


Same remark as for the previous patch, please spell out those option names. 
Nobody will be able to guess what a "maddradv" is. It is not a widely used 
acronym and it is not similar to the native 
"management-addresses-advertisements" setting name.


Also there's an existing option "lldp_mgmt_ip" and I guess this new option 
controls whether it is advertised in TLVs or not, so it should follow its 
naming, something like "lldp_mgmt_ip_advertisement" or similar.


~ Jo

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH 6/7] lldpd: make management address advertisement controllable

2024-04-02 Thread Paul Donald
Defaults to off.

Available from >= 0.7.15

These are sent in TLV

Signed-off-by: Paul Donald 
---
 package/network/services/lldpd/files/lldpd.init | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/package/network/services/lldpd/files/lldpd.init 
b/package/network/services/lldpd/files/lldpd.init
index 3e804cd033..72baf19cc5 100644
--- a/package/network/services/lldpd/files/lldpd.init
+++ b/package/network/services/lldpd/files/lldpd.init
@@ -128,6 +128,10 @@ write_lldpd_conf()
local lldp_capadv
config_get_bool lldp_capadv 'config' 'lldp_capadv' 0
 
+   # Broadcast management address in lldpd >= 0.7.15
+   local lldp_maddradv
+   config_get_bool lldp_maddradv 'config' 'lldp_maddradv' 0
+
if [ "$CONFIG_LLDPD_WITH_LLDPMED" = "y" ]; then
local lldpmed_fast_start
config_get_bool lldpmed_fast_start 'config' 
'lldpmed_fast_start' 0
@@ -195,6 +199,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_capadv" -gt 0 ] && echo "configure lldp 
capabilities-advertisements" >> "$LLDPD_CONF"
+   [ "$lldp_maddradv" -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"
@@ -374,6 +379,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
-- 
2.44.0


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel