summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitrii Turlupov <turlupov@zts.ru>2024-03-13 01:14:11 +0300
committerDmitrii Turlupov <turlupov@zts.ru>2024-03-13 01:15:16 +0300
commit25739271a01f9bc6c80b624963df53e479e39c19 (patch)
tree9cc65acc5fbff3130c78131cd6f95934074879ce
parentdfa27764a2c2d3d1b08bbba9cd9864c23c35574d (diff)
bgpd: fix disable bfd profile for neighbors.
Before this patch after command 'no neighbor <A.B.C.D|X:X::X:X|WORD> bfd profile [BFDPROF]' has always been created bfd-config for neighbor. Signed-off-by: Dmitrii Turlupov <turlupov@zts.ru>
-rw-r--r--bgpd/bgp_bfd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/bgpd/bgp_bfd.c b/bgpd/bgp_bfd.c
index 21864cf1a6..14ff5f2e11 100644
--- a/bgpd/bgp_bfd.c
+++ b/bgpd/bgp_bfd.c
@@ -597,6 +597,9 @@ DEFUN(no_neighbor_bfd_profile, no_neighbor_bfd_profile_cmd,
if (!peer)
return CMD_WARNING_CONFIG_FAILED;
+ if (!peer->bfd_config)
+ return CMD_SUCCESS;
+
if (CHECK_FLAG(peer->sflags, PEER_STATUS_GROUP))
bgp_group_configure_bfd(peer);
else