public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH proxmox-ve-rs 1/1] fabrics: allow overlapping ip prefixes in fabrics
@ 2026-05-04 16:34 Stefan Hanreich
  0 siblings, 0 replies; only message in thread
From: Stefan Hanreich @ 2026-05-04 16:34 UTC (permalink / raw)
  To: pve-devel

This allows for reusing the same loopback IP across multiple fabrics.
This enables using multiple routing protocols for complex network
topologies (e.g. using OSPF as IGP, but BGP for exchanging routes via
WAN). When re-using an IP, two dummy interfaces with the same /32 are
generated. The kernel does not generate routes for /32 IPs in the
kernel routing table. The main idea is that this simplifies the config
generation logic and makes it deterministic (i.e. the generated config
for a fabric cannot change when adding / removing another fabric).
Additionally, it allows the SDN stack to rely on the fact that each
fabric has a dedicated loopback interface that can be referenced (for
instance when utilizing the update-source directive in FRR).

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
 proxmox-ve-config/src/sdn/fabric/mod.rs | 30 -------------------------
 1 file changed, 30 deletions(-)

diff --git a/proxmox-ve-config/src/sdn/fabric/mod.rs b/proxmox-ve-config/src/sdn/fabric/mod.rs
index a30b346..fc441d6 100644
--- a/proxmox-ve-config/src/sdn/fabric/mod.rs
+++ b/proxmox-ve-config/src/sdn/fabric/mod.rs
@@ -643,36 +643,6 @@ impl Validatable for FabricConfig {
         let mut node_interfaces = HashSet::new();
         let mut ospf_area = HashSet::new();
 
-        // Check for overlapping IP prefixes across fabrics
-        let fabrics: Vec<_> = self.fabrics.values().map(|f| f.fabric()).collect();
-        let cartesian_product = fabrics
-            .iter()
-            .enumerate()
-            .flat_map(|(i, f1)| fabrics.iter().skip(i + 1).map(move |f2| (f1, f2)));
-
-        for (fabric1, fabric2) in cartesian_product {
-            if let (Some(prefix1), Some(prefix2)) = (fabric1.ip_prefix(), fabric2.ip_prefix()) {
-                if prefix1.overlaps(&prefix2) {
-                    return Err(FabricConfigError::OverlappingIp4Prefix(
-                        prefix2.to_string(),
-                        fabric2.id().to_string(),
-                        prefix1.to_string(),
-                        fabric1.id().to_string(),
-                    ));
-                }
-            }
-            if let (Some(prefix1), Some(prefix2)) = (fabric1.ip6_prefix(), fabric2.ip6_prefix()) {
-                if prefix1.overlaps(&prefix2) {
-                    return Err(FabricConfigError::OverlappingIp6Prefix(
-                        prefix2.to_string(),
-                        fabric2.id().to_string(),
-                        prefix1.to_string(),
-                        fabric1.id().to_string(),
-                    ));
-                }
-            }
-        }
-
         // validate that each (node, interface) combination exists only once across all fabrics
         // additionally, for wireguard check the listen ports of the interfaces as well
         for entry in self.fabrics.values() {
-- 
2.47.3





^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-05-04 16:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-04 16:34 [PATCH proxmox-ve-rs 1/1] fabrics: allow overlapping ip prefixes in fabrics 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