[pve-devel] [RFC common 3/3] network: recognize interfaces matching `c*` as physical NICs

Friedrich Weber f.weber at proxmox.com
Thu Jul 27 12:37:47 CEST 2023

Users can use systemd link files to assign meaningful interface names
to physical NICs. However, so far PVE only recognizes interface names
`ethN`, `en*` and `ib*` as physical NICs. NICs not matching these
patterns cannot be configured via the GUI (their type is "Unknown").

To allow users to choose meaningful interface names and still
configure these NICs via the GUI, recognize interfaces matching `c*`
(for "custom") as physical NICs.

Suggested-by: Aaron Lauterer <a.lauterer at proxmox.com>
Signed-off-by: Friedrich Weber <f.weber at proxmox.com>
 src/PVE/Network.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PVE/Network.pm b/src/PVE/Network.pm
index a4f5ba9..02918a3 100644
--- a/src/PVE/Network.pm
+++ b/src/PVE/Network.pm
@@ -17,7 +17,7 @@ use Socket qw(NI_NUMERICHOST NI_NUMERICSERV);
 # host network related utility functions
-our $PHYSICAL_NIC_RE = qr/(?:eth\d+|en[^:.]+|ib[^:.]+)/;
+our $PHYSICAL_NIC_RE = qr/(?:eth\d+|en[^:.]+|ib[^:.]+|c[^:.]+)/;
 our $ipv4_reverse_mask = [

More information about the pve-devel mailing list