all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [pve-installer v2] run-env: filter out interfaces without valid mac address
@ 2025-07-11  9:00 Christian Ebner
  2025-07-11 15:36 ` [pve-devel] superseded: " Christian Ebner
  2025-07-15  6:53 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 2 replies; 3+ messages in thread
From: Christian Ebner @ 2025-07-11  9:00 UTC (permalink / raw)
  To: pve-devel

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-07-15  6:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-11  9:00 [pve-devel] [pve-installer v2] run-env: filter out interfaces without valid mac address Christian Ebner
2025-07-11 15:36 ` [pve-devel] superseded: " Christian Ebner
2025-07-15  6:53 ` [pve-devel] applied: " Thomas Lamprecht

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal