mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-06 14:29:47 +00:00
bfdd: remove profiles when removing bfd node
Fixes #8379. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
This commit is contained in:
parent
d6cfe1b884
commit
e93c3c003d
@ -1941,6 +1941,14 @@ void bfd_sessions_remove_manual(void)
|
||||
hash_iterate(bfd_key_hash, _bfd_session_remove_manual, NULL);
|
||||
}
|
||||
|
||||
void bfd_profiles_remove(void)
|
||||
{
|
||||
struct bfd_profile *bp;
|
||||
|
||||
while ((bp = TAILQ_FIRST(&bplist)) != NULL)
|
||||
bfd_profile_free(bp);
|
||||
}
|
||||
|
||||
/*
|
||||
* Profile related hash functions.
|
||||
*/
|
||||
|
@ -619,6 +619,7 @@ void bfd_session_free(struct bfd_session *bs);
|
||||
const struct bfd_session *bfd_session_next(const struct bfd_session *bs,
|
||||
bool mhop);
|
||||
void bfd_sessions_remove_manual(void);
|
||||
void bfd_profiles_remove(void);
|
||||
|
||||
/**
|
||||
* Set the BFD session echo state.
|
||||
|
@ -246,6 +246,7 @@ int bfdd_bfd_destroy(struct nb_cb_destroy_args *args)
|
||||
|
||||
case NB_EV_APPLY:
|
||||
bfd_sessions_remove_manual();
|
||||
bfd_profiles_remove();
|
||||
break;
|
||||
|
||||
case NB_EV_ABORT:
|
||||
|
Loading…
Reference in New Issue
Block a user