]> git.proxmox.com Git - mirror_frr.git/commitdiff
bfdd: remove operational bfd sessions from remote daemons
authorPhilippe Guibert <philippe.guibert@6wind.com>
Wed, 17 Apr 2019 16:25:55 +0000 (18:25 +0200)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Thu, 18 Apr 2019 09:48:16 +0000 (11:48 +0200)
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>
bfdd/ptm_adapter.c

index 8d80b9468db5374af1dbdeda8af84b00b05f9ff2..e92500cd80990722b60620f4068b95dbaa0d8e2a 100644 (file)
@@ -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);
 }
 
 /*