diff options
author | Louis Scalbert <louis.scalbert@6wind.com> | 2024-07-26 09:28:40 +0200 |
---|---|---|
committer | Louis Scalbert <louis.scalbert@6wind.com> | 2024-07-26 11:27:51 +0200 |
commit | 9c0e668050b2ae77257cdcb780d444edb78c036b (patch) | |
tree | 0a89960fa6d2326b782982728f7f58ffd050a66d /isisd/isis_nb_config.c | |
parent | lib: remove duplicated flex_algos_free prototype (diff) | |
download | frr-9c0e668050b2ae77257cdcb780d444edb78c036b.tar.xz frr-9c0e668050b2ae77257cdcb780d444edb78c036b.zip |
isisd: move flex_algo_delete into flex_algo_destroy
Move flex_algo_delete() content into isis_instance_flex_algo_destroy()
because it is called only once.
Rename _flex_algo_delete to flex_algo_free()
Cosmetic change.
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Diffstat (limited to 'isisd/isis_nb_config.c')
-rw-r--r-- | isisd/isis_nb_config.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/isisd/isis_nb_config.c b/isisd/isis_nb_config.c index 8926b624e..f67b28cd7 100644 --- a/isisd/isis_nb_config.c +++ b/isisd/isis_nb_config.c @@ -2875,6 +2875,8 @@ int isis_instance_flex_algo_create(struct nb_cb_create_args *args) int isis_instance_flex_algo_destroy(struct nb_cb_destroy_args *args) { + struct listnode *node, *nnode; + struct flex_algo *fa; struct isis_area *area; uint32_t algorithm; @@ -2883,7 +2885,11 @@ int isis_instance_flex_algo_destroy(struct nb_cb_destroy_args *args) switch (args->event) { case NB_EV_APPLY: - flex_algo_delete(area->flex_algos, algorithm); + for (ALL_LIST_ELEMENTS(area->flex_algos->flex_algos, node, + nnode, fa)) { + if (fa->algorithm == algorithm) + flex_algo_free(area->flex_algos, fa); + } lsp_regenerate_schedule(area, area->is_type, 0); break; case NB_EV_VALIDATE: |