summaryrefslogtreecommitdiff
path: root/lib/bfd.c
diff options
context:
space:
mode:
authorGalaxyGorilla <sascha@netdef.org>2020-07-09 17:37:42 +0000
committerGalaxyGorilla <sascha@netdef.org>2020-07-10 12:51:04 +0000
commitbb99eb5df35a0a4516e1e677e2cd85e5a9aa6735 (patch)
tree539d716caf9f1db295193a92220051c97116fb7b /lib/bfd.c
parenta29bea9947dbcefe9f9c1d39865b4a75f318c59c (diff)
isisd: lib: refactor ISIS BFD API
Use `zclient_bfd_command` instead of `bfd_peer_sendmsg`. Signed-off-by: GalaxyGorilla <sascha@netdef.org>
Diffstat (limited to 'lib/bfd.c')
-rw-r--r--lib/bfd.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/bfd.c b/lib/bfd.c
index d2bcb5b8aa..3c298cce9e 100644
--- a/lib/bfd.c
+++ b/lib/bfd.c
@@ -128,6 +128,8 @@ void bfd_set_param(struct bfd_info **bfd_info, uint32_t min_rx, uint32_t min_tx,
/*
* bfd_peer_sendmsg - Format and send a peer register/Unregister
* command to Zebra to be forwarded to BFD
+ *
+ * DEPRECATED: use zclient_bfd_command instead
*/
void bfd_peer_sendmsg(struct zclient *zclient, struct bfd_info *bfd_info,
int family, void *dst_ip, void *src_ip, char *if_name,
@@ -441,6 +443,15 @@ int zclient_bfd_command(struct zclient *zc, struct bfd_session_arg *args)
struct stream *s;
size_t addrlen;
+ /* Individual reg/dereg messages are suppressed during shutdown. */
+ if (CHECK_FLAG(bfd_gbl.flags, BFD_GBL_FLAG_IN_SHUTDOWN)) {
+ if (bfd_debug)
+ zlog_debug(
+ "%s: Suppressing BFD peer reg/dereg messages",
+ __func__);
+ return -1;
+ }
+
/* Check socket. */
if (!zc || zc->sock < 0) {
if (bfd_debug)