* [pbs-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 ` [pbs-devel] [PATCH pve-common 1/1] inotify/interfaces: fall back to PHYSICAL_NIC_RE Stefan Hanreich
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Stefan Hanreich @ 2025-08-04 11:11 UTC (permalink / raw)
To: pbs-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
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [pbs-devel] [PATCH pve-common 1/1] inotify/interfaces: fall back to PHYSICAL_NIC_RE
2025-08-04 11:11 [pbs-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 ` [pbs-devel] [PATCH proxmox 1/1] network-api: fall back to PHYSICAL_NIC_REGEX Stefan Hanreich
2025-08-11 11:54 ` [pbs-devel] applied: [PATCH common/proxmox 0/2] Fall back to regex detection for physical nics Fabian Grünbichler
2 siblings, 0 replies; 4+ messages in thread
From: Stefan Hanreich @ 2025-08-04 11:11 UTC (permalink / raw)
To: pbs-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
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [pbs-devel] [PATCH proxmox 1/1] network-api: fall back to PHYSICAL_NIC_REGEX
2025-08-04 11:11 [pbs-devel] [PATCH common/proxmox 0/2] Fall back to regex detection for physical nics Stefan Hanreich
2025-08-04 11:11 ` [pbs-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-11 11:54 ` [pbs-devel] applied: [PATCH common/proxmox 0/2] Fall back to regex detection for physical nics Fabian Grünbichler
2 siblings, 0 replies; 4+ messages in thread
From: Stefan Hanreich @ 2025-08-04 11:11 UTC (permalink / raw)
To: pbs-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
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [pbs-devel] applied: [PATCH common/proxmox 0/2] Fall back to regex detection for physical nics
2025-08-04 11:11 [pbs-devel] [PATCH common/proxmox 0/2] Fall back to regex detection for physical nics Stefan Hanreich
2025-08-04 11:11 ` [pbs-devel] [PATCH pve-common 1/1] inotify/interfaces: fall back to PHYSICAL_NIC_RE Stefan Hanreich
2025-08-04 11:11 ` [pbs-devel] [PATCH proxmox 1/1] network-api: fall back to PHYSICAL_NIC_REGEX Stefan Hanreich
@ 2025-08-11 11:54 ` Fabian Grünbichler
2 siblings, 0 replies; 4+ messages in thread
From: Fabian Grünbichler @ 2025-08-11 11:54 UTC (permalink / raw)
To: Proxmox Backup Server development discussion
FTR, this got applied last week..
On August 4, 2025 1:11 pm, Stefan Hanreich wrote:
> 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
>
> _______________________________________________
> pbs-devel mailing list
> pbs-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
>
>
>
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-08-11 11:52 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 [pbs-devel] [PATCH common/proxmox 0/2] Fall back to regex detection for physical nics Stefan Hanreich
2025-08-04 11:11 ` [pbs-devel] [PATCH pve-common 1/1] inotify/interfaces: fall back to PHYSICAL_NIC_RE Stefan Hanreich
2025-08-04 11:11 ` [pbs-devel] [PATCH proxmox 1/1] network-api: fall back to PHYSICAL_NIC_REGEX Stefan Hanreich
2025-08-11 11:54 ` [pbs-devel] applied: [PATCH common/proxmox 0/2] Fall back to regex detection for physical nics Fabian Grünbichler
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox