summaryrefslogtreecommitdiff
path: root/isisd/isis_lfa.c
diff options
context:
space:
mode:
authorFredi Raspall <fredi@voltanet.io>2021-04-23 18:33:43 +0200
committerFredi Raspall <fredi@voltanet.io>2021-05-03 17:27:37 +0200
commitce4eccfa800fccb461ac99ec3b6f12ba190c185d (patch)
treeae1e115b4d221e5f86cc1339328981759fb74c02 /isisd/isis_lfa.c
parentf71e1ff6a98d0e244c7da11d870d14e31b517811 (diff)
isisd: link protection optional fallback in ti-lfa
The current implementation of TI-LFA computes link-protecting repair paths (even when node protection is enabled) to have repair paths to all destinations when no node-protecting repair has been found. This may be desired or not. E.g. the link-protecting paths may use the protected node and be, therefore, useless if the node fails. Also, computing link-protecting repairs incurs extra calculations. With this patch, when node protection is enabled, link protecting repair paths are only computed if "link-fallback" is specified in the configuration, on a per interface and IS-IS level. Signed-off-by: Fredi Raspall <fredi@voltanet.io>
Diffstat (limited to 'isisd/isis_lfa.c')
-rw-r--r--isisd/isis_lfa.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/isisd/isis_lfa.c b/isisd/isis_lfa.c
index b535924e93..e033c28fef 100644
--- a/isisd/isis_lfa.c
+++ b/isisd/isis_lfa.c
@@ -2258,6 +2258,11 @@ static void isis_spf_run_tilfa(struct isis_area *area,
spftree_pc_node = isis_tilfa_compute(area, spftree,
spftree_reverse, resource);
isis_spftree_del(spftree_pc_node);
+
+ /* don't do link protection unless link-fallback is configured
+ */
+ if (!circuit->tilfa_link_fallback[spftree->level - 1])
+ return;
}
/* Compute link protecting repair paths. */