From: Christian Ebner <c.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [pve-installer v2] run-env: filter out interfaces without valid mac address
Date: Fri, 11 Jul 2025 11:00:35 +0200 [thread overview]
Message-ID: <20250711090035.241160-1-c.ebner@proxmox.com> (raw)
The installer assumes to have a valid mac address for all interfaces
as provided by the runtime env json file. Deserialization will fail
if this is not the case.
In some cases, the interface might however not provide a valid MAC
address, for example the WWAN LTE module without any SIM installed on
some laptops.
Filter out these interfaces and log this, as they cannot be correctly
used anyways.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
---
changes since version 1 (thanks @Gabriel for the swift comment):
- Filter out interface instead of setting mac to all zero
Proxmox/Install/RunEnv.pm | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Proxmox/Install/RunEnv.pm b/Proxmox/Install/RunEnv.pm
index e4f0eb0..cdd7992 100644
--- a/Proxmox/Install/RunEnv.pm
+++ b/Proxmox/Install/RunEnv.pm
@@ -90,6 +90,10 @@ my sub query_netdevs : prototype() {
$if->@{qw(ifindex ifname operstate address addr_info)};
next if !$name || $name eq 'lo'; # could also check flags for LOOPBACK..
+ if (!$mac) {
+ log_info("skipped interface $name, no mac address detected");
+ next;
+ }
my @valid_addrs;
if (uc($state) eq 'UP') {
--
2.47.2
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next reply other threads:[~2025-07-11 9:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-11 9:00 Christian Ebner [this message]
2025-07-11 15:36 ` [pve-devel] superseded: " Christian Ebner
2025-07-15 6:53 ` [pve-devel] applied: " Thomas Lamprecht
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=20250711090035.241160-1-c.ebner@proxmox.com \
--to=c.ebner@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/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