* [PATCH manager] ui: sdn: fabrics: do not show WireGuard interfaces for fabrics in a zone
@ 2026-11-20 15:26 Gabriel Goller
2026-11-21 20:58 ` Thomas Lamprecht
0 siblings, 1 reply; 2+ messages in thread
From: Gabriel Goller @ 2026-11-20 15:26 UTC (permalink / raw)
To: pve-devel; +Cc: t.lamprecht
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH manager] ui: sdn: fabrics: do not show WireGuard interfaces for fabrics in a zone
2026-11-20 15:26 [PATCH manager] ui: sdn: fabrics: do not show WireGuard interfaces for fabrics in a zone Gabriel Goller
@ 2026-11-21 20:58 ` Thomas Lamprecht
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2026-11-21 20:58 UTC (permalink / raw)
To: pve-devel, Gabriel Goller
On Fri, 20 Nov 2026 16:26:56 +0100, Gabriel Goller wrote:
> 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:
>
> [...]
Applied, thanks!
What I changed in your patch:
- WG interfaces the node already used showed "Interface does not exist
on node", as none were loaded anymore. Now the used ones are loaded
and get a warning that zone fabrics cannot use them.
- Hide WG interfaces from /etc/network/interfaces.
What I added on top:
- ac8debe ("api: fabrics: reject WireGuard interfaces for fabrics in a
zone"): the API accepted them too. It only checks on node writes, so
existing configs still load and can be fixed.
- bbc6e74b9 ("ui: sdn: fabrics: node edit: only use the loaded data if
loading worked"): a failed load threw a second error.
- The docs now say that zone fabrics cannot use WG interfaces.
[1/1] ui: sdn: fabrics: do not show WireGuard interfaces for fabrics in a zone
commit: eef80582fc5a61372be7e3f58cc084f544915be1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-21 20:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-20 15:26 [PATCH manager] ui: sdn: fabrics: do not show WireGuard interfaces for fabrics in a zone Gabriel Goller
2026-11-21 20:58 ` Thomas Lamprecht
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox