From: Stefan Schantl Date: Tue, 11 Nov 2025 20:01:23 +0000 (+0100) Subject: lldpd: Set green address as management address X-Git-Tag: v2.29-core199~17^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c1a85fac5a5661e0c2eaab868efa7820ef0b7672;p=ipfire-2.x.git lldpd: Set green address as management address At default the first available IP address (which heavily depends on your and your ISP assigned addresses) will be used as management address. This patch changes this behaviour to set the address of the green zone as management address and broadcast it. Signed-off-by: Stefan Schantl Signed-off-by: Michael Tremer --- diff --git a/src/initscripts/system/lldpd b/src/initscripts/system/lldpd index 42b0cb9d7..9b2cbcaf4 100755 --- a/src/initscripts/system/lldpd +++ b/src/initscripts/system/lldpd @@ -27,6 +27,9 @@ LLDPDARGS="" # Read the configuration readhash CONFIG "/var/ipfire/lldp/settings" +# Read-in network settings +eval $(/usr/local/bin/readhash /var/ipfire/ethernet/settings) + generate_config() { # Set the description (if given) if [ -n "${CONFIG["DESCRIPTION"]}" ]; then @@ -53,6 +56,11 @@ case "${1}" in exit 1 fi + # Set green address as management address if there is one. + if [ -n ${GREEN_ADDRESS} ]; then + LLDPDARGS+=" -m ${GREEN_ADDRESS}" + fi + boot_mesg "Starting Link-Layer Discovery Protocol Daemon..." loadproc /usr/sbin/lldpd ${LLDPDARGS} ;;