[pve-devel] [PATCH installer] gui: fall back to first found NIC if no default could be determined

Maximiliano Sandoval m.sandoval at proxmox.com
Tue Apr 8 10:13:43 CEST 2025


Christoph Heiss <c.heiss at proxmox.com> writes:

> If no DHCP server is configured on the network and/or no DHCP lease and
> thus network configuration is retrieved, the installer will also be
> unable to determine the default interface, aka. the one with the default
> gateway set.
>
> Fix it by pre-selecting the first found interface. If we *do* have a
> default interface, the index will be later overwritten, but ensures that
> always *some* interface is pre-selected in the dropdown.
>
> As it is already checked that the machine has any network interfaces
> before starting the installation wizard, it is safe to rely on the fact
> that at least one NIC must be present.
>
> For completeness, all the other network inputs already have (hardcoded)
> fallbacks, namely 192.168.100.2/24 as address/netmask, 192.168.100.1 as
> gateway and the gateway address as DNS server address.
>
> Reported-by: Christian Ebner <c.ebner at proxmox.com>
> Signed-off-by: Christoph Heiss <c.heiss at proxmox.com>


I am a bit late here, I tested this patch with either one or three NICs
and with and without a working DHCP server. I did not notice any
regression.

Tested-by: Maximiliano Sandoval <m.sandoval at proxmox.com>




More information about the pve-devel mailing list