From: Stefan Hanreich <s.hanreich@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH proxmox-ve-rs 1/9] frr: ospf: add redistribute setting
Date: Mon, 4 May 2026 18:31:46 +0200 [thread overview]
Message-ID: <20260504163157.429628-2-s.hanreich@proxmox.com> (raw)
In-Reply-To: <20260504163157.429628-1-s.hanreich@proxmox.com>
Implements redistributing routes from other protocols into the OSPF
fabric. This can be useful when utilizing multiple routing protocol on
the same node, but also if routes in addition to the loopback
interface of the fabric should be distributed via OSPF.
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
proxmox-frr/src/ser/ospf.rs | 36 +++++++++++++++++++++++++++++++++++-
1 file changed, 35 insertions(+), 1 deletion(-)
diff --git a/proxmox-frr/src/ser/ospf.rs b/proxmox-frr/src/ser/ospf.rs
index 8ab9136..c18725e 100644
--- a/proxmox-frr/src/ser/ospf.rs
+++ b/proxmox-frr/src/ser/ospf.rs
@@ -44,6 +44,35 @@ impl Area {
}
}
+#[derive(Clone, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, Serialize, Deserialize)]
+#[serde(rename_all = "lowercase")]
+/// OSPF redistribution source protocols
+pub enum OspfRedistributionSource {
+ /// redistribute BGP routes
+ Bgp,
+ /// redistribute connected routes
+ Connected,
+ /// redistribute IS-IS routes
+ Isis,
+ /// redistribute kernel routes
+ Kernel,
+ /// redistribute Openfabric routes
+ Openfabric,
+ /// redistribute OSPF routes
+ Ospf,
+ /// redistribute static routes
+ Static,
+}
+
+#[derive(Clone, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, Serialize, Deserialize)]
+pub struct OspfRedistribution {
+ pub source: OspfRedistributionSource,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub metric: Option<u32>,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub route_map: Option<String>,
+}
+
/// The OSPF router properties.
///
/// Currently the only property of a OSPF router is the router_id. The router_id is used to
@@ -53,11 +82,16 @@ impl Area {
#[derive(Clone, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, Serialize, Deserialize)]
pub struct OspfRouter {
pub router_id: Ipv4Addr,
+ #[serde(default)]
+ pub redistribute: Vec<OspfRedistribution>,
}
impl OspfRouter {
pub fn new(router_id: Ipv4Addr) -> Self {
- Self { router_id }
+ Self {
+ router_id,
+ redistribute: Vec::new(),
+ }
}
pub fn router_id(&self) -> &Ipv4Addr {
--
2.47.3
next prev parent reply other threads:[~2026-05-04 16:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-04 16:31 [PATCH manager/network/proxmox-ve-rs 0/9] Implement route redistribution for OSPF Stefan Hanreich
2026-05-04 16:31 ` Stefan Hanreich [this message]
2026-05-04 16:31 ` [PATCH proxmox-ve-rs 2/9] frr-templates: render redistribute setting Stefan Hanreich
2026-05-04 16:31 ` [PATCH proxmox-ve-rs 3/9] ve-config: add redistribute setting to ospf section config Stefan Hanreich
2026-05-04 16:31 ` [PATCH proxmox-ve-rs 4/9] ve-config: use constructor instead of instantiating struct Stefan Hanreich
2026-05-04 16:31 ` [PATCH proxmox-ve-rs 5/9] ve-config: ospf: generate redistribute config Stefan Hanreich
2026-05-04 16:31 ` [PATCH pve-network 6/9] fabrics: ospf: add redistribute to api types Stefan Hanreich
2026-05-04 16:31 ` [PATCH pve-manager 7/9] ui: sdn: fabrics: add redistribution grid component Stefan Hanreich
2026-05-04 16:31 ` [PATCH pve-manager 8/9] ui: sdn: fabric edit: allow defining multiple tabs Stefan Hanreich
2026-05-04 16:31 ` [PATCH pve-manager 9/9] ui: sdn: ospf fabric: add redistribution grid to ospf fabric Stefan Hanreich
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=20260504163157.429628-2-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