diff options
author | Louis Scalbert <louis.scalbert@6wind.com> | 2022-04-06 18:40:32 +0200 |
---|---|---|
committer | Louis Scalbert <louis.scalbert@6wind.com> | 2022-10-24 11:50:13 +0200 |
commit | 8a65b22dacd48db772bd425c0d26c60184a8ee93 (patch) | |
tree | 1ed1c334873ac15e1a055ac4f6d5eec0e5f945f5 /isisd | |
parent | isisd: apply fast-reroute on an adjacency failure (diff) | |
download | frr-8a65b22dacd48db772bd425c0d26c60184a8ee93.tar.xz frr-8a65b22dacd48db772bd425c0d26c60184a8ee93.zip |
isisd: remove previous labels before fast-reroute
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Diffstat (limited to 'isisd')
-rw-r--r-- | isisd/isis_route.c | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/isisd/isis_route.c b/isisd/isis_route.c index b04e8e455..a91ce7eea 100644 --- a/isisd/isis_route.c +++ b/isisd/isis_route.c @@ -459,6 +459,21 @@ void isis_route_delete(struct isis_area *area, struct route_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, struct prefix_ipv6 *src_p, 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)) return; - /* - * 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); + isis_route_remove_previous_sid(area, prefix, route_info); /* Install route. */ 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); /* Switchover route. */ + isis_route_remove_previous_sid(area, prefix, rinfo); UNSET_FLAG(rinfo->flag, ISIS_ROUTE_FLAG_ZEBRA_SYNCED); isis_route_update(area, prefix, src_p, rinfo->backup); |