summaryrefslogtreecommitdiffstats
path: root/isisd/isis_lfa.c
diff options
context:
space:
mode:
Diffstat (limited to 'isisd/isis_lfa.c')
-rw-r--r--isisd/isis_lfa.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/isisd/isis_lfa.c b/isisd/isis_lfa.c
index 6f21f4c..dc8f0b9 100644
--- a/isisd/isis_lfa.c
+++ b/isisd/isis_lfa.c
@@ -916,9 +916,8 @@ int isis_tilfa_check(struct isis_spftree *spftree_pc,
adj = isis_adj_find(spftree_pc->area, spftree_pc->level,
vertex->N.id);
- if (adj
- && isis_sr_adj_sid_find(adj, spftree_pc->family,
- ISIS_SR_LAN_BACKUP)) {
+ if (adj && isis_sr_adj_sid_find(adj, spftree_pc->family,
+ ISIS_SR_ADJ_BACKUP)) {
if (IS_DEBUG_LFA)
zlog_debug(
"ISIS-LFA: %s %s already covered by node protection",
@@ -2127,9 +2126,16 @@ void isis_lfa_compute(struct isis_area *area, struct isis_circuit *circuit,
}
vadj_primary = listnode_head(vertex->Adj_N);
+ if (!vadj_primary) {
+ if (IS_DEBUG_LFA)
+ zlog_debug(
+ "ISIS-LFA: skipping computing LFAs due to no adjacencies");
+ continue;
+ }
sadj_primary = vadj_primary->sadj;
parent_vertex = listnode_head(vertex->parents);
+ assert(parent_vertex);
prefix_metric = vertex->d_N - parent_vertex->d_N;
/*