diff options
Diffstat (limited to 'ospfd/ospf_te.c')
-rw-r--r-- | ospfd/ospf_te.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ospfd/ospf_te.c b/ospfd/ospf_te.c index e3c554c53..17ff9a1a4 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; } |