]> git.proxmox.com Git - mirror_frr.git/commit - lib/flex_algo.h
isisd: fix disabled flex-algo on race condition
authorLouis Scalbert <louis.scalbert@6wind.com>
Fri, 28 Apr 2023 09:20:26 +0000 (11:20 +0200)
committerLouis Scalbert <louis.scalbert@6wind.com>
Fri, 28 Apr 2023 09:53:18 +0000 (11:53 +0200)
commit3f55b8c6210f8794e6b375660b4b0929e3e199a8
tree02b2cb09307376858b3f8bcf53cc5249e4c91e03
parent34a8441fe8bb5777c9c450d2ba0dfc6bd33fd2c9
isisd: fix disabled flex-algo on race condition

A particular flex-algo algorithm may remain in disabled state after
configuring it if its flex-algo definition is being spread in the area.

It happens sometimes that, in isis_sr_flex_algo_topo1 topotest, r3
flex-algo 203 is disabled on test8. It depends on the following
sequence on r3:
 1. a LSP containing the flex-algo 203 definition is received from
    either r1 or r2 (or both).
 2. the local LSP is rebuilt by lsp_build() because of the flex-algo 203
    configuration
 3. isis_run_spf() recomputes the algo 203 SPF tree

A 1. 2. 3. sequence results in a working test whereas 2. 1. 3. is not
working. The second case issue is because of an inconsistent flex-algo
definition state between the following:
 - in lsp_build(), isis_flex_algo_elected_supported_local_fad() returns
   false because no flex-algo definition is known.
 - in isis_run_spf(), isis_flex_algo_elected_supported() returns true
   because a flex-algo definition is found.

Set a flex-algo state lsp_build() depending on flex-algo definition
existence that is used later in isis_run_spf().

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
isisd/isis_lsp.c
isisd/isis_spf.c
lib/flex_algo.c
lib/flex_algo.h