lldpd: add portidsubtype option
authorStephen Howell <howels@allthatwemight.be>
Sat, 16 Dec 2023 23:49:44 +0000 (23:49 +0000)
committerStijn Tintel <stijn@linux-ipv6.be>
Thu, 8 Feb 2024 10:35:36 +0000 (12:35 +0200)
add option portidsubtype to correct port identifiers and descriptions

Signed-off-by: Stephen Howell <howels@allthatwemight.be>
package/network/services/lldpd/files/lldpd.init

index 31dca872cc4908c009dfa604bd8f4d684082dfd7..db81f8a9aed944f826a7fcc93ce1b78c3a8c9f8a 100644 (file)
@@ -105,6 +105,9 @@ write_lldpd_conf()
        local lldp_agenttype
        config_get lldp_agenttype 'config' 'lldp_agenttype' 'nearest-bridge'
 
+       local lldp_portidsubtype
+       config_get lldp_portidsubtype 'config' 'lldp_portidsubtype' 'macaddress'
+
        # Clear out the config file first
        echo -n > "$LLDPD_CONF"
        [ -n "$ifnames" ] && echo "configure system interface pattern" "$ifnames" >> "$LLDPD_CONF"
@@ -120,7 +123,7 @@ write_lldpd_conf()
                fi
        fi
        [ -n "$lldp_agenttype" ] && echo "configure lldp agent-type" "\"$lldp_agenttype\"" >> "$LLDPD_CONF"
-
+       [ -n "$lldp_portidsubtype" ] && echo "configure lldp portidsubtype" "\"$lldp_portidsubtype\"" >> "$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