public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Gabriel Goller <g.goller@proxmox.com>
To: pve-devel@lists.proxmox.com
Cc: t.lamprecht@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	[thread overview]
Message-ID: <20261120152657.275504-1-g.goller@proxmox.com> (raw)

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 <g.goller@proxmox.com>
---
 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





                 reply	other threads:[~2026-11-20 15:27 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20261120152657.275504-1-g.goller@proxmox.com \
    --to=g.goller@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    --cc=t.lamprecht@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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal