mirror of
https://github.com/vyos/vyos-build.git
synced 2025-10-01 20:28:40 +02:00
Merge pull request #1026 from hedrok/T7297-fix-ospf-redistribute-table
T7297: frr: add ospf redistribute table-direct
This commit is contained in:
commit
891f333454
@ -0,0 +1,58 @@
|
||||
From cbc1602bc6be411bebce2fd9cef712622a1b1799 Mon Sep 17 00:00:00 2001
|
||||
From: Rafael Zalamena <rzalamena@opensourcerouting.org>
|
||||
Date: Fri, 15 Dec 2023 14:24:17 -0300
|
||||
Subject: [PATCH] ospfd: support table-direct redistribution
|
||||
|
||||
Add the 'table-direct' option to the redistribute command in OSPF.
|
||||
|
||||
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
|
||||
---
|
||||
ospfd/ospf_vty.c | 11 +++++------
|
||||
1 file changed, 5 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c
|
||||
index ccc46424bc..3594ad5e2c 100644
|
||||
--- a/ospfd/ospf_vty.c
|
||||
+++ b/ospfd/ospf_vty.c
|
||||
@@ -9321,10 +9321,11 @@ DEFUN (no_ospf_redistribute_source,
|
||||
|
||||
DEFUN (ospf_redistribute_instance_source,
|
||||
ospf_redistribute_instance_source_cmd,
|
||||
- "redistribute <ospf|table> (1-65535) [{metric (0-16777214)|metric-type (1-2)|route-map RMAP_NAME}]",
|
||||
+ "redistribute <ospf|table|table-direct> (1-65535) [{metric (0-16777214)|metric-type (1-2)|route-map RMAP_NAME}]",
|
||||
REDIST_STR
|
||||
"Open Shortest Path First\n"
|
||||
"Non-main Kernel Routing Table\n"
|
||||
+ "Non-main Kernel Routing Table - Direct\n"
|
||||
"Instance ID/Table ID\n"
|
||||
"Metric for redistributed routes\n"
|
||||
"OSPF default metric\n"
|
||||
@@ -9397,11 +9398,12 @@ DEFUN (ospf_redistribute_instance_source,
|
||||
|
||||
DEFUN (no_ospf_redistribute_instance_source,
|
||||
no_ospf_redistribute_instance_source_cmd,
|
||||
- "no redistribute <ospf|table> (1-65535) [{metric (0-16777214)|metric-type (1-2)|route-map RMAP_NAME}]",
|
||||
+ "no redistribute <ospf|table|table-direct> (1-65535) [{metric (0-16777214)|metric-type (1-2)|route-map RMAP_NAME}]",
|
||||
NO_STR
|
||||
REDIST_STR
|
||||
"Open Shortest Path First\n"
|
||||
"Non-main Kernel Routing Table\n"
|
||||
+ "Non-main Kernel Routing Table - Direct\n"
|
||||
"Instance ID/Table Id\n"
|
||||
"Metric for redistributed routes\n"
|
||||
"OSPF default metric\n"
|
||||
@@ -9417,10 +9419,7 @@ DEFUN (no_ospf_redistribute_instance_source,
|
||||
struct ospf_redist *red;
|
||||
int source;
|
||||
|
||||
- if (strncmp(argv[idx_ospf_table]->arg, "o", 1) == 0)
|
||||
- source = ZEBRA_ROUTE_OSPF;
|
||||
- else
|
||||
- source = ZEBRA_ROUTE_TABLE;
|
||||
+ source = proto_redistnum(AFI_IP, argv[idx_ospf_table]->text);
|
||||
|
||||
instance = strtoul(argv[idx_number]->arg, NULL, 10);
|
||||
|
||||
--
|
||||
2.50.1
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user