From: Stefan Hanreich <s.hanreich@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH pve-network 1/1] fix #6806: vlan: qinq: fix bridge port detection
Date: Wed, 10 Dec 2025 19:42:45 +0100 [thread overview]
Message-ID: <20251210184247.448937-4-s.hanreich@proxmox.com> (raw)
In-Reply-To: <20251210184247.448937-1-s.hanreich@proxmox.com>
When creating a vlan zone and vnet, pve-network looks at all the
physical bridge ports (slaves) and adds them to the generated vlan
bridge. The zone plugin gets all the bridge interfaces using
`/sys/class/net` and then filters them using a regex. With the
introduction of network interface pinning, the restrictions on network
interface names have gotten more liberal - they're not required to
have specific prefixes anymore. The check for physical interfaces in
the zones plugin needs to be adjusted to reflect those changes,
otherwise the generated SDN configuration does not contain any pinned
physical ports and therefore doesn't work.
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
src/PVE/Network/SDN/Zones/Plugin.pm | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/src/PVE/Network/SDN/Zones/Plugin.pm b/src/PVE/Network/SDN/Zones/Plugin.pm
index a860168..05af47f 100644
--- a/src/PVE/Network/SDN/Zones/Plugin.pm
+++ b/src/PVE/Network/SDN/Zones/Plugin.pm
@@ -349,13 +349,7 @@ sub is_ovs {
sub get_bridge_ifaces {
my ($bridge) = @_;
- my @bridge_ifaces = ();
- my $dir = "/sys/class/net/$bridge/brif";
- PVE::Tools::dir_glob_foreach($dir, '(((eth|bond)\d+|en[^.]+)(\.\d+)?)', sub {
- push @bridge_ifaces, $_[0];
- });
-
- return @bridge_ifaces;
+ return PVE::Network::get_physical_bridge_ports($bridge);
}
sub datacenter_config {
--
2.47.3
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2025-12-10 18:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-10 18:42 [pve-devel] [PATCH common/manager/network 0/3] bookworm: fix VLAN handling on vlan-unaware bridges with pinned NIC names Stefan Hanreich
2025-12-10 18:42 ` [pve-devel] [PATCH pve-common 1/1] fix #7118: fix bridge port detection when plugging netdev with vlan Stefan Hanreich
2025-12-10 19:28 ` [pve-devel] applied: " Thomas Lamprecht
2025-12-10 18:42 ` [pve-devel] [PATCH pve-manager 1/1] pve-sdn-commit: run for vlan/qinq zones on non-vlan-aware bridges Stefan Hanreich
2025-12-10 18:42 ` Stefan Hanreich [this message]
2025-12-10 19:38 ` [pve-devel] applied: [PATCH pve-network 1/1] fix #6806: vlan: qinq: fix bridge port detection Thomas Lamprecht
-- strict thread matches above, loose matches on Subject: below --
2025-12-10 18:42 [pve-devel] [PATCH common/manager/network 0/4] trixie: fix VLAN handling on vlan-unaware bridges with pinned NIC names Stefan Hanreich
2025-12-10 18:42 ` [pve-devel] [PATCH pve-network 1/1] fix #6806: vlan: qinq: fix bridge port detection Stefan Hanreich
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=20251210184247.448937-4-s.hanreich@proxmox.com \
--to=s.hanreich@proxmox.com \
--cc=pve-devel@lists.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