summaryrefslogtreecommitdiff
path: root/isisd/isis_lfa.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2020-11-05 10:52:14 -0300
committerRenato Westphal <renato@opensourcerouting.org>2020-11-24 20:15:51 -0300
commit6dfb7f5961d8a502b92718172c2e87dcf5db4046 (patch)
tree197f71b6f2c213d34279a4f0473a47ecdf13a9e2 /isisd/isis_lfa.c
parent2784d2c7d2b9d40509cfd9cb6ac59b9da06fbcfb (diff)
isisd: consult locally configured MSD when computing TI-LFA repair paths
Do not attempt to install a TI-LFA backup nexthop if its number of labels exceeds the locally configured MSD (Maximum Stack Depth). The idea is to prevent forward-plane installation failures before they happen. The MSD check should also allow the "show isis fast-reroute summary" command (not implemented yet) to display the actual protection coverage provided by TI-LFA, which might not be 100% if the MSD isn't big enough. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'isisd/isis_lfa.c')
-rw-r--r--isisd/isis_lfa.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/isisd/isis_lfa.c b/isisd/isis_lfa.c
index f22e4a7085..66572d0a0b 100644
--- a/isisd/isis_lfa.c
+++ b/isisd/isis_lfa.c
@@ -533,6 +533,14 @@ static int tilfa_build_repair_list(struct isis_spftree *spftree_pc,
listnode_add_head(repair_list, &sid_pnode);
/* Apply repair list. */
+ if (listcount(repair_list)
+ > spftree_pc->area->srdb.config.msd) {
+ zlog_warn(
+ "ISIS-TI-LFA: list of repair segments exceeds locally configured MSD (%u > %u)",
+ listcount(repair_list),
+ spftree_pc->area->srdb.config.msd);
+ return -1;
+ }
if (tilfa_repair_list_apply(spftree_pc, vertex_dest, vertex,
repair_list)
!= 0)
@@ -735,7 +743,11 @@ int isis_lfa_check(struct isis_spftree *spftree_pc, struct isis_vertex *vertex)
isis_spf_node_list_clear(&used_pnodes);
list_delete(&repair_list);
if (ret != 0)
- zlog_warn("ISIS-TI-LFA: failed to compute repair path(s)");
+ zlog_warn(
+ "ISIS-TI-LFA: failed to compute repair path(s) of %s %s w.r.t %s",
+ vtype2string(vertex->type), buf,
+ lfa_protected_resource2str(
+ &spftree_pc->lfa.protected_resource));
return ret;
}