public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Friedrich Weber <f.weber@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [RFC common 3/3] network: recognize interfaces matching `c*` as physical NICs
Date: Thu, 27 Jul 2023 12:37:47 +0200	[thread overview]
Message-ID: <20230727103747.106574-4-f.weber@proxmox.com> (raw)
In-Reply-To: <20230727103747.106574-1-f.weber@proxmox.com>

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@proxmox.com>
Signed-off-by: Friedrich Weber <f.weber@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





      parent reply	other threads:[~2023-07-27 10:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-27 10:37 [pve-devel] [PATCH+RFC docs/common 0/3] fix #4847: network: custom naming for network devices Friedrich Weber
2023-07-27 10:37 ` [pve-devel] [PATCH docs 1/3] fix #4847: network: extend section on interface naming scheme Friedrich Weber
2023-11-17  9:18   ` [pve-devel] applied: " Thomas Lamprecht
2023-07-27 10:37 ` [pve-devel] [RFC docs 2/3] network: describe and recommend `c*` names for custom interface Friedrich Weber
2023-07-27 10:37 ` Friedrich Weber [this message]

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=20230727103747.106574-4-f.weber@proxmox.com \
    --to=f.weber@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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal