From a1a648769234780007d3d1a3a055682965e2e580 Mon Sep 17 00:00:00 2001 From: Kyrylo Yatsenko Date: Fri, 5 Sep 2025 09:51:23 +0300 Subject: [PATCH] T7297: frr: add ospf redistribute table-direct Cherry-pick 84b4b6300585d0747d9794ee2f7c96920ce4a02c as patch 0006-ospfd-support-table-direct-redistribution.patch to support `table-direct` in ospf redistribute --- ...-support-table-direct-redistribution.patch | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 scripts/package-build/frr/patches/frr/0006-ospfd-support-table-direct-redistribution.patch diff --git a/scripts/package-build/frr/patches/frr/0006-ospfd-support-table-direct-redistribution.patch b/scripts/package-build/frr/patches/frr/0006-ospfd-support-table-direct-redistribution.patch new file mode 100644 index 00000000..5bdbe966 --- /dev/null +++ b/scripts/package-build/frr/patches/frr/0006-ospfd-support-table-direct-redistribution.patch @@ -0,0 +1,58 @@ +From cbc1602bc6be411bebce2fd9cef712622a1b1799 Mon Sep 17 00:00:00 2001 +From: Rafael Zalamena +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 +--- + 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 (1-65535) [{metric (0-16777214)|metric-type (1-2)|route-map RMAP_NAME}]", ++ "redistribute (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 (1-65535) [{metric (0-16777214)|metric-type (1-2)|route-map RMAP_NAME}]", ++ "no redistribute (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 +