From: Dmitrii Turlupov Date: Fri, 9 Nov 2018 10:44:42 +0000 (+0300) Subject: ospf: unregister mpls-te inter-as only if mpls-te is enabled X-Git-Tag: frr-7.1-dev~216^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=e790de4101d1d966639e66dfe4770f85ca06dc75;p=matthieu%2Ffrr.git ospf: unregister mpls-te inter-as only if mpls-te is enabled Signed-off-by: Dmitrii Turlupov --- diff --git a/ospfd/ospf_te.c b/ospfd/ospf_te.c index 02698d770a..16347f1c5b 100644 --- a/ospfd/ospf_te.c +++ b/ospfd/ospf_te.c @@ -2398,16 +2398,16 @@ DEFUN (no_ospf_mpls_te_inter_as, zlog_debug("MPLS-TE: Inter-AS support OFF"); if ((OspfMplsTE.enabled) && (OspfMplsTE.inter_as != Off)) { - OspfMplsTE.inter_as = Off; /* Flush all Inter-AS LSA */ for (ALL_LIST_ELEMENTS(OspfMplsTE.iflist, node, nnode, lp)) if (IS_INTER_AS(lp->type) && CHECK_FLAG(lp->flags, LPFLG_LSA_ENGAGED)) ospf_mpls_te_lsa_schedule(lp, FLUSH_THIS_LSA); - } - /* Deregister the Callbacks for Inter-AS support */ - ospf_mpls_te_unregister(); + /* Deregister the Callbacks for Inter-AS support */ + ospf_mpls_te_unregister(); + OspfMplsTE.inter_as = Off; + } return CMD_SUCCESS; }