mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-08 03:28:31 +00:00
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:
parent
0cd00cc506
commit
62c9979094
@ -622,6 +622,7 @@ static void ospf_ext_pref_ism_change(struct ospf_interface *oi, int old_status)
|
|||||||
oi->ifp->name);
|
oi->ifp->name);
|
||||||
|
|
||||||
/* Complete SRDB if the interface belongs to a Prefix */
|
/* Complete SRDB if the interface belongs to a Prefix */
|
||||||
|
if (OspfEXT.enabled)
|
||||||
ospf_sr_update_prefix(oi->ifp, oi->address);
|
ospf_sr_update_prefix(oi->ifp, oi->address);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1780,7 +1780,7 @@ void ospf_opaque_lsa_reoriginate_schedule(void *lsa_type_dependent,
|
|||||||
lsa_type, delay,
|
lsa_type, delay,
|
||||||
GET_OPAQUE_TYPE(ntohl(lsa->data->id.s_addr)));
|
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:
|
out:
|
||||||
return;
|
return;
|
||||||
|
@ -1873,7 +1873,7 @@ DEFUN (sr_node_msd,
|
|||||||
"Maximum number of label that could be stack (1-16)\n")
|
"Maximum number of label that could be stack (1-16)\n")
|
||||||
{
|
{
|
||||||
uint32_t msd;
|
uint32_t msd;
|
||||||
int idx;
|
int idx = 1;
|
||||||
|
|
||||||
if (!ospf_sr_enabled(vty))
|
if (!ospf_sr_enabled(vty))
|
||||||
return CMD_WARNING_CONFIG_FAILED;
|
return CMD_WARNING_CONFIG_FAILED;
|
||||||
|
@ -147,32 +147,12 @@ static int ospf_mpls_te_register(enum inter_as_mode mode)
|
|||||||
return rc;
|
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)
|
void ospf_mpls_te_term(void)
|
||||||
{
|
{
|
||||||
list_delete_and_null(&OspfMplsTE.iflist);
|
list_delete_and_null(&OspfMplsTE.iflist);
|
||||||
|
|
||||||
ospf_delete_opaque_functab(OSPF_OPAQUE_AREA_LSA,
|
|
||||||
OPAQUE_TYPE_TRAFFIC_ENGINEERING_LSA);
|
|
||||||
OspfMplsTE.enabled = false;
|
OspfMplsTE.enabled = false;
|
||||||
|
|
||||||
ospf_mpls_te_unregister();
|
|
||||||
OspfMplsTE.inter_as = Off;
|
OspfMplsTE.inter_as = Off;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@ -2412,9 +2392,6 @@ DEFUN (no_ospf_mpls_te_inter_as,
|
|||||||
ospf_mpls_te_lsa_schedule(lp, FLUSH_THIS_LSA);
|
ospf_mpls_te_lsa_schedule(lp, FLUSH_THIS_LSA);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Deregister the Callbacks for Inter-AS suport */
|
|
||||||
ospf_mpls_te_unregister();
|
|
||||||
|
|
||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user