From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id F20CA1FF16F for ; Tue, 5 Aug 2025 12:40:05 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 25B7BC5C4; Tue, 5 Aug 2025 12:41:35 +0200 (CEST) Date: Tue, 5 Aug 2025 12:41:02 +0200 From: Wolfgang Bumiller To: Stefan Hanreich Message-ID: References: <20250804111128.269493-1-s.hanreich@proxmox.com> <20250804111128.269493-3-s.hanreich@proxmox.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20250804111128.269493-3-s.hanreich@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1754390442413 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.077 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [helper.rs, proxmox.com] Subject: [pve-devel] applied: [PATCH proxmox 1/1] network-api: fall back to PHYSICAL_NIC_REGEX X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Cc: pve-devel@lists.proxmox.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" 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 > --- > 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