summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_spf.c
diff options
context:
space:
mode:
authorrgirada <rgirada@vmware.com>2021-02-11 11:05:12 +0100
committerrgirada <rgirada@vmware.com>2021-03-30 07:04:46 +0200
commit3d5b9855779357e51e1b8ab6a9010b1e702f5b2d (patch)
tree69a15f08732b51f3098785f7ec05a1c578927467 /ospfd/ospf_spf.c
parentMerge pull request #8351 from volta-networks/fix_ospf6_abr_examin_summary_che... (diff)
downloadfrr-3d5b9855779357e51e1b8ab6a9010b1e702f5b2d.tar.xz
frr-3d5b9855779357e51e1b8ab6a9010b1e702f5b2d.zip
ospfd: Max multipath config support
Description: OSPF does not have an option to control the maximum multiple equal cost paths to reach a destination/route(ECMP). Currently, it is using the system specific max multiple paths. But Somtimes, It requires to control the multiple paths from ospf. This cli helps to configure the max number multiple paths in ospf. Signed-off-by: Rajesh Girada <rgirada@vmware.com>
Diffstat (limited to 'ospfd/ospf_spf.c')
-rw-r--r--ospfd/ospf_spf.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/ospfd/ospf_spf.c b/ospfd/ospf_spf.c
index 1e0814764..95553dacd 100644
--- a/ospfd/ospf_spf.c
+++ b/ospfd/ospf_spf.c
@@ -1987,3 +1987,27 @@ void ospf_spf_calculate_schedule(struct ospf *ospf, ospf_spf_reason_t reason)
thread_add_timer_msec(master, ospf_spf_calculate_schedule_worker, ospf,
delay, &ospf->t_spf_calc);
}
+
+/* Restart OSPF SPF algorithm*/
+void ospf_restart_spf(struct ospf *ospf)
+{
+ if (IS_DEBUG_OSPF_EVENT)
+ zlog_debug("%s: Restart SPF.", __PRETTY_FUNCTION__);
+
+ /* Handling inter area and intra area routes*/
+ if (ospf->new_table) {
+ ospf_route_delete(ospf, ospf->new_table);
+ ospf_route_table_free(ospf->new_table);
+ ospf->new_table = route_table_init();
+ }
+
+ /* Handling of TYPE-5 lsa(external routes) */
+ if (ospf->old_external_route) {
+ ospf_route_delete(ospf, ospf->old_external_route);
+ ospf_route_table_free(ospf->old_external_route);
+ ospf->old_external_route = route_table_init();
+ }
+
+ /* Trigger SPF */
+ ospf_spf_calculate_schedule(ospf, SPF_FLAG_CONFIG_CHANGE);
+}