public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH docs/manager/network/proxmox-perl-rs 00/10] WireGuard fabric follow-ups
@ 2026-11-20 16:00 Stefan Hanreich
  2026-11-20 16:00 ` [PATCH proxmox-perl-rs 01/10] pve-rs: sdn: fabrics: wireguard: return empty status for non-member nodes Stefan Hanreich
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: Stefan Hanreich @ 2026-11-20 16:00 UTC (permalink / raw)
  To: pve-devel

This series contains follow-ups for the WireGuard fabric status
reporting and its UI:

* The interfaces and neighbors status endpoints return an empty list on
  nodes that are not part of the fabric, instead of failing.
* The interface status only reports the public key and listen port that
  are actually running on the node, instead of falling back to the
  configured values. It reports the type 'wireguard' only for actual
  WireGuard interfaces and omits it otherwise, without exposing the kind
  of other interfaces. The UI shows '-' for all status values that
  WireGuard does not report.
* The neighbors grid shows the persistent keepalive interval that
  WireGuard currently uses for each peer.
* The neighbors and interfaces grids get a reload button, since their
  values change continuously.
* The interface panel blocks saving if an interface has an invalid MTU or
  listen port, instead of silently submitting the previous value.
* Resetting the node edit window now also resets the interfaces.

Showing '-' for the public key, listen port and type of interfaces
requires the proxmox-perl-rs changes to have an effect. The pve-network
patch adapts the API schema, since the interface type can now be
omitted.


proxmox-perl-rs:

Stefan Hanreich (3):
  pve-rs: sdn: fabrics: wireguard: return empty status for non-member
    nodes
  pve-rs: sdn: status: wireguard: only report type of WireGuard
    interfaces
  pve-rs: sdn: status: wireguard: only report running interface keys and
    ports

 pve-rs/src/bindings/sdn/fabrics.rs |  43 ++---
 pve-rs/src/sdn/status.rs           | 264 +++++++++++++++++++++--------
 2 files changed, 205 insertions(+), 102 deletions(-)


pve-network:

Stefan Hanreich (1):
  api: fabric status: document omitted WireGuard interface values

 src/PVE/API2/Network/SDN/Nodes/Fabric.pm | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)


pve-manager:

Stefan Hanreich (5):
  ui: sdn: fabrics: wireguard: block saving invalid interface values
  ui: sdn: fabrics: wireguard: show persistent keepalive of neighbors
  ui: sdn: fabrics: wireguard: show '-' for unknown status values
  ui: sdn: fabrics: wireguard: add reload button to status grids
  ui: sdn: fabrics: wireguard: support resetting the interfaces

 www/manager6/sdn/FabricsContentView.js        |  30 +++++
 .../sdn/fabrics/wireguard/InterfacePanel.js   | 127 ++++++++++++++----
 2 files changed, 133 insertions(+), 24 deletions(-)


pve-docs:

Stefan Hanreich (1):
  sdn: fabrics: wireguard: document status values and keepalive column

 pvesdn.adoc | 24 +++++++++++++++---------
 1 file changed, 15 insertions(+), 9 deletions(-)


Summary over all repositories:
  6 files changed, 361 insertions(+), 138 deletions(-)

-- 
Generated by murpp 0.12.1




^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH proxmox-perl-rs 01/10] pve-rs: sdn: fabrics: wireguard: return empty status for non-member nodes
  2026-11-20 16:00 [PATCH docs/manager/network/proxmox-perl-rs 00/10] WireGuard fabric follow-ups Stefan Hanreich
@ 2026-11-20 16:00 ` Stefan Hanreich
  2026-11-20 16:00 ` [PATCH proxmox-perl-rs 02/10] pve-rs: sdn: status: wireguard: only report type of WireGuard interfaces Stefan Hanreich
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Stefan Hanreich @ 2026-11-20 16:00 UTC (permalink / raw)
  To: pve-devel

Querying the interfaces or neighbors of a WireGuard fabric on a node
that is not part of the fabric failed, since looking up the node
section of the local node returned an error. Return an empty list
instead, as the OSPF status already does.

Look up the node section before querying WireGuard and the network
interfaces, so neither is queried on nodes outside of the fabric. For
this, the status functions now take callbacks for querying WireGuard
and the network interfaces, which also makes them mockable in tests.

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
 pve-rs/src/bindings/sdn/fabrics.rs | 43 ++++++------------
 pve-rs/src/sdn/status.rs           | 71 ++++++++++++++++++++++++++++--
 2 files changed, 82 insertions(+), 32 deletions(-)

diff --git a/pve-rs/src/bindings/sdn/fabrics.rs b/pve-rs/src/bindings/sdn/fabrics.rs
index 98c132d..2471287 100644
--- a/pve-rs/src/bindings/sdn/fabrics.rs
+++ b/pve-rs/src/bindings/sdn/fabrics.rs
@@ -1048,20 +1048,13 @@ pub mod pve_rs_sdn_fabrics {
                 )
                 .map(|v| v.into())
             }
-            FabricEntry::WireGuard(fabric_entry) => {
-                let wg_dump = get_wireguard_dump()?;
-
-                let node_name = proxmox_sys::nodename();
-                let current_node_id = NodeId::from_string(node_name.to_string())?;
-
-                status::wireguard::parse_wireguard_neighbors(
-                    &wg_dump,
-                    fabric_entry.node_section(&current_node_id)?,
-                    fabric_entry,
-                    proxmox_time::epoch_i64(),
-                )
-                .map(Into::into)
-            }
+            FabricEntry::WireGuard(fabric_entry) => status::wireguard::get_neighbors(
+                fabric_entry,
+                &NodeId::from_string(proxmox_sys::nodename().to_string())?,
+                get_wireguard_dump,
+                proxmox_time::epoch_i64(),
+            )
+            .map(Into::into),
             FabricEntry::Bgp(_) => {
                 let command = match &vrf {
                     Some(vrf) => format!("show bgp vrf {vrf} neighbors json"),
@@ -1139,21 +1132,13 @@ pub mod pve_rs_sdn_fabrics {
                 )
                 .map(|v| v.into())
             }
-            FabricEntry::WireGuard(fabric_entry) => {
-                let wg_dump = get_wireguard_dump()?;
-
-                let network_interfaces = get_network_interfaces()?;
-
-                let node_name = proxmox_sys::nodename();
-                let current_node_id = NodeId::from_string(node_name.to_string())?;
-
-                status::wireguard::parse_wireguard_interfaces(
-                    &wg_dump,
-                    fabric_entry.node_section(&current_node_id)?,
-                    &network_interfaces,
-                )
-                .map(Into::into)
-            }
+            FabricEntry::WireGuard(fabric_entry) => status::wireguard::get_interfaces(
+                fabric_entry,
+                &NodeId::from_string(proxmox_sys::nodename().to_string())?,
+                get_wireguard_dump,
+                get_network_interfaces,
+            )
+            .map(Into::into),
             FabricEntry::Bgp(_) => {
                 let command = match &vrf {
                     Some(vrf) => format!("show bgp vrf {vrf} neighbors json"),
diff --git a/pve-rs/src/sdn/status.rs b/pve-rs/src/sdn/status.rs
index 2e29e6d..881b97f 100644
--- a/pve-rs/src/sdn/status.rs
+++ b/pve-rs/src/sdn/status.rs
@@ -90,7 +90,7 @@ pub mod wireguard {
     use proxmox_ve_config::sdn::fabric::{
         Entry, WireGuardInterfacePeer,
         section_config::{
-            node::NodeSection,
+            node::{NodeId, NodeSection},
             protocol::wireguard::{WireGuardNode, WireGuardProperties},
         },
     };
@@ -340,6 +340,23 @@ pub mod wireguard {
         Ok(interface_status)
     }
 
+    /// Returns the status of the interfaces of the node `node_id` in the fabric.
+    ///
+    /// If the node is not part of the fabric, an empty list is returned without querying WireGuard
+    /// or the network interfaces.
+    pub fn get_interfaces(
+        fabric: &Entry<WireGuardProperties, WireGuardNode>,
+        node_id: &NodeId,
+        wg_dump: impl FnOnce() -> Result<String, anyhow::Error>,
+        network_interfaces: impl FnOnce() -> Result<HashMap<String, IpLink>, anyhow::Error>,
+    ) -> Result<Vec<InterfaceStatus>, anyhow::Error> {
+        let Ok(node_section) = fabric.node_section(node_id) else {
+            return Ok(Vec::new());
+        };
+
+        parse_wireguard_interfaces(&wg_dump()?, node_section, &network_interfaces()?)
+    }
+
     /// Returns `None` for values that wg prints as "(none)".
     fn optional_value(value: &str) -> Option<&str> {
         (value != "(none)").then_some(value)
@@ -499,6 +516,22 @@ pub mod wireguard {
         Ok(neighbors)
     }
 
+    /// Returns the status of the neighbors of the node `node_id` in the fabric.
+    ///
+    /// If the node is not part of the fabric, an empty list is returned without querying WireGuard.
+    pub fn get_neighbors(
+        fabric: &Entry<WireGuardProperties, WireGuardNode>,
+        node_id: &NodeId,
+        wg_dump: impl FnOnce() -> Result<String, anyhow::Error>,
+        now: i64,
+    ) -> Result<Vec<NeighborStatus>, anyhow::Error> {
+        let Ok(node_section) = fabric.node_section(node_id) else {
+            return Ok(Vec::new());
+        };
+
+        parse_wireguard_neighbors(&wg_dump()?, node_section, fabric, now)
+    }
+
     /// Checks whether WireGuard on this node matches the fabric configuration.
     ///
     /// This is the case if all configured interfaces are up and use their configured public key
@@ -3430,8 +3463,8 @@ mod tests {
         };
 
         use super::super::wireguard::{
-            InterfaceStatus, NeighborStatus, PeerStatus, WireGuardInterfaceState, is_node_ok,
-            parse_wireguard_interfaces, parse_wireguard_neighbors,
+            InterfaceStatus, NeighborStatus, PeerStatus, WireGuardInterfaceState, get_interfaces,
+            get_neighbors, is_node_ok, parse_wireguard_interfaces, parse_wireguard_neighbors,
         };
         use super::super::*;
 
@@ -3740,6 +3773,22 @@ wg0	8ybxvVfiWqpBG160nMgH14acR3z31ZeceW7ita0zonA=	(none)	172.31.1.4:51820	198.51.
             );
         }
 
+        #[test]
+        fn interfaces_non_member_node() {
+            let config = fabric_config();
+            let fabric = wireguard_fabric(&config);
+
+            let interfaces = get_interfaces(
+                fabric,
+                &NodeId::from_str("summoner").expect("valid node id"),
+                || panic!("wg must not be queried"),
+                || panic!("network interfaces must not be queried"),
+            )
+            .expect("can get interfaces");
+
+            assert!(interfaces.is_empty());
+        }
+
         #[test]
         fn neighbors() {
             // all configured peers are present, but there was no handshake yet
@@ -3804,6 +3853,22 @@ wg0	8ybxvVfiWqpBG160nMgH14acR3z31ZeceW7ita0zonA=	(none)	172.31.1.4:51820	198.51.
             );
         }
 
+        #[test]
+        fn neighbors_non_member_node() {
+            let config = fabric_config();
+            let fabric = wireguard_fabric(&config);
+
+            let neighbors = get_neighbors(
+                fabric,
+                &NodeId::from_str("summoner").expect("valid node id"),
+                || panic!("wg must not be queried"),
+                1781234627,
+            )
+            .expect("can get neighbors");
+
+            assert!(neighbors.is_empty());
+        }
+
         #[test]
         fn neighbor_roamed() {
             // occultist is reachable via a different address than its configured endpoint, e.g. due to NAT
-- 
2.47.3





^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH proxmox-perl-rs 02/10] pve-rs: sdn: status: wireguard: only report type of WireGuard interfaces
  2026-11-20 16:00 [PATCH docs/manager/network/proxmox-perl-rs 00/10] WireGuard fabric follow-ups Stefan Hanreich
  2026-11-20 16:00 ` [PATCH proxmox-perl-rs 01/10] pve-rs: sdn: fabrics: wireguard: return empty status for non-member nodes Stefan Hanreich
