From: Stefan Schantl <stefan.schantl@ipfire.org>
To: development@lists.ipfire.org
Cc: Stefan Schantl <stefan.schantl@ipfire.org>
Subject: [PATCH 2/2] lldpd: Set green address as management address
Date: Tue, 11 Nov 2025 21:01:23 +0100 [thread overview]
Message-ID: <20251111200123.13667-2-stefan.schantl@ipfire.org> (raw)
In-Reply-To: <20251111200123.13667-1-stefan.schantl@ipfire.org>
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 <stefan.schantl@ipfire.org>
---
src/initscripts/system/lldpd | 8 ++++++++
1 file changed, 8 insertions(+)
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}
;;
--
2.47.3
prev parent reply other threads:[~2025-11-11 20:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-11 20:01 [PATCH 1/2] lldpd: Enable support for cisco discovery protocol Stefan Schantl
2025-11-11 20:01 ` Stefan Schantl [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251111200123.13667-2-stefan.schantl@ipfire.org \
--to=stefan.schantl@ipfire.org \
--cc=development@lists.ipfire.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox