From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 078991FF15C for ; Fri, 11 Jul 2025 11:00:04 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 005B0BE2F; Fri, 11 Jul 2025 11:00:47 +0200 (CEST) From: Christian Ebner To: pve-devel@lists.proxmox.com Date: Fri, 11 Jul 2025 11:00:35 +0200 Message-ID: <20250711090035.241160-1-c.ebner@proxmox.com> X-Mailer: git-send-email 2.47.2 MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.044 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [runenv.pm] Subject: [pve-devel] [pve-installer v2] run-env: filter out interfaces without valid mac address X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "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 --- 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