public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Wolfgang Bumiller <w.bumiller@proxmox.com>
To: Stefan Hanreich <s.hanreich@proxmox.com>
Cc: pve-devel@lists.proxmox.com
Subject: [pve-devel] applied: [PATCH proxmox 1/1] network-api: fall back to PHYSICAL_NIC_REGEX
Date: Tue, 5 Aug 2025 12:41:02 +0200	[thread overview]
Message-ID: <zvtcb7o5funebxbgsfoejyixihqgj4hvmvdmqg7snc7ncqbdxe@hqu3vbwt43zm> (raw)
In-Reply-To: <20250804111128.269493-3-s.hanreich@proxmox.com>

applied this one, thanks

On Mon, Aug 04, 2025 at 01:11:26PM +0200, Stefan Hanreich wrote:
> In order to detect every interface we detected before as physical (in
> addition to the ones detect by 'ip link'), fall back to
> PHYSICAL_NIC_REGEX when detecting physical interfaces.
> 
> Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
> ---
>  proxmox-network-api/src/config/helper.rs | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/proxmox-network-api/src/config/helper.rs b/proxmox-network-api/src/config/helper.rs
> index 7d5fe1e6..4f17b9ee 100644
> --- a/proxmox-network-api/src/config/helper.rs
> +++ b/proxmox-network-api/src/config/helper.rs
> @@ -11,6 +11,8 @@ use proxmox_network_types::mac_address::MacAddress;
>  use proxmox_schema::api_types::IPV4RE_STR;
>  use proxmox_schema::api_types::IPV6RE_STR;
>  
> +use crate::config::PHYSICAL_NIC_REGEX;
> +
>  pub static IPV4_REVERSE_MASK: &[&str] = &[
>      "0.0.0.0",
>      "128.0.0.0",
> @@ -146,8 +148,9 @@ impl IpLink {
>      }
>  
>      pub fn is_physical(&self) -> bool {
> -        self.link_type == "ether"
> -            && (self.linkinfo.is_none() || self.linkinfo.as_ref().unwrap().info_kind.is_none())
> +        (self.link_type == "ether"
> +            && (self.linkinfo.is_none() || self.linkinfo.as_ref().unwrap().info_kind.is_none()))
> +            || PHYSICAL_NIC_REGEX.is_match(&self.ifname)
>      }
>  
>      pub fn name(&self) -> &str {
> -- 
> 2.47.2
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> 
> 


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


      reply	other threads:[~2025-08-05 10:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-04 11:11 [pve-devel] [PATCH common/proxmox 0/2] Fall back to regex detection for physical nics Stefan Hanreich
2025-08-04 11:11 ` [pve-devel] [PATCH pve-common 1/1] inotify/interfaces: fall back to PHYSICAL_NIC_RE Stefan Hanreich
2025-08-04 11:11 ` [pve-devel] [PATCH proxmox 1/1] network-api: fall back to PHYSICAL_NIC_REGEX Stefan Hanreich
2025-08-05 10:41   ` Wolfgang Bumiller [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=zvtcb7o5funebxbgsfoejyixihqgj4hvmvdmqg7snc7ncqbdxe@hqu3vbwt43zm \
    --to=w.bumiller@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    --cc=s.hanreich@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