[pve-devel] [pve-installer v2] run-env: filter out interfaces without valid mac address

Christian Ebner c.ebner at proxmox.com
Fri Jul 11 11:00:35 CEST 2025


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 at 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





More information about the pve-devel mailing list