]> git.proxmox.com Git - mirror_frr.git/commit - isisd/isis_spf.c
isisd: fix wrongly disabled flex-algo
authorLouis Scalbert <louis.scalbert@6wind.com>
Wed, 31 May 2023 14:53:58 +0000 (16:53 +0200)
committerLouis Scalbert <louis.scalbert@6wind.com>
Thu, 1 Jun 2023 12:26:39 +0000 (14:26 +0200)
commit9ed86fe07e83f4073b1a97fe4d4367545064ff81
tree46d12726ba58abf54ad3a2d32da76c5753d03c68
parentb24bad5632eae14192fe123963be85b2d2c15a5c
isisd: fix wrongly disabled flex-algo

A configured flex-algo algorithm may remain in disabled state after its
definition is advertised on the area.

It happens sometimes that, in isis_sr_flex_algo_topo1 topotest step 4 or
8, flex-algo 203 is disabled. It depends on the following sequence:

 1. Flex-algo 203 is configured on a remote router to be re-advertised.
 2. A LSP is received on the local router and contains the algo 203
    definition.
 3. The local router re-builds its own LSP with lsp_build().
 4. local router isis_run_spf() recomputes the algo 203 SPF tree.

A 1. 2. 3. 4. sequence results in a working test. The reception of the
remote LSP (2.) does not trigger the built of the local LSP. If for
some reasons, the sequence is 1. 3. 4. 2. 4., isis_run_spf() will not
knows that flex-algo 203 has been re-enabled because
flex_algo_get_state() only returns the state from the local LSP.

Compare in sequence step 4. the flex-algo state from the local LSP with
the actual state. If the state is not the same, request a new local LSP
generation and quits the re-computation of algo SPF tree. The SPF tree
will be recomputed just after the built of the local LSP.

Fixes: 3f55b8c621 ("isisd: fix disabled flex-algo on race condition")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
isisd/isis_spf.c