public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Stefan Hanreich <s.hanreich@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH proxmox-ve-rs 1/1] fabrics: allow overlapping ip prefixes in fabrics
Date: Mon,  4 May 2026 18:34:23 +0200	[thread overview]
Message-ID: <20260504163426.432326-1-s.hanreich@proxmox.com> (raw)

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





                 reply	other threads:[~2026-05-04 16:35 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=20260504163426.432326-1-s.hanreich@proxmox.com \
    --to=s.hanreich@proxmox.com \
    --cc=pve-devel@lists.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