From 4f19480b04315afb5dc23e0130463acaea35db18 Mon Sep 17 00:00:00 2001 From: Gabriel Goller Date: Mon, 15 Sep 2025 10:47:59 +0200 Subject: fix #6806: sdn: allow nic* and if* interfaces as bridge ports When creating a vlan zone and vnet, we get all the bridge interfaces (slaves) and add them to the new vlan bridge. We get all the bridge interfaces using `/sys/class/net` and then filter them using a regex. This regex was missing the new `if` and `nic` prefixes which were introduced with the pve-network-interface-pinning tool. This is more of a stop-gap, we can probably remove the regex completely as I don't see any reason to filter by "physical" interfaces here. If there is a need, we can still run `ip link` and check the attributes with `PVE::Network::ip_link_is_physical`. Fixes: #6806 Signed-off-by: Gabriel Goller Link: https://lore.proxmox.com/20250915084801.48170-1-g.goller@proxmox.com --- src/PVE/Network/SDN/Zones/Plugin.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/PVE/Network') diff --git a/src/PVE/Network/SDN/Zones/Plugin.pm b/src/PVE/Network/SDN/Zones/Plugin.pm index 260d26c..6dc2f65 100644 --- a/src/PVE/Network/SDN/Zones/Plugin.pm +++ b/src/PVE/Network/SDN/Zones/Plugin.pm @@ -346,7 +346,7 @@ sub get_bridge_ifaces { my $dir = "/sys/class/net/$bridge/brif"; PVE::Tools::dir_glob_foreach( $dir, - '(((eth|bond)\d+|en[^.]+)(\.\d+)?)', + '(((eth|bond|nic|if)\d+|en[^.]+)(\.\d+)?)', sub { push @bridge_ifaces, $_[0]; }, -- cgit v1.2.3