summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ospfd/ospf_opaque.c2
-rw-r--r--ospfd/ospf_te.c12
2 files changed, 14 insertions, 0 deletions
diff --git a/ospfd/ospf_opaque.c b/ospfd/ospf_opaque.c
index eb0c4a949a..3939b5479f 100644
--- a/ospfd/ospf_opaque.c
+++ b/ospfd/ospf_opaque.c
@@ -126,6 +126,8 @@ void ospf_opaque_term(void)
void ospf_opaque_finish(void)
{
+ ospf_mpls_te_finish();
+
ospf_router_info_finish();
ospf_ext_finish();
diff --git a/ospfd/ospf_te.c b/ospfd/ospf_te.c
index e3c554c530..17ff9a1a46 100644
--- a/ospfd/ospf_te.c
+++ b/ospfd/ospf_te.c
@@ -187,6 +187,7 @@ void ospf_mpls_te_finish(void)
// list_delete_all_node(OspfMplsTE.iflist);
OspfMplsTE.enabled = false;
+ ospf_mpls_te_unregister();
OspfMplsTE.inter_as = Off;
}
@@ -2229,6 +2230,17 @@ DEFUN (no_ospf_mpls_te,
if (CHECK_FLAG(lp->flags, LPFLG_LSA_ENGAGED))
ospf_mpls_te_lsa_schedule(lp, FLUSH_THIS_LSA);
+ /*
+ * This resets the OspfMplsTE.inter_as to its initial state.
+ * This is to avoid having an inter-as value different from
+ * Off when mpls-te gets restarted (after being removed)
+ */
+ if (OspfMplsTE.inter_as != Off) {
+ /* Deregister the Callbacks for Inter-AS support */
+ ospf_mpls_te_unregister();
+ OspfMplsTE.inter_as = Off;
+ }
+
return CMD_SUCCESS;
}