diff options
| author | Renato Westphal <renato@opensourcerouting.org> | 2021-02-26 13:37:12 -0300 |
|---|---|---|
| committer | Renato Westphal <renato@opensourcerouting.org> | 2021-02-26 15:54:01 -0300 |
| commit | 5dd20c560e76fe02759c275139d64850721197dc (patch) | |
| tree | 8f7f126ec5a020673a0cc24ed03f2bc31b8ed372 /isisd/isis_lfa.c | |
| parent | f691f2ebbdeb77cb6a9daacb62f2f57ec5ce8414 (diff) | |
isisd: remove assert from the TI-LFA repair list computation algorithm
In some cases it's possible that the TI-LFA algorithms will try to
compute a SID repair list more than once for the same backup nexthop
[1]. This of course shouldn't be allowed, as a backup nexthop can't
have multiple label stacks. When that happens, we should just ignore
the new repair list if one is already applied, instead of asserting
and crashing the daemon.
[1] One scenario this can happen is when there's ECMP involving
different P-nodes in the PQ-space intersection.
Reported-by: Fredi Raspall <fredi@voltanet.io>
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'isisd/isis_lfa.c')
| -rw-r--r-- | isisd/isis_lfa.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/isisd/isis_lfa.c b/isisd/isis_lfa.c index 5b3a3827a2..2d1652b207 100644 --- a/isisd/isis_lfa.c +++ b/isisd/isis_lfa.c @@ -541,10 +541,16 @@ static int tilfa_repair_list_apply(struct isis_spftree *spftree, struct isis_spf_adj *sadj = vadj->sadj; struct mpls_label_stack *label_stack; + /* + * Don't try to apply the repair list if one was already applied + * before (can't have ECMP past the P-node). + */ + if (vadj->label_stack) + continue; + if (!isis_vertex_adj_exists(spftree, vertex_pnode, sadj)) continue; - assert(!vadj->label_stack); label_stack = tilfa_compute_label_stack(spftree->lspdb, sadj, repair_list); if (!label_stack) { |
