summaryrefslogtreecommitdiffstats
path: root/lib/flex_algo.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #13376 from louis-6wind/fix-flex-algo-mem-leakRuss White2023-05-021-22/+44
|\ | | | | isisd, lib: fix flex-algo memory leak
| * isisd, lib: clarify sizeof on flex-algo memory allocationLouis Scalbert2023-04-271-2/+3
| | | | | | | | | | | | Use the struct instead of the pointer for flex-algo memory allocation. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
| * isisd, lib: fix flex-algo database memory leak at area destructionLouis Scalbert2023-04-271-0/+14
| | | | | | | | | | | | | | | | Free flex-algorithm database memory when an IS-IS area is destroyed. Fixes: 735fb37db1 ("lib: add library for igp flexible-algorithm") Fixes: 7f198e063c ("isisd: add isis flex-algo base interface") Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
| * lib: dispatch flex_algo_delete()Louis Scalbert2023-04-271-8/+14
| | | | | | | | | | | | Dispatch flex_algo_delete() to prepare the next commit. Cosmetic change. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
| * lib: move flex_algo_delete() just after flex_algo_alloc()Louis Scalbert2023-04-271-19/+19
| | | | | | | | | | | | Move flex_algo_delete() just after flex_algo_alloc(). No change on code. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
| * lib: clarify flex-algo mtypeLouis Scalbert2023-04-271-2/+3
| | | | | | | | | | | | | | Clarify flex-algo MTYPE by creating a specific MTYPE definition to the database of flex-algo information. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
* | lib: fix comparaison of flex-algo definitionLouis Scalbert2023-04-281-0/+6
| | | | | | | | | | | | | | Fix comparaison of flex-algo definition by comparing all the definition statements. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
* | isisd: fix disabled flex-algo on race conditionLouis Scalbert2023-04-281-0/+21
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* lib: add library for igp flexible-algorithmHiroki Shirokura2023-04-181-0/+142
Add a library to deal with Flexible Algorithm that will be common to IS-IS and OSPF. The functions enables to deal with: - Affinity-maps - Extended Admin Group (RFC7308) - Flex-Algo structures that contains the flex-algo configurations Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com> Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>