summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_bfd.c
diff options
context:
space:
mode:
authorSumitAgarwal123 <sumit.agarwal@broadcom.com>2019-10-21 07:53:01 +0200
committerSumitAgarwal123 <sumit.agarwal@broadcom.com>2019-10-29 05:38:20 +0100
commit7555dc6116a4fc51631b2c26ecb5b63a5c574674 (patch)
tree693a001e27c1ec35343891694d7e514bc6d2a2bf /bgpd/bgp_bfd.c
parentMerge pull request #4966 from Orange-OpenSource/isis-TE (diff)
downloadfrr-7555dc6116a4fc51631b2c26ecb5b63a5c574674.tar.xz
frr-7555dc6116a4fc51631b2c26ecb5b63a5c574674.zip
bfdd: Handling local and remote admin-down
Scenarios where this code change is required: 1. BFD is un-configured from BGP at remote end. Neighbour BFD sends ADMIN_DOWN state, but BFD on local side will send DOWN to BGP, resulting in BGP session DOWN. Removing BFD session administratively shouldn't bring DOWN BGP session at local or remote. 2. BFD is un-configured from BGP or shutdown locally. BFD will send state DOWN to BGP resulting in BGP session DOWN. (This is akin to saying do not use BFD for BGP) Removing BFD session administratively shouldn't bring DOWN BGP session at local or remote. Signed-off-by: Sayed Mohd Saquib sayed.saquib@broadcom.com
Diffstat (limited to 'bgpd/bgp_bfd.c')
-rw-r--r--bgpd/bgp_bfd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bgpd/bgp_bfd.c b/bgpd/bgp_bfd.c
index 57fef8e91..0ed6057ea 100644
--- a/bgpd/bgp_bfd.c
+++ b/bgpd/bgp_bfd.c
@@ -282,7 +282,8 @@ static void bgp_bfd_peer_status_update(struct peer *peer, int status,
return;
old_status = bfd_info->status;
- bfd_info->status = status;
+ BFD_SET_CLIENT_STATUS(bfd_info->status, status);
+
bfd_info->last_update = bgp_clock();
if (status != old_status) {