diff options
author | Philippe Guibert <philippe.guibert@6wind.com> | 2019-04-17 18:25:55 +0200 |
---|---|---|
committer | Philippe Guibert <philippe.guibert@6wind.com> | 2019-04-18 11:48:16 +0200 |
commit | 4c741971a53c4af575d06b618065c22a79c218a4 (patch) | |
tree | d074d143a786a0ee374035021f07080bc58d5ffc /bfdd/ptm_adapter.c | |
parent | bfdd: avoid having bfd config inherited from operation context (diff) | |
download | frr-4c741971a53c4af575d06b618065c22a79c218a4.tar.xz frr-4c741971a53c4af575d06b618065c22a79c218a4.zip |
bfdd: remove operational bfd sessions from remote daemons
when a remote daemon wants to get rid of a session, a request is sent,
but the deletion of the bfd session was not done. The flush is done,
provided that there is not someone else that is using that session.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'bfdd/ptm_adapter.c')
-rw-r--r-- | bfdd/ptm_adapter.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bfdd/ptm_adapter.c b/bfdd/ptm_adapter.c index 8d80b9468..e92500cd8 100644 --- a/bfdd/ptm_adapter.c +++ b/bfdd/ptm_adapter.c @@ -431,6 +431,10 @@ static void bfdd_dest_deregister(struct stream *msg) /* Unregister client peer notification. */ pcn = pcn_lookup(pc, bs); pcn_free(pcn); + if (bs->refcount || + BFD_CHECK_FLAG(bs->flags, BFD_SESS_FLAG_CONFIG)) + return; + ptm_bfd_ses_del(&bpc); } /* |