[pve-devel] [PATCH] run-env: fallback to all zero mac for interfaces without
Thomas Lamprecht
t.lamprecht at proxmox.com
Fri Jul 11 11:14:06 CEST 2025
Am 11.07.25 um 10:27 schrieb Gabriel Goller:
> 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 at 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.
It's not like we set the MAC to zero, rather it's just used for displaying.
This way an admin can at least see the interface and select it for usage,
even if they then need to correctly configure it manually after installation
to make it actually work.
That said, as manual intervention is required either way, filtering out
might be OK, but your arguments here are IMO not justifying why that route
should be chosen. FWIW, a third alternative might be that the rust
implementation might also just have to learn to not expect a MAC...
More information about the pve-devel
mailing list