@ 2026-11-20 16:00 ` Stefan Hanreich
  2026-11-20 16:00 ` [PATCH proxmox-perl-rs 03/10] pve-rs: sdn: status: wireguard: only report running interface keys and ports Stefan Hanreich
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Stefan Hanreich @ 2026-11-20 16:00 UTC (permalink / raw)
  To: pve-devel

The interface status always reported the type 'wireguard', even for
an interface that exists, but is not a WireGuard interface, which is
exactly what the 'error' state indicates.

Report the type 'wireguard' only if the interface on the node actually
is a WireGuard interface, and omit it otherwise. The state already
shows whether the interface is missing or is not a WireGuard interface.
The kind of other interfaces is not reported, since anyone who can
configure the fabric could otherwise query it for any interface on the
node.

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
 pve-rs/src/sdn/status.rs | 80 ++++++++++++++++++++++++++++++++--------
 1 file changed, 65 insertions(+), 15 deletions(-)

diff --git a/pve-rs/src/sdn/status.rs b/pve-rs/src/sdn/status.rs
index 881b97f..59be427 100644
--- a/pve-rs/src/sdn/status.rs
+++ b/pve-rs/src/sdn/status.rs
@@ -191,8 +191,8 @@ pub mod wireguard {
     #[serde(rename_all = "kebab-case")]
     pub struct InterfaceStatus {
         pub name: String,
-        #[serde(rename = "type")]
-        pub ty: String,
+        #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
+        pub ty: Option<String>,
         pub state: WireGuardInterfaceState,
         pub public_key: PublicKey,
         pub listen_port: u16,
@@ -318,9 +318,15 @@ pub mod wireguard {
             .map(|interface| {
                 let name = interface.name().as_ref();
                 let running_interface = running_interfaces.get(name);
+                let network_interface = network_interfaces.get(name);
+
+                let state = interface_state(network_interface, running_interface.is_some());
 
-                let state =
-                    interface_state(network_interfaces.get(name), running_interface.is_some());
+                // do not report the kind of other interfaces, since anyone who can configure the
+                // fabric could otherwise query it for any interface on the node
+                let ty = network_interface
+                    .is_some_and(is_wireguard_interface)
+                    .then(|| "wireguard".to_string());
 
                 let (public_key, listen_port) = match running_interface {
                     Some((Some(public_key), listen_port)) => (*public_key, *listen_port),
@@ -329,7 +335,7 @@ pub mod wireguard {
 
                 InterfaceStatus {
                     name: name.to_string(),
-                    ty: "wireguard".to_string(),
+                    ty,
                     state,
                     public_key,
                     listen_port,
@@ -3565,7 +3571,7 @@ wg0	8ybxvVfiWqpBG160nMgH14acR3z31ZeceW7ita0zonA=	(none)	172.31.1.4:51820	198.51.
             let expected = vec![
                 InterfaceStatus {
                     name: "wg1".to_string(),
-                    ty: "wireguard".to_string(),
+                    ty: Some("wireguard".to_string()),
                     state: WireGuardInterfaceState::Down,
                     public_key: "Um+Z4Ymq3r24txH2itVVtC86ra1PIrFs9AeMebESdWM="
                         .parse()
@@ -3574,7 +3580,7 @@ wg0	8ybxvVfiWqpBG160nMgH14acR3z31ZeceW7ita0zonA=	(none)	172.31.1.4:51820	198.51.
                 },
                 InterfaceStatus {
                     name: "wg0".to_string(),
-                    ty: "wireguard".to_string(),
+                    ty: Some("wireguard".to_string()),
                     state: WireGuardInterfaceState::Up,
                     public_key: "AQkUKUJXOxR/QH6fjZLx8GO1ZnnD8PueRYMJNOCzc2M="
                         .parse()
@@ -3609,7 +3615,7 @@ wg0	8ybxvVfiWqpBG160nMgH14acR3z31ZeceW7ita0zonA=	(none)	172.31.1.4:51820	198.51.
             let expected = vec![
                 InterfaceStatus {
                     name: "wg1".to_string(),
-                    ty: "wireguard".to_string(),
+                    ty: None,
                     state: WireGuardInterfaceState::Missing,
                     public_key: "Um+Z4Ymq3r24txH2itVVtC86ra1PIrFs9AeMebESdWM="
                         .parse()
@@ -3618,7 +3624,7 @@ wg0	8ybxvVfiWqpBG160nMgH14acR3z31ZeceW7ita0zonA=	(none)	172.31.1.4:51820	198.51.
                 },
                 InterfaceStatus {
                     name: "wg0".to_string(),
-                    ty: "wireguard".to_string(),
+                    ty: Some("wireguard".to_string()),
                     state: WireGuardInterfaceState::Up,
                     public_key: "AQkUKUJXOxR/QH6fjZLx8GO1ZnnD8PueRYMJNOCzc2M="
                         .parse()
@@ -3654,7 +3660,7 @@ wg0	8ybxvVfiWqpBG160nMgH14acR3z31ZeceW7ita0zonA=	(none)	172.31.1.4:51820	198.51.
             let expected = vec![
                 InterfaceStatus {
                     name: "wg1".to_string(),
-                    ty: "wireguard".to_string(),
+                    ty: Some("wireguard".to_string()),
                     state: WireGuardInterfaceState::Unknown,
                     public_key: "Um+Z4Ymq3r24txH2itVVtC86ra1PIrFs9AeMebESdWM="
                         .parse()
@@ -3663,7 +3669,7 @@ wg0	8ybxvVfiWqpBG160nMgH14acR3z31ZeceW7ita0zonA=	(none)	172.31.1.4:51820	198.51.
                 },
                 InterfaceStatus {
                     name: "wg0".to_string(),
-                    ty: "wireguard".to_string(),
+                    ty: Some("wireguard".to_string()),
                     state: WireGuardInterfaceState::Up,
                     public_key: "AQkUKUJXOxR/QH6fjZLx8GO1ZnnD8PueRYMJNOCzc2M="
                         .parse()
@@ -3701,7 +3707,7 @@ wg0	8ybxvVfiWqpBG160nMgH14acR3z31ZeceW7ita0zonA=	(none)	172.31.1.4:51820	198.51.
             let expected = vec![
                 InterfaceStatus {
                     name: "wg1".to_string(),
-                    ty: "wireguard".to_string(),
+                    ty: Some("wireguard".to_string()),
                     state: WireGuardInterfaceState::Up,
                     public_key: "Um+Z4Ymq3r24txH2itVVtC86ra1PIrFs9AeMebESdWM="
                         .parse()
@@ -3710,7 +3716,7 @@ wg0	8ybxvVfiWqpBG160nMgH14acR3z31ZeceW7ita0zonA=	(none)	172.31.1.4:51820	198.51.
                 },
                 InterfaceStatus {
                     name: "wg0".to_string(),
-                    ty: "wireguard".to_string(),
+                    ty: Some("wireguard".to_string()),
                     state: WireGuardInterfaceState::Up,
                     public_key: "AQkUKUJXOxR/QH6fjZLx8GO1ZnnD8PueRYMJNOCzc2M="
                         .parse()
@@ -3748,7 +3754,51 @@ wg0	8ybxvVfiWqpBG160nMgH14acR3z31ZeceW7ita0zonA=	(none)	172.31.1.4:51820	198.51.
             let expected = vec![
                 InterfaceStatus {
                     name: "wg1".to_string(),
-                    ty: "wireguard".to_string(),
+                    ty: Some("wireguard".to_string()),
+                    state: WireGuardInterfaceState::Up,
+                    public_key: "Um+Z4Ymq3r24txH2itVVtC86ra1PIrFs9AeMebESdWM="
+                        .parse()
+                        .expect("valid public key"),
+                    listen_port: 51821,
+                },
+                InterfaceStatus {
+                    name: "wg0".to_string(),
+                    ty: None,
+                    state: WireGuardInterfaceState::Error,
+                    public_key: "AQkUKUJXOxR/QH6fjZLx8GO1ZnnD8PueRYMJNOCzc2M="
+                        .parse()
+                        .expect("valid public key"),
+                    listen_port: 51820,
+                },
+            ];
+
+            assert_eq!(
+                expected,
+                parse_wireguard_interfaces(wg_dump, elementalist(fabric), &network_interfaces)
+                    .expect("can parse wireguard output")
+            );
+        }
+
+        #[test]
+        fn interface_without_link_kind() {
+            // wg0 is a physical NIC, which has no link kind and is not reported by wg
+            let wg_dump = r#"wg1	wF2D1my5Cj962/MOS2UXLvCddm3ozmCSSuBQ1Ey6v3I=	Um+Z4Ymq3r24txH2itVVtC86ra1PIrFs9AeMebESdWM=	51821	off
+wg1	aHnKVQ4yTtTdfwsk+r4Z12FrRlUnXXksjRcV7x41+G0=	(none)	172.31.1.10:51820	(none)	0	0	0	off"#;
+
+            let network_interfaces = network_interfaces(
+                r#"[
+                {"ifname": "wg0", "ifindex": 2, "link_type": "ether", "address": "bc:24:11:aa:bb:cc", "operstate": "UP", "flags": ["BROADCAST", "MULTICAST", "UP", "LOWER_UP"]},
+                {"ifname": "wg1", "ifindex": 24, "link_type": "none", "operstate": "UNKNOWN", "linkinfo": {"info_kind": "wireguard"}, "flags": ["POINTOPOINT", "NOARP", "UP", "LOWER_UP"]}
+            ]"#,
+            );
+
+            let config = fabric_config();
+            let fabric = wireguard_fabric(&config);
+
+            let expected = vec![
+                InterfaceStatus {
+                    name: "wg1".to_string(),
+                    ty: Some("wireguard".to_string()),
                     state: WireGuardInterfaceState::Up,
                     public_key: "Um+Z4Ymq3r24txH2itVVtC86ra1PIrFs9AeMebESdWM="
                         .parse()
@@ -3757,7 +3807,7 @@ wg0	8ybxvVfiWqpBG160nMgH14acR3z31ZeceW7ita0zonA=	(none)	172.31.1.4:51820	198.51.
                 },
                 InterfaceStatus {
                     name: "wg0".to_string(),
-                    ty: "wireguard".to_string(),
+                    ty: None,
                     state: WireGuardInterfaceState::Error,
                     public_key: "AQkUKUJXOxR/QH6fjZLx8GO1ZnnD8PueRYMJNOCzc2M="
                         .parse()
-- 
2.47.3





^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH proxmox-perl-rs 03/10] pve-rs: sdn: status: wireguard: only report running interface keys and ports
  2026-11-20 16:00 [PATCH docs/manager/network/proxmox-perl-rs 00/10] WireGuard fabric follow-ups Stefan Hanreich
  2026-11-20 16:00 ` [PATCH proxmox-perl-rs 01/10] pve-rs: sdn: fabrics: wireguard: return empty status for non-member nodes Stefan Hanreich
  2026-11-20 16:00 ` [PATCH proxmox-perl-rs 02/10] pve-rs: sdn: status: wireguard: only report type of WireGuard interfaces Stefan Hanreich
@ 2026-11-20 16:00 ` Stefan Hanreich
  2026-11-20 16:00 ` [PATCH pve-network 04/10] api: fabric status: document omitted WireGuard interface values Stefan Hanreich
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Stefan Hanreich @ 2026-11-20 16:00 UTC (permalink / raw)
  To: pve-devel

If wg did not report the public key of an interface, the interface
status returned the configured public key and listen port instead.
This happened if the interface was missing, was not a WireGuard
interface, could not be read by wg, or had no private key. In the
latter case the configured listen port even replaced the running one
that wg did report.

The status should reflect what is actually running, so omit the
public key and listen port if wg does not report them.

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
 pve-rs/src/sdn/status.rs | 129 ++++++++++++++++++++-------------------
 1 file changed, 66 insertions(+), 63 deletions(-)

diff --git a/pve-rs/src/sdn/status.rs b/pve-rs/src/sdn/status.rs
index 59be427..9d3534c 100644
--- a/pve-rs/src/sdn/status.rs
+++ b/pve-rs/src/sdn/status.rs
@@ -194,8 +194,10 @@ pub mod wireguard {
         #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
         pub ty: Option<String>,
         pub state: WireGuardInterfaceState,
-        pub public_key: PublicKey,
-        pub listen_port: u16,
+        #[serde(skip_serializing_if = "Option::is_none")]
+        pub public_key: Option<PublicKey>,
+        #[serde(skip_serializing_if = "Option::is_none")]
+        pub listen_port: Option<u16>,
     }
 
     fn is_wireguard_interface(network_interface: &IpLink) -> bool {
@@ -292,9 +294,9 @@ pub mod wireguard {
 
     /// Returns the status of every interface the fabric configuration defines for the node.
     ///
-    /// Interfaces that do not exist or whose state wg could not read are included as well. If wg
-    /// does not report a public key for an interface, the configured public key and listen port are
-    /// returned instead.
+    /// Interfaces that do not exist or whose state wg could not read are included as well.
+    /// Properties that cannot be determined from the running state are omitted instead of being
+    /// taken from the configuration.
     pub fn parse_wireguard_interfaces(
         wg_dump_output: &str,
         node_section: &NodeSection<WireGuardNode>,
@@ -329,8 +331,8 @@ pub mod wireguard {
                     .then(|| "wireguard".to_string());
 
                 let (public_key, listen_port) = match running_interface {
-                    Some((Some(public_key), listen_port)) => (*public_key, *listen_port),
-                    _ => (*interface.public_key(), interface.listen_port()),
+                    Some((public_key, listen_port)) => (*public_key, Some(*listen_port)),
+                    None => (None, None),
                 };
 
                 InterfaceStatus {
@@ -3573,19 +3575,23 @@ wg0	8ybxvVfiWqpBG160nMgH14acR3z31ZeceW7ita0zonA=	(none)	172.31.1.4:51820	198.51.
                     name: "wg1".to_string(),
                     ty: Some("wireguard".to_string()),
                     state: WireGuardInterfaceState::Down,
-                    public_key: "Um+Z4Ymq3r24txH2itVVtC86ra1PIrFs9AeMebESdWM="
-                        .parse()
-                        .expect("valid public key"),
-                    listen_port: 51821,
+                    public_key: Some(
+                        "Um+Z4Ymq3r24txH2itVVtC86ra1PIrFs9AeMebESdWM="
+                            .parse()
+                            .expect("valid public key"),
+                    ),
+                    listen_port: Some(51821),
                 },
                 InterfaceStatus {
                     name: "wg0".to_string(),
                     ty: Some("wireguard".to_string()),
                     state: WireGuardInterfaceState::Up,
-                    public_key: "AQkUKUJXOxR/QH6fjZLx8GO1ZnnD8PueRYMJNOCzc2M="
-                        .parse()
-                        .expect("valid public key"),
-                    listen_port: 51820,
+                    public_key: Some(
+                        "AQkUKUJXOxR/QH6fjZLx8GO1ZnnD8PueRYMJNOCzc2M="
+                            .parse()
+                            .expect("valid public key"),
+                    ),
+                    listen_port: Some(51820),
                 },
             ];
 
@@ -3598,7 +3604,7 @@ wg0	8ybxvVfiWqpBG160nMgH14acR3z31ZeceW7ita0zonA=	(none)	172.31.1.4:51820	198.51.
 
         #[test]
         fn interface_missing() {
-            // wg1 does not exist on the node, so its values are taken from the configuration
+            // wg1 does not exist on the node, so there is no public key or listen port to report
             let wg_dump = r#"wg0	GDHQ8ivFvwz53U0bSmQ7uTD2bJ8GpcFCCxGeU1G9m2U=	AQkUKUJXOxR/QH6fjZLx8GO1ZnnD8PueRYMJNOCzc2M=	51820	off
 wg0	+PA/xNCZ3G+Wy1DeqF251Us5mcZhBTGc9CT3AaJ89HI=	(none)	172.31.1.2:51820	198.51.100.2/32,203.0.113.0/28	0	0	0	off
 wg0	8ybxvVfiWqpBG160nMgH14acR3z31ZeceW7ita0zonA=	(none)	172.31.1.4:51820	198.51.100.4/32	0	0	0	off"#;
@@ -3617,19 +3623,19 @@ wg0	8ybxvVfiWqpBG160nMgH14acR3z31ZeceW7ita0zonA=	(none)	172.31.1.4:51820	198.51.
                     name: "wg1".to_string(),
                     ty: None,
                     state: WireGuardInterfaceState::Missing,
-                    public_key: "Um+Z4Ymq3r24txH2itVVtC86ra1PIrFs9AeMebESdWM="
-                        .parse()
-                        .expect("valid public key"),
-                    listen_port: 51821,
+                    public_key: None,
+                    listen_port: None,
                 },
                 InterfaceStatus {
                     name: "wg0".to_string(),
                     ty: Some("wireguard".to_string()),
                     state: WireGuardInterfaceState::Up,
-                    public_key: "AQkUKUJXOxR/QH6fjZLx8GO1ZnnD8PueRYMJNOCzc2M="
-                        .parse()
-                        .expect("valid public key"),
-                    listen_port: 51820,
+                    public_key: Some(
+                        "AQkUKUJXOxR/QH6fjZLx8GO1ZnnD8PueRYMJNOCzc2M="
+                            .parse()
+                            .expect("valid public key"),
+                    ),
+                    listen_port: Some(51820),
                 },
             ];
 
@@ -3662,19 +3668,19 @@ wg0	8ybxvVfiWqpBG160nMgH14acR3z31ZeceW7ita0zonA=	(none)	172.31.1.4:51820	198.51.
                     name: "wg1".to_string(),
                     ty: Some("wireguard".to_string()),
                     state: WireGuardInterfaceState::Unknown,
-                    public_key: "Um+Z4Ymq3r24txH2itVVtC86ra1PIrFs9AeMebESdWM="
-                        .parse()
-                        .expect("valid public key"),
-                    listen_port: 51821,
+                    public_key: None,
+                    listen_port: None,
                 },
                 InterfaceStatus {
                     name: "wg0".to_string(),
                     ty: Some("wireguard".to_string()),
                     state: WireGuardInterfaceState::Up,
-                    public_key: "AQkUKUJXOxR/QH6fjZLx8GO1ZnnD8PueRYMJNOCzc2M="
-                        .parse()
-                        .expect("valid public key"),
-                    listen_port: 51820,
+                    public_key: Some(
+                        "AQkUKUJXOxR/QH6fjZLx8GO1ZnnD8PueRYMJNOCzc2M="
+                            .parse()
+                            .expect("valid public key"),
+                    ),
+                    listen_port: Some(51820),
                 },
             ];
 
@@ -3687,10 +3693,10 @@ wg0	8ybxvVfiWqpBG160nMgH14acR3z31ZeceW7ita0zonA=	(none)	172.31.1.4:51820	198.51.
 
         #[test]
         fn interface_without_private_key() {
-            // wg0 has no private key, so its public key and listen port are taken from the configuration
+            // wg0 has no private key, so wg reports no public key
             let wg_dump = r#"wg1	wF2D1my5Cj962/MOS2UXLvCddm3ozmCSSuBQ1Ey6v3I=	Um+Z4Ymq3r24txH2itVVtC86ra1PIrFs9AeMebESdWM=	51821	off
 wg1	aHnKVQ4yTtTdfwsk+r4Z12FrRlUnXXksjRcV7x41+G0=	(none)	172.31.1.10:51820	(none)	0	0	0	off
-wg0	(none)	(none)	0	off
+wg0	(none)	(none)	51820	off
 wg0	+PA/xNCZ3G+Wy1DeqF251Us5mcZhBTGc9CT3AaJ89HI=	(none)	172.31.1.2:51820	198.51.100.2/32,203.0.113.0/28	0	0	0	off
 wg0	8ybxvVfiWqpBG160nMgH14acR3z31ZeceW7ita0zonA=	(none)	172.31.1.4:51820	198.51.100.4/32	0	0	0	off"#;
 
@@ -3709,19 +3715,19 @@ wg0	8ybxvVfiWqpBG160nMgH14acR3z31ZeceW7ita0zonA=	(none)	172.31.1.4:51820	198.51.
                     name: "wg1".to_string(),
                     ty: Some("wireguard".to_string()),
                     state: WireGuardInterfaceState::Up,
-                    public_key: "Um+Z4Ymq3r24txH2itVVtC86ra1PIrFs9AeMebESdWM="
-                        .parse()
-                        .expect("valid public key"),
-                    listen_port: 51821,
+                    public_key: Some(
+                        "Um+Z4Ymq3r24txH2itVVtC86ra1PIrFs9AeMebESdWM="
+                            .parse()
+                            .expect("valid public key"),
+                    ),
+                    listen_port: Some(51821),
                 },
                 InterfaceStatus {
                     name: "wg0".to_string(),
                     ty: Some("wireguard".to_string()),
                     state: WireGuardInterfaceState::Up,
-                    public_key: "AQkUKUJXOxR/QH6fjZLx8GO1ZnnD8PueRYMJNOCzc2M="
-                        .parse()
-                        .expect("valid public key"),
-                    listen_port: 51820,
+                    public_key: None,
+                    listen_port: Some(51820),
                 },
             ];
 
@@ -3734,12 +3740,9 @@ wg0	8ybxvVfiWqpBG160nMgH14acR3z31ZeceW7ita0zonA=	(none)	172.31.1.4:51820	198.51.
 
         #[test]
         fn interface_not_wireguard() {
-            // wg0 exists, but is not a WireGuard interface
+            // wg0 exists, but is not a WireGuard interface, so wg does not report it
             let wg_dump = r#"wg1	wF2D1my5Cj962/MOS2UXLvCddm3ozmCSSuBQ1Ey6v3I=	Um+Z4Ymq3r24txH2itVVtC86ra1PIrFs9AeMebESdWM=	51821	off
-wg1	aHnKVQ4yTtTdfwsk+r4Z12FrRlUnXXksjRcV7x41+G0=	(none)	172.31.1.10:51820	(none)	0	0	0	off
-wg0	GDHQ8ivFvwz53U0bSmQ7uTD2bJ8GpcFCCxGeU1G9m2U=	AQkUKUJXOxR/QH6fjZLx8GO1ZnnD8PueRYMJNOCzc2M=	51820	off
-wg0	+PA/xNCZ3G+Wy1DeqF251Us5mcZhBTGc9CT3AaJ89HI=	(none)	172.31.1.2:51820	198.51.100.2/32,203.0.113.0/28	0	0	0	off
-wg0	8ybxvVfiWqpBG160nMgH14acR3z31ZeceW7ita0zonA=	(none)	172.31.1.4:51820	198.51.100.4/32	0	0	0	off"#;
+wg1	aHnKVQ4yTtTdfwsk+r4Z12FrRlUnXXksjRcV7x41+G0=	(none)	172.31.1.10:51820	(none)	0	0	0	off"#;
 
             let network_interfaces = network_interfaces(
                 r#"[
@@ -3756,19 +3759,19 @@ wg0	8ybxvVfiWqpBG160nMgH14acR3z31ZeceW7ita0zonA=	(none)	172.31.1.4:51820	198.51.
                     name: "wg1".to_string(),
                     ty: Some("wireguard".to_string()),
                     state: WireGuardInterfaceState::Up,
-                    public_key: "Um+Z4Ymq3r24txH2itVVtC86ra1PIrFs9AeMebESdWM="
-                        .parse()
-                        .expect("valid public key"),
-                    listen_port: 51821,
+                    public_key: Some(
+                        "Um+Z4Ymq3r24txH2itVVtC86ra1PIrFs9AeMebESdWM="
+                            .parse()
+                            .expect("valid public key"),
+                    ),
+                    listen_port: Some(51821),
                 },
                 InterfaceStatus {
                     name: "wg0".to_string(),
                     ty: None,
                     state: WireGuardInterfaceState::Error,
-                    public_key: "AQkUKUJXOxR/QH6fjZLx8GO1ZnnD8PueRYMJNOCzc2M="
-                        .parse()
-                        .expect("valid public key"),
-                    listen_port: 51820,
+                    public_key: None,
+                    listen_port: None,
                 },
             ];
 
@@ -3800,19 +3803,19 @@ wg1	aHnKVQ4yTtTdfwsk+r4Z12FrRlUnXXksjRcV7x41+G0=	(none)	172.31.1.10:51820	(none)
                     name: "wg1".to_string(),
                     ty: Some("wireguard".to_string()),
                     state: WireGuardInterfaceState::Up,
-                    public_key: "Um+Z4Ymq3r24txH2itVVtC86ra1PIrFs9AeMebESdWM="
-                        .parse()
-                        .expect("valid public key"),
-                    listen_port: 51821,
+                    public_key: Some(
+                        "Um+Z4Ymq3r24txH2itVVtC86ra1PIrFs9AeMebESdWM="
+                            .parse()
+                            .expect("valid public key"),
+                    ),
+                    listen_port: Some(51821),
                 },
                 InterfaceStatus {
                     name: "wg0".to_string(),
                     ty: None,
                     state: WireGuardInterfaceState::Error,
-                    public_key: "AQkUKUJXOxR/QH6fjZLx8GO1ZnnD8PueRYMJNOCzc2M="
-                        .parse()
-                        .expect("valid public key"),
-                    listen_port: 51820,
+                    public_key: None,
+                    listen_port: None,
                 },
             ];
 
-- 
2.47.3





^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH pve-network 04/10] api: fabric status: document omitted WireGuard interface values
  2026-11-20 16:00 [PATCH docs/manager/network/proxmox-perl-rs 00/10] WireGuard fabric follow-ups Stefan Hanreich
                   ` (2 preceding siblings ...)
  2026-11-20 16:00 ` [PATCH proxmox-perl-rs 03/10] pve-rs: sdn: status: wireguard: only report running interface keys and ports Stefan Hanreich
@ 2026-11-20 16:00 ` Stefan Hanreich
  2026-11-20 16:00 ` [PATCH pve-manager 05/10] ui: sdn: fabrics: wireguard: block saving invalid " Stefan Hanreich
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Stefan Hanreich @ 2026-11-20 16:00 UTC (permalink / raw)
  To: pve-devel

The interface status of WireGuard fabrics omits the public key and
listen port if WireGuard does not report them, instead of falling back
to the configured values. It also omits the type if the interface is
missing or is not a WireGuard interface, instead of reporting the kind
of an arbitrary interface on the node, so mark it as optional.

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
 src/PVE/API2/Network/SDN/Nodes/Fabric.pm | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/PVE/API2/Network/SDN/Nodes/Fabric.pm b/src/PVE/API2/Network/SDN/Nodes/Fabric.pm
index d5c97ba..f588b41 100644
--- a/src/PVE/API2/Network/SDN/Nodes/Fabric.pm
+++ b/src/PVE/API2/Network/SDN/Nodes/Fabric.pm
@@ -232,21 +232,26 @@ __PACKAGE__->register_method({
                 },
                 type => {
                     description =>
-                        "The type of this interface in the fabric (e.g. Point-to-Point, Broadcast, ..).",
+                        "The type of this interface in the fabric (e.g. Point-to-Point, Broadcast, ..)."
+                        . " Omitted for WireGuard if the interface is missing or is not a WireGuard"
+                        . " interface.",
                     type => 'string',
+                    optional => 1,
                 },
                 state => {
                     description => "The current state of the interface.",
                     type => 'string',
                 },
                 'public-key' => {
-                    description => "The public key of the interface (WireGuard only).",
+                    description => "The public key of the interface, omitted if WireGuard does"
+                        . " not report one (WireGuard only).",
                     format_description => 'Base64-encoded Curve 25519 public key.',
                     type => 'string',
                     optional => 1,
                 },
                 'listen-port' => {
-                    description => "The listen port of the interface (WireGuard only).",
+                    description => "The listen port of the interface, omitted if WireGuard does"
+                        . " not report the interface (WireGuard only).",
                     type => 'number',
                     optional => 1,
                 },
-- 
2.47.3





^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH pve-manager 05/10] ui: sdn: fabrics: wireguard: block saving invalid interface values
  2026-11-20 16:00 [PATCH docs/manager/network/proxmox-perl-rs 00/10] WireGuard fabric follow-ups Stefan Hanreich
                   ` (3 preceding siblings ...)
  2026-11-20 16:00 ` [PATCH pve-network 04/10] api: fabric status: document omitted WireGuard interface values Stefan Hanreich
@ 2026-11-20 16:00 ` Stefan Hanreich
  2026-11-20 16:00 ` [PATCH pve-manager 06/10] ui: sdn: fabrics: wireguard: show persistent keepalive of neighbors Stefan Hanreich
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Stefan Hanreich @ 2026-11-20 16:00 UTC (permalink / raw)
  To: pve-devel

ExtJS fields only publish valid values to their binding, so entering
an out-of-range MTU or listen port left the previous value in the
interface record. Since the interface panel never reported itself as
invalid, the edit window allowed saving and submitted that previous
value.

Publish invalid values to the interface record as well and validate
all interfaces in the panel, so saving stays blocked while any
interface has an invalid value, even after selecting another one.

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
 .../sdn/fabrics/wireguard/InterfacePanel.js   | 50 +++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/www/manager6/sdn/fabrics/wireguard/InterfacePanel.js b/www/manager6/sdn/fabrics/wireguard/InterfacePanel.js
index 1a90c09d..8c5def67 100644
--- a/www/manager6/sdn/fabrics/wireguard/InterfacePanel.js
+++ b/www/manager6/sdn/fabrics/wireguard/InterfacePanel.js
@@ -353,6 +353,13 @@ Ext.define('PVE.sdn.Fabric.WireGuard.InterfacePanel', {
                     minValue: 1,
                     maxValue: 65535,
                     isFormField: false,
+                    // publish invalid values too, so the interface does not silently keep its
+                    // previous value; the panel validates the interfaces instead
+                    publishValue: function () {
+                        if (this.rendered) {
+                            this.publishState('value', this.getValue());
+                        }
+                    },
                 },
                 {
                     fieldLabel: gettext('IPv4 Address'),
@@ -375,6 +382,13 @@ Ext.define('PVE.sdn.Fabric.WireGuard.InterfacePanel', {
                     minValue: 1280,
                     maxValue: 65535,
                     isFormField: false,
+                    // publish invalid values too, so the interface does not silently keep its
+                    // previous value; the panel validates the interfaces instead
+                    publishValue: function () {
+                        if (this.rendered) {
+                            this.publishState('value', this.getValue());
+                        }
+                    },
                 },
                 {
                     xtype: 'pveSDNWireGuardPeerSelector',
@@ -393,6 +407,7 @@ Ext.define('PVE.sdn.Fabric.WireGuard.InterfacePanel', {
     ],
 
     previousDirty: false,
+    previousValid: true,
 
     controller: {
         xclass: 'Ext.app.ViewController',
@@ -518,6 +533,35 @@ Ext.define('PVE.sdn.Fabric.WireGuard.InterfacePanel', {
         );
     },
 
+    isInterfaceValid: function (iface) {
+        let { listen_port: listenPort, mtu } = iface.data;
+
+        // values parsed from the configuration are strings, entered values are numbers
+        let isUnsetOrInRange = (value, min, max) => {
+            if (value === null || value === undefined || value === '') {
+                return true;
+            }
+            let number = Number(value);
+            return Number.isInteger(number) && number >= min && number <= max;
+        };
+
+        return isUnsetOrInRange(listenPort, 1, 65535) && isUnsetOrInRange(mtu, 1280, 65535);
+    },
+
+    isValid: function () {
+        let me = this;
+
+        if (me.isDisabled()) {
+            return true;
+        }
+
+        return me
+            .getViewModel()
+            .getStore('interfaces')
+            .getData()
+            .items.every((iface) => me.isInterfaceValid(iface));
+    },
+
     initComponent: function () {
         let me = this;
 
@@ -534,6 +578,12 @@ Ext.define('PVE.sdn.Fabric.WireGuard.InterfacePanel', {
                 me.previousDirty = dirtyStatus;
                 me.fireEvent('dirtychange');
             }
+
+            let validStatus = me.isValid();
+            if (validStatus !== me.previousValid) {
+                me.previousValid = validStatus;
+                me.fireEvent('validitychange', me, validStatus);
+            }
         };
 
         me.lookupReference('peerSelector').on({
-- 
2.47.3





^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH pve-manager 06/10] ui: sdn: fabrics: wireguard: show persistent keepalive of neighbors
  2026-11-20 16:00 [PATCH docs/manager/network/proxmox-perl-rs 00/10] WireGuard fabric follow-ups Stefan Hanreich
                   ` (4 preceding siblings ...)
  2026-11-20 16:00 ` [PATCH pve-manager 05/10] ui: sdn: fabrics: wireguard: block saving invalid " Stefan Hanreich
@ 2026-11-20 16:00 ` Stefan Hanreich
  2026-11-20 16:00 ` [PATCH pve-manager 07/10] ui: sdn: fabrics: wireguard: show '-' for unknown status values Stefan Hanreich
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Stefan Hanreich @ 2026-11-20 16:00 UTC (permalink / raw)
  To: pve-devel

The neighbor status reports a peer as down only if persistent
keepalive is enabled for it, so show the interval that WireGuard
currently uses for each peer. This also makes it visible if the
running interval differs from the configured one, e.g. because
applying the configuration failed.

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
 www/manager6/sdn/FabricsContentView.js | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/www/manager6/sdn/FabricsContentView.js b/www/manager6/sdn/FabricsContentView.js
index bbe4b77e..2c83a0f1 100644
--- a/www/manager6/sdn/FabricsContentView.js
+++ b/www/manager6/sdn/FabricsContentView.js
@@ -88,6 +88,14 @@ Ext.define('PVE.sdn.FabricNeighborsContentView', {
                         return Proxmox.Utils.render_timestamp(value);
                     },
                 },
+                {
+                    // TRANSLATORS: 's' is the SI abbreviation for seconds, the unit of the value
+                    header: gettext('Persistent Keepalive') + ' (s)',
+                    sortable: true,
+                    dataIndex: 'persistent-keepalive',
+                    flex: 0.5,
+                    renderer: (value) => value ?? gettext('off'),
+                },
                 {
                     header: gettext('Bytes transmitted'),
                     sortable: true,
-- 
2.47.3





^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH pve-manager 07/10] ui: sdn: fabrics: wireguard: show '-' for unknown status values
  2026-11-20 16:00 [PATCH docs/manager/network/proxmox-perl-rs 00/10] WireGuard fabric follow-ups Stefan Hanreich
                   ` (5 preceding siblings ...)
  2026-11-20 16:00 ` [PATCH pve-manager 06/10] ui: sdn: fabrics: wireguard: show persistent keepalive of neighbors Stefan Hanreich
@ 2026-11-20 16:00 ` Stefan Hanreich
  2026-11-20 16:00 ` [PATCH pve-manager 08/10] ui: sdn: fabrics: wireguard: add reload button to status grids Stefan Hanreich
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Stefan Hanreich @ 2026-11-20 16:00 UTC (permalink / raw)
  To: pve-devel

The WireGuard status omits values that WireGuard does not report, such
as the public key and listen port of an interface, or the endpoint and
allowed IPs of a neighbor, as well as the name of a neighbor that is
not part of the fabric configuration and the type of an interface that
is missing or is not a WireGuard interface. Show '-' instead of an
empty cell, as for the latest handshake of neighbors.

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
 www/manager6/sdn/FabricsContentView.js | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/www/manager6/sdn/FabricsContentView.js b/www/manager6/sdn/FabricsContentView.js
index 2c83a0f1..d3f8802e 100644
--- a/www/manager6/sdn/FabricsContentView.js
+++ b/www/manager6/sdn/FabricsContentView.js
@@ -39,6 +39,7 @@ Ext.define('PVE.sdn.FabricNeighborsContentView', {
                 sortable: true,
                 dataIndex: 'neighbor',
                 flex: 1,
+                renderer: (value) => value ?? '-',
             },
         ];
 
@@ -48,6 +49,7 @@ Ext.define('PVE.sdn.FabricNeighborsContentView', {
                 sortable: true,
                 dataIndex: 'name',
                 flex: 1,
+                renderer: (value) => value ?? '-',
             });
 
             me.columns = me.columns.concat([
@@ -74,6 +76,7 @@ Ext.define('PVE.sdn.FabricNeighborsContentView', {
                     sortable: true,
                     dataIndex: 'allowed-ips',
                     flex: 1,
+                    renderer: (value) => value ?? '-',
                 },
                 {
                     header: gettext('Latest Handshake'),
@@ -153,6 +156,7 @@ Ext.define('PVE.sdn.FabricInterfacesContentView', {
                 sortable: true,
                 dataIndex: 'type',
                 flex: 1,
+                renderer: (value) => value ?? '-',
             },
             {
                 header: gettext('State'),
@@ -169,12 +173,14 @@ Ext.define('PVE.sdn.FabricInterfacesContentView', {
                     sortable: true,
                     dataIndex: 'public-key',
                     flex: 1,
+                    renderer: (value) => value ?? '-',
                 },
                 {
                     header: gettext('Listen Port'),
                     sortable: true,
                     dataIndex: 'listen-port',
                     flex: 1,
+                    renderer: (value) => value ?? '-',
                 },
             ]);
         }
-- 
2.47.3





^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH pve-manager 08/10] ui: sdn: fabrics: wireguard: add reload button to status grids
  2026-11-20 16:00 [PATCH docs/manager/network/proxmox-perl-rs 00/10] WireGuard fabric follow-ups Stefan Hanreich
                   ` (6 preceding siblings ...)
  2026-11-20 16:00 ` [PATCH pve-manager 07/10] ui: sdn: fabrics: wireguard: show '-' for unknown status values Stefan Hanreich
@ 2026-11-20 16:00 ` Stefan Hanreich
  2026-11-20 16:00 ` [PATCH pve-manager 09/10] ui: sdn: fabrics: wireguard: support resetting the interfaces Stefan Hanreich
  2026-11-20 16:00 ` [PATCH pve-docs 10/10] sdn: fabrics: wireguard: document status values and keepalive column Stefan Hanreich
  9 siblings, 0 replies; 11+ messages in thread
From: Stefan Hanreich @ 2026-11-20 16:00 UTC (permalink / raw)
  To: pve-devel

The neighbors and interfaces grids of WireGuard fabrics only load their
status when the panel is opened, while values such as the latest
handshake, the transferred bytes and the status of the neighbors change
continuously. Add a reload button, so that the current status can be
fetched without reopening the panel.

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
 www/manager6/sdn/FabricsContentView.js | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/www/manager6/sdn/FabricsContentView.js b/www/manager6/sdn/FabricsContentView.js
index d3f8802e..e56b24ea 100644
--- a/www/manager6/sdn/FabricsContentView.js
+++ b/www/manager6/sdn/FabricsContentView.js
@@ -44,6 +44,14 @@ Ext.define('PVE.sdn.FabricNeighborsContentView', {
         ];
 
         if (me.protocol === 'wireguard') {
+            me.tbar = [
+                {
+                    text: gettext('Reload'),
+                    iconCls: 'fa fa-refresh',
+                    handler: () => me.getStore().load(),
+                },
+            ];
+
             me.columns.unshift({
                 header: gettext('Name'),
                 sortable: true,
@@ -167,6 +175,14 @@ Ext.define('PVE.sdn.FabricInterfacesContentView', {
         ];
 
         if (me.protocol === 'wireguard') {
+            me.tbar = [
+                {
+                    text: gettext('Reload'),
+                    iconCls: 'fa fa-refresh',
+                    handler: () => me.getStore().load(),
+                },
+            ];
+
             me.columns = me.columns.concat([
                 {
                     header: gettext('Public Key'),
-- 
2.47.3





^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH pve-manager 09/10] ui: sdn: fabrics: wireguard: support resetting the interfaces
  2026-11-20 16:00 [PATCH docs/manager/network/proxmox-perl-rs 00/10] WireGuard fabric follow-ups Stefan Hanreich
                   ` (7 preceding siblings ...)
  2026-11-20 16:00 ` [PATCH pve-manager 08/10] ui: sdn: fabrics: wireguard: add reload button to status grids Stefan Hanreich
@ 2026-11-20 16:00 ` Stefan Hanreich
  2026-11-20 16:00 ` [PATCH pve-docs 10/10] sdn: fabrics: wireguard: document status values and keepalive column Stefan Hanreich
  9 siblings, 0 replies; 11+ messages in thread
From: Stefan Hanreich @ 2026-11-20 16:00 UTC (permalink / raw)
  To: pve-devel

Resetting the form data of the node edit window had no effect on the
interfaces of a WireGuard node, since the interface panel only used
the default reset of the field mixin, which does not touch the
interface store.

Reload the interfaces of the node, or remove all interfaces when
creating a node, and update the dirty and validity state afterwards,
so that the window updates its buttons. Peers that reference missing
interfaces are only reported when loading the node, not again on
every reset.

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
 .../sdn/fabrics/wireguard/InterfacePanel.js   | 89 ++++++++++++-------
 1 file changed, 59 insertions(+), 30 deletions(-)

diff --git a/www/manager6/sdn/fabrics/wireguard/InterfacePanel.js b/www/manager6/sdn/fabrics/wireguard/InterfacePanel.js
index 8c5def67..7ba53efd 100644
--- a/www/manager6/sdn/fabrics/wireguard/InterfacePanel.js
+++ b/www/manager6/sdn/fabrics/wireguard/InterfacePanel.js
@@ -458,7 +458,8 @@ Ext.define('PVE.sdn.Fabric.WireGuard.InterfacePanel', {
         me.getViewModel().set('availablePeers', availablePeers);
     },
 
-    setNode: async function (node) {
+    // returns the peers that were dropped, since their interface does not exist on the node
+    loadInterfaces: function (node) {
         let me = this;
 
         let ifaces = {};
@@ -485,6 +486,27 @@ Ext.define('PVE.sdn.Fabric.WireGuard.InterfacePanel', {
                 Ext.create('Pve.sdn.Fabric.WireGuard.InterfacePeer', peer),
             );
         }
+
+        me.getViewModel().set('currentNode', node);
+
+        me.isLoading = true;
+        try {
+            me.getViewModel().getStore('interfaces').setData(Object.values(ifaces));
+        } finally {
+            me.isLoading = false;
+        }
+
+        me.selectFirstInterface();
+
+        return droppedPeers;
+    },
+
+    setNode: async function (node) {
+        let me = this;
+
+        me.loadedNode = node;
+
+        let droppedPeers = me.loadInterfaces(node);
         if (droppedPeers.length > 0) {
             console.warn(
                 `WireGuard: dropping ${droppedPeers.length} peer(s) referencing missing interfaces:`,
@@ -501,17 +523,20 @@ Ext.define('PVE.sdn.Fabric.WireGuard.InterfacePanel', {
             );
         }
 
-        me.getViewModel().set('currentNode', node);
+        me.previousDirty = false;
+    },
 
-        me.isLoading = true;
-        try {
-            me.getViewModel().getStore('interfaces').setData(Object.values(ifaces));
-        } finally {
-            me.isLoading = false;
+    reset: function () {
+        let me = this;
+
+        if (me.loadedNode) {
+            // the dropped peers were already reported when loading the node
+            me.loadInterfaces(me.loadedNode);
+        } else {
+            me.getViewModel().getStore('interfaces').removeAll();
         }
-        me.previousDirty = false;
 
-        me.selectFirstInterface();
+        me.refreshState();
     },
 
     isDirty: function () {
@@ -562,6 +587,25 @@ Ext.define('PVE.sdn.Fabric.WireGuard.InterfacePanel', {
             .items.every((iface) => me.isInterfaceValid(iface));
     },
 
+    refreshState: function () {
+        let me = this;
+
+        if (me.isLoading) {
+            return;
+        }
+        let dirtyStatus = me.isDirty();
+        if (dirtyStatus !== me.previousDirty) {
+            me.previousDirty = dirtyStatus;
+            me.fireEvent('dirtychange');
+        }
+
+        let validStatus = me.isValid();
+        if (validStatus !== me.previousValid) {
+            me.previousValid = validStatus;
+            me.fireEvent('validitychange', me, validStatus);
+        }
+    },
+
     initComponent: function () {
         let me = this;
 
@@ -569,31 +613,16 @@ Ext.define('PVE.sdn.Fabric.WireGuard.InterfacePanel', {
 
         let store = me.getViewModel().getStore('interfaces');
 
-        let refreshDirty = () => {
-            if (me.isLoading) {
-                return;
-            }
-            let dirtyStatus = me.isDirty();
-            if (dirtyStatus !== me.previousDirty) {
-                me.previousDirty = dirtyStatus;
-                me.fireEvent('dirtychange');
-            }
-
-            let validStatus = me.isValid();
-            if (validStatus !== me.previousValid) {
-                me.previousValid = validStatus;
-                me.fireEvent('validitychange', me, validStatus);
-            }
-        };
+        let refreshState = () => me.refreshState();
 
         me.lookupReference('peerSelector').on({
-            datachanged: refreshDirty,
-            update: refreshDirty,
+            datachanged: refreshState,
+            update: refreshState,
         });
         store.on({
-            add: refreshDirty,
-            remove: refreshDirty,
-            update: refreshDirty,
+            add: refreshState,
+            remove: refreshState,
+            update: refreshState,
         });
     },
 
-- 
2.47.3





^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH pve-docs 10/10] sdn: fabrics: wireguard: document status values and keepalive column
  2026-11-20 16:00 [PATCH docs/manager/network/proxmox-perl-rs 00/10] WireGuard fabric follow-ups Stefan Hanreich
                   ` (8 preceding siblings ...)
  2026-11-20 16:00 ` [PATCH pve-manager 09/10] ui: sdn: fabrics: wireguard: support resetting the interfaces Stefan Hanreich
@ 2026-11-20 16:00 ` Stefan Hanreich
  9 siblings, 0 replies; 11+ messages in thread
From: Stefan Hanreich @ 2026-11-20 16:00 UTC (permalink / raw)
  To: pve-devel

The interface status no longer falls back to the configured public key
and listen port, and only reports the type 'wireguard' if the interface
on the node actually is a WireGuard interface. Status values that
WireGuard does not report are shown as '-'.

Also document the new persistent keepalive column of the neighbors,
which shows the interval that WireGuard currently uses.

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
 pvesdn.adoc | 24 +++++++++++++++---------
 1 file changed, 15 insertions(+), 9 deletions(-)

diff --git a/pvesdn.adoc b/pvesdn.adoc
index 0d7eea7..4ebf43a 100644
--- a/pvesdn.adoc
+++ b/pvesdn.adoc
@@ -1158,7 +1158,8 @@ with the following properties:
 
 Name:: The name of the network interface on the host.
 
-Type:: Interfaces are always of type 'wireguard'.
+Type:: 'wireguard' if the interface on the node is a WireGuard interface,
+shown as '-' otherwise.
 
 State:: The state of the interface on the node:
 +
@@ -1168,14 +1169,13 @@ State:: The state of the interface on the node:
   applying the configuration failed on the node.
 * 'unknown': The interface exists, but its WireGuard state could not be read.
 * 'error': The interface exists, but is not a WireGuard interface.
-+
-If WireGuard does not report a public key for an interface, the configured
-public key and listen port are shown.
 
 Public Key:: The public key that can be used for communicating with the
-WireGuard instance on this interface.
+WireGuard instance on this interface. Shown as '-' if WireGuard does not report
+one, for example because the interface has no private key.
 
 Listen Port:: The port that can be used to reach this WireGuard instance.
+Shown as '-' if WireGuard does not report the interface.
 
 .Neighbors
 
@@ -1183,13 +1183,14 @@ Lists the peers that WireGuard reports for the interfaces of the node, with the
 following properties:
 
 Name:: The name of the peer in the fabric configuration. For a node of the
-cluster, its interface follows in parentheses. A peer without a name has a
-public key that is not configured for this interface.
+cluster, its interface follows in parentheses. A peer without a name, shown
+as '-', has a public key that is not configured for this interface.
 
 Neighbor:: The endpoint that is currently used to reach this peer (e.g.
 192.0.2.1:51820). WireGuard updates the endpoint to the address it last
 received traffic from, so this can differ from the configured endpoint, for
-example if the peer is behind NAT. Empty if the endpoint is not known yet.
+example if the peer is behind NAT. Shown as '-' if the endpoint is not known
+yet.
 
 Interface:: The interface that has this neighbor configured.
 
@@ -1207,11 +1208,16 @@ Public Key:: The public key of the neighbor.
 
 Allowed IPs:: A comma-separated list of CIDRs. On this interface, traffic to a
 destination is sent to the neighbor with the most specific matching prefix, and
-traffic from a source address is only accepted from that neighbor.
+traffic from a source address is only accepted from that neighbor. Shown as
+'-' if no allowed IPs are configured for the neighbor.
 
 Latest Handshake:: The time of the latest handshake with this neighbor. A dash
 means that there was no handshake yet.
 
+Persistent Keepalive (s):: The persistent keepalive interval that WireGuard
+currently uses for this neighbor, or 'off' if it is disabled. This can differ
+from the configured interval, for example if applying the configuration failed.
+
 Bytes transmitted:: The amount of traffic that has been sent to this neighbor.
 
 Bytes received:: The amount of traffic that has been received from this
-- 
2.47.3





^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2026-11-20 16:02 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-20 16:00 [PATCH docs/manager/network/proxmox-perl-rs 00/10] WireGuard fabric follow-ups Stefan Hanreich
2026-11-20 16:00 ` [PATCH proxmox-perl-rs 01/10] pve-rs: sdn: fabrics: wireguard: return empty status for non-member nodes Stefan Hanreich
2026-11-20 16:00 ` [PATCH proxmox-perl-rs 02/10] pve-rs: sdn: status: wireguard: only report type of WireGuard interfaces Stefan Hanreich
2026-11-20 16:00 ` [PATCH proxmox-perl-rs 03/10] pve-rs: sdn: status: wireguard: only report running interface keys and ports Stefan Hanreich
2026-11-20 16:00 ` [PATCH pve-network 04/10] api: fabric status: document omitted WireGuard interface values Stefan Hanreich
2026-11-20 16:00 ` [PATCH pve-manager 05/10] ui: sdn: fabrics: wireguard: block saving invalid " Stefan Hanreich
2026-11-20 16:00 ` [PATCH pve-manager 06/10] ui: sdn: fabrics: wireguard: show persistent keepalive of neighbors Stefan Hanreich
2026-11-20 16:00 ` [PATCH pve-manager 07/10] ui: sdn: fabrics: wireguard: show '-' for unknown status values Stefan Hanreich
2026-11-20 16:00 ` [PATCH pve-manager 08/10] ui: sdn: fabrics: wireguard: add reload button to status grids Stefan Hanreich
2026-11-20 16:00 ` [PATCH pve-manager 09/10] ui: sdn: fabrics: wireguard: support resetting the interfaces Stefan Hanreich
2026-11-20 16:00 ` [PATCH pve-docs 10/10] sdn: fabrics: wireguard: document status values and keepalive column Stefan Hanreich

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