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.laute...@proxmox.com>
Signed-off-by: Friedrich Weber <f.we...@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 = [
     '0.0.0.0',
-- 
2.39.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to