OSPFd: Clean up Segment Routing patch

- ospfd/ospf_te.c: Remove unregister function and call to
ospf_delete_opaque_functab() following the introduction of
ospf_opaque_term() function in ospfd.c for ospfd termination.
 - ospfd/ospf_sr.c: Set initial index value for node-msd CLI to
avaoid crash when using this command
 - ospfd/ospf_ext.c: Disable call to ospf_sr_update_prefix() if
Segment Routing, thus Extended Link/Prefix, is not enable
 - ospfd/ospf_opaque.c: Correct scheduling of Opaque LSA flooding

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
This commit is contained in:
Olivier Dugeon 2018-01-30 16:17:54 +01:00
parent 0cd00cc506
commit 62c9979094
4 changed files with 4 additions and 26 deletions

View File

@ -622,7 +622,8 @@ static void ospf_ext_pref_ism_change(struct ospf_interface *oi, int old_status)
oi->ifp->name);
/* Complete SRDB if the interface belongs to a Prefix */
ospf_sr_update_prefix(oi->ifp, oi->address);
if (OspfEXT.enabled)
ospf_sr_update_prefix(oi->ifp, oi->address);
}
}

View File

@ -1780,7 +1780,7 @@ void ospf_opaque_lsa_reoriginate_schedule(void *lsa_type_dependent,
lsa_type, delay,
GET_OPAQUE_TYPE(ntohl(lsa->data->id.s_addr)));
OSPF_OPAQUE_TIMER_ON(oipt->t_opaque_lsa_self, func, oipt, delay * 1000);
OSPF_OPAQUE_TIMER_ON(oipt->t_opaque_lsa_self, func, oipt, delay);
out:
return;

View File

@ -1873,7 +1873,7 @@ DEFUN (sr_node_msd,
"Maximum number of label that could be stack (1-16)\n")
{
uint32_t msd;
int idx;
int idx = 1;
if (!ospf_sr_enabled(vty))
return CMD_WARNING_CONFIG_FAILED;

View File

@ -147,32 +147,12 @@ static int ospf_mpls_te_register(enum inter_as_mode mode)
return rc;
}
static int ospf_mpls_te_unregister()
{
u_int8_t scope;
if (OspfMplsTE.inter_as == Off)
return 0;
if (OspfMplsTE.inter_as == AS)
scope = OSPF_OPAQUE_AS_LSA;
else
scope = OSPF_OPAQUE_AREA_LSA;
ospf_delete_opaque_functab(scope, OPAQUE_TYPE_INTER_AS_LSA);
return 0;
}
void ospf_mpls_te_term(void)
{
list_delete_and_null(&OspfMplsTE.iflist);
ospf_delete_opaque_functab(OSPF_OPAQUE_AREA_LSA,
OPAQUE_TYPE_TRAFFIC_ENGINEERING_LSA);
OspfMplsTE.enabled = false;
ospf_mpls_te_unregister();
OspfMplsTE.inter_as = Off;
return;
@ -2412,9 +2392,6 @@ DEFUN (no_ospf_mpls_te_inter_as,
ospf_mpls_te_lsa_schedule(lp, FLUSH_THIS_LSA);
}
/* Deregister the Callbacks for Inter-AS suport */
ospf_mpls_te_unregister();
return CMD_SUCCESS;
}