diff options
author | Francois Dumontet <francois.dumontet@6wind.com> | 2022-04-22 19:37:38 +0200 |
---|---|---|
committer | Francois Dumontet <francois.dumontet@6wind.com> | 2022-04-22 19:37:54 +0200 |
commit | 5e1d4344a7ebc8f7b280b21f10d801f97f3cdd74 (patch) | |
tree | 3fda8ede137d33f471942d109122a493a0ce0953 /isisd/isis_lfa.c | |
parent | Merge pull request #11064 from opensourcerouting/fix/allow_only_euid_0_runnin... (diff) | |
download | frr-5e1d4344a7ebc8f7b280b21f10d801f97f3cdd74.tar.xz frr-5e1d4344a7ebc8f7b280b21f10d801f97f3cdd74.zip |
isisd: ldp cleaning issue on invalid sptree
That commit aim is to fix an invalid isis access to sptree when
lpd is stopping. isisd is running.
lpd and isisd are running. isis is L1 type configured.
isis_ldp_rlfa_handle_client_close function try to clear
uninitialized spftree.
Expected behavior: isisd not crashing and running.
isis_ldp_rlfa_handle_client_close not trying to clear spftree
that are not initializes due tio the configuration.
Fix: test the configured area's type avoiding to deleted
an unconfigured sptree. function isis_rlfa_handle_client_close
will be aligned on spftree_area_del function
Signed-off-by: Francois Dumontet <francois.dumontet@6wind.com>
Diffstat (limited to 'isisd/isis_lfa.c')
-rw-r--r-- | isisd/isis_lfa.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/isisd/isis_lfa.c b/isisd/isis_lfa.c index d515873ec..348381ee7 100644 --- a/isisd/isis_lfa.c +++ b/isisd/isis_lfa.c @@ -1646,6 +1646,11 @@ void isis_ldp_rlfa_handle_client_close(struct zapi_client_close_info *info) level++) { struct isis_spftree *spftree; + if (!(area->is_type & level)) + continue; + if (!area->spftree[tree][level - 1]) + continue; + spftree = area->spftree[tree][level - 1]; isis_rlfa_list_clear(spftree); } |