]> git.proxmox.com Git - mirror_frr.git/blobdiff - ospfd/ospf_sr.c
OSPFd: Fix ospfd crash during CI
[mirror_frr.git] / ospfd / ospf_sr.c
index d906a4ce595c910d958b4f15620f2c92264e7338..5586f24f6e062a23ca9c9d955309b2201600262e 100644 (file)
@@ -352,7 +352,6 @@ int ospf_sr_init(void)
  * Segment Routing termination function
  *
  * @param - nothing
- *
  * @return - nothing
  */
 void ospf_sr_term(void)
@@ -369,6 +368,21 @@ void ospf_sr_term(void)
        if (OspfSR.prefix)
                route_table_finish(OspfSR.prefix);
 
+       OspfSR.enabled = false;
+       OspfSR.self = NULL;
+}
+
+/*
+ * Segment Routing finish function
+ *
+ * @param - nothing
+ * @return - nothing
+ */
+void ospf_sr_finish(void)
+{
+       /* Stop Segment Routing */
+       ospf_sr_stop();
+
        OspfSR.enabled = false;
 }