From: Christian Ebner <c.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: Re: [pve-devel] [PATCH] run-env: fallback to all zero mac for interfaces without
Date: Fri, 11 Jul 2025 10:39:03 +0200 [thread overview]
Message-ID: <30178a02-c6a4-4cb5-b5e7-f421dde03245@proxmox.com> (raw)
In-Reply-To: <gxshuimtdceisyjrticcdzo3mrxttz6heujkzbqtsnqtkz23ts@waljzubhib67>
On 7/11/25 10:27, Gabriel Goller wrote:
> On 11.07.2025 10:03, Christian Ebner wrote:
>> 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 module without any SIM installed on
>> some laptops.
>>
>> Fix this by defaulting to an all zero MAC address if non is detected.
>>
>> Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
>> ---
>> Please note: Untested, but I can test it based on an iso installer on
>> affected hardware
>>
>> Proxmox/Install/RunEnv.pm | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/Proxmox/Install/RunEnv.pm b/Proxmox/Install/RunEnv.pm
>> index e4f0eb0..d7ee258 100644
>> --- a/Proxmox/Install/RunEnv.pm
>> +++ b/Proxmox/Install/RunEnv.pm
>> @@ -110,7 +110,7 @@ my sub query_netdevs : prototype() {
>> $ifs->{$name} = {
>> index => $index,
>> name => $name,
>> - mac => $mac,
>> + mac => $mac // '00:00:00:00:00:00',
>> state => uc($state),
>> };
>> $ifs->{$name}->{addresses} = \@valid_addrs if @valid_addrs;
>
> To be honest I'd rather filter out this interface. A zeroed out mac is
> reserved for loopback interfaces and usually isn't routed.
Okay, given that it might be better to filter it out and log that.
Will send a v2 (including the subject prefix `pve-installer` I did
forget on this patch)
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2025-07-11 8:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-11 8:03 Christian Ebner
2025-07-11 8:06 ` Christian Ebner
2025-07-11 8:27 ` Gabriel Goller
2025-07-11 8:39 ` Christian Ebner [this message]
2025-07-11 9:14 ` Thomas Lamprecht
2025-07-11 9:47 ` Christoph Heiss
2025-07-11 10:03 ` Christian Ebner
2025-07-11 10:25 ` Thomas Lamprecht
2025-07-11 10:31 ` Christian Ebner
2025-07-11 9:01 ` [pve-devel] superseded: " Christian Ebner
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=30178a02-c6a4-4cb5-b5e7-f421dde03245@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