From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 4C6361FF0AF for ; Fri, 20 Nov 2026 16:27:11 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 0D23E21783; Fri, 20 Nov 2026 16:27:10 +0100 (CET) From: Gabriel Goller To: pve-devel@lists.proxmox.com Subject: [PATCH manager] ui: sdn: fabrics: do not show WireGuard interfaces for fabrics in a zone Date: Fri, 20 Nov 2026 16:26:56 +0100 Message-ID: <20261120152657.275504-1-g.goller@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1795188421338 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.218 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: WDDAFZJZ6GRZKDGJWPXBWTZZRUAHLFSW X-Message-ID-Hash: WDDAFZJZ6GRZKDGJWPXBWTZZRUAHLFSW X-MailFrom: g.goller@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: t.lamprecht@proxmox.com X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: An OSPF or BGP fabric in a zone moves its interfaces into the VRF of the zone. For a WireGuard interface, ifupdown2 merges the stanzas of both fabrics into: iface wg0 inet static address 10.1.0.1/24 link-type wireguard post-up ip route add 10.1.0.2/32 dev wg0 down ip route del 10.1.0.2/32 dev wg0 vrf vrf_red The peer routes have no VRF and end up in the main table, while the addresses of the WireGuard fabric stay in the default VRF. Traffic over wg0 in the VRF then has no route back. Adding the peer routes to the VRF instead is easy, but does not fix this. The routes point to the WireGuard fabric addresses of the peers, which are still only in the default VRF. Packets arriving on wg0 are looked up in the VRF, where these addresses don't exist. Even with the routes in the VRF, the encrypted packets of the tunnel are routed through the default VRF, because the WireGuard socket is not bound to the VRF. This circumvents the isolation of the zone. Allowing this again probably makes sense once WireGuard gains real VRF support. WireGuard interfaces that are already part of such a fabric are still shown, so they can be removed. Signed-off-by: Gabriel Goller --- www/manager6/sdn/FabricsView.js | 2 ++ www/manager6/sdn/fabrics/NodeEdit.js | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/www/manager6/sdn/FabricsView.js b/www/manager6/sdn/FabricsView.js index 88926462df11..b0c821cafef8 100644 --- a/www/manager6/sdn/FabricsView.js +++ b/www/manager6/sdn/FabricsView.js @@ -381,6 +381,7 @@ Ext.define('PVE.sdn.Fabric.View', { protocol: fabric.protocol, fabricIpPrefix: me.getFabricPrefix(fabric, 'ip_prefix'), fabricIp6Prefix: me.getFabricPrefix(fabric, 'ip6_prefix'), + fabricInVrf: !!fabric?.zone, disallowedNodes, addAnotherCallback: () => { let successCallback = () => { @@ -428,6 +429,7 @@ Ext.define('PVE.sdn.Fabric.View', { protocol: node.protocol, fabricIpPrefix: me.getFabricPrefix(fabric, 'ip_prefix'), fabricIp6Prefix: me.getFabricPrefix(fabric, 'ip6_prefix'), + fabricInVrf: !!fabric?.zone, }); window.on('destroy', () => me.reload()); diff --git a/www/manager6/sdn/fabrics/NodeEdit.js b/www/manager6/sdn/fabrics/NodeEdit.js index 0ace12cdc34b..a7a887d21f7f 100644 --- a/www/manager6/sdn/fabrics/NodeEdit.js +++ b/www/manager6/sdn/fabrics/NodeEdit.js @@ -17,6 +17,8 @@ Ext.define('PVE.sdn.Fabric.Node.Edit', { fabricIpPrefix: undefined, fabricIp6Prefix: undefined, + fabricInVrf: false, + disallowedNodes: [], baseUrl: '/cluster/sdn/fabrics/node', @@ -140,7 +142,9 @@ Ext.define('PVE.sdn.Fabric.Node.Edit', { }), ]; - if (me.includeWireguardInterfaces) { + let includeWireguard = me.includeWireguardInterfaces && !me.fabricInVrf; + + if (includeWireguard) { requests.push( Proxmox.Async.api2({ url: `/api2/extjs/cluster/sdn/fabrics/node/`, @@ -158,7 +162,7 @@ Ext.define('PVE.sdn.Fabric.Node.Edit', { ip6: iface.cidr6, })); - if (me.includeWireguardInterfaces) { + if (includeWireguard) { let wireguardNodes = result[1].result.data.filter((node) => { return ( node.node_id === me.nodeId && node.protocol === 'wireguard' && node.interfaces -- 2.47.3