mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 13:33:15 +00:00
isisd: remove previous labels before fast-reroute
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
This commit is contained in:
parent
7125297323
commit
a254fa54e3
@ -459,6 +459,21 @@ void isis_route_delete(struct isis_area *area, struct route_node *rode,
|
|||||||
route_unlock_node(rode);
|
route_unlock_node(rode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void isis_route_remove_previous_sid(struct isis_area *area,
|
||||||
|
struct prefix *prefix,
|
||||||
|
struct isis_route_info *route_info)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* Explicitly uninstall previous Prefix-SID label if it has
|
||||||
|
* changed or was removed.
|
||||||
|
*/
|
||||||
|
if (route_info->sr_previous.present &&
|
||||||
|
(!route_info->sr.present ||
|
||||||
|
route_info->sr_previous.label != route_info->sr.label))
|
||||||
|
isis_zebra_prefix_sid_uninstall(area, prefix, route_info,
|
||||||
|
&route_info->sr_previous);
|
||||||
|
}
|
||||||
|
|
||||||
static void isis_route_update(struct isis_area *area, struct prefix *prefix,
|
static void isis_route_update(struct isis_area *area, struct prefix *prefix,
|
||||||
struct prefix_ipv6 *src_p,
|
struct prefix_ipv6 *src_p,
|
||||||
struct isis_route_info *route_info)
|
struct isis_route_info *route_info)
|
||||||
@ -467,17 +482,7 @@ static void isis_route_update(struct isis_area *area, struct prefix *prefix,
|
|||||||
if (CHECK_FLAG(route_info->flag, ISIS_ROUTE_FLAG_ZEBRA_SYNCED))
|
if (CHECK_FLAG(route_info->flag, ISIS_ROUTE_FLAG_ZEBRA_SYNCED))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/*
|
isis_route_remove_previous_sid(area, prefix, route_info);
|
||||||
* Explicitly uninstall previous Prefix-SID label if it has
|
|
||||||
* changed or was removed.
|
|
||||||
*/
|
|
||||||
if (route_info->sr_previous.present
|
|
||||||
&& (!route_info->sr.present
|
|
||||||
|| route_info->sr_previous.label
|
|
||||||
!= route_info->sr.label))
|
|
||||||
isis_zebra_prefix_sid_uninstall(
|
|
||||||
area, prefix, route_info,
|
|
||||||
&route_info->sr_previous);
|
|
||||||
|
|
||||||
/* Install route. */
|
/* Install route. */
|
||||||
isis_zebra_route_add_route(area->isis, prefix, src_p,
|
isis_zebra_route_add_route(area->isis, prefix, src_p,
|
||||||
@ -765,6 +770,7 @@ void isis_route_switchover_nexthop(struct isis_area *area,
|
|||||||
(const struct prefix **)&src_p);
|
(const struct prefix **)&src_p);
|
||||||
|
|
||||||
/* Switchover route. */
|
/* Switchover route. */
|
||||||
|
isis_route_remove_previous_sid(area, prefix, rinfo);
|
||||||
UNSET_FLAG(rinfo->flag, ISIS_ROUTE_FLAG_ZEBRA_SYNCED);
|
UNSET_FLAG(rinfo->flag, ISIS_ROUTE_FLAG_ZEBRA_SYNCED);
|
||||||
isis_route_update(area, prefix, src_p, rinfo->backup);
|
isis_route_update(area, prefix, src_p, rinfo->backup);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user