* [pve-devel] [PATCH common/proxmox 0/2] Fall back to regex detection for physical nics
@ 2025-08-04 11:11 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
0 siblings, 2 replies; 4+ messages in thread
From: Stefan Hanreich @ 2025-08-04 11:11 UTC (permalink / raw)
To: pve-devel
To avoid breaking changes in the detection of physical interfaces, use the regex
in addition to the ip link output.
pve-common:
Stefan Hanreich (1):
inotify/interfaces: fall back to PHYSICAL_NIC_RE
src/PVE/INotify.pm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
proxmox:
Stefan Hanreich (1):
network-api: fall back to PHYSICAL_NIC_REGEX
proxmox-network-api/src/config/helper.rs | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
Summary over all repositories:
2 files changed, 7 insertions(+), 3 deletions(-)
--
Generated by git-murpp 0.8.0
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [pve-devel] [PATCH pve-common 1/1] inotify/interfaces: fall back to PHYSICAL_NIC_RE
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 ` Stefan Hanreich
2025-08-04 11:11 ` [pve-devel] [PATCH proxmox 1/1] network-api: fall back to PHYSICAL_NIC_REGEX Stefan Hanreich
1 sibling, 0 replies; 4+ messages in thread
From: Stefan Hanreich @ 2025-08-04 11:11 UTC (permalink / raw)
To: pve-devel
To preserve backwards compatibility, we fall back to the
PHYSICAL_NIC_RE ensuring that everything that got detected as physical
interface before, gets detected afterwards as well.
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
src/PVE/INotify.pm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/PVE/INotify.pm b/src/PVE/INotify.pm
index d7e5add..bbcb9f8 100644
--- a/src/PVE/INotify.pm
+++ b/src/PVE/INotify.pm
@@ -1145,7 +1145,8 @@ OUTER:
$ifaces->{$raw_iface}->{exists} = 0;
$d->{exists} = 0;
}
- } elsif ($ip_link && PVE::Network::ip_link_is_physical($ip_link)) {
+ } elsif (($ip_link && PVE::Network::ip_link_is_physical($ip_link))
+ || $iface =~ m/^$PVE::Network::PHYSICAL_NIC_RE$/) {
if (!$d->{ovs_type}) {
$d->{type} = 'eth';
} elsif ($d->{ovs_type} eq 'OVSPort') {
--
2.47.2
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [pve-devel] [PATCH proxmox 1/1] network-api: fall back to PHYSICAL_NIC_REGEX
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 ` Stefan Hanreich
2025-08-05 10:41 ` [pve-devel] applied: " Wolfgang Bumiller
1 sibling, 1 reply; 4+ messages in thread
From: Stefan Hanreich @ 2025-08-04 11:11 UTC (permalink / raw)
To: pve-devel
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [pve-devel] applied: [PATCH proxmox 1/1] network-api: fall back to PHYSICAL_NIC_REGEX
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
0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Bumiller @ 2025-08-05 10:41 UTC (permalink / raw)
To: Stefan Hanreich; +Cc: 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 <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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-08-05 10:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [pve-devel] applied: " Wolfgang Bumiller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.