From: Donatas Abraitis Date: Wed, 2 Apr 2025 14:24:09 +0000 (+0300) Subject: bgpd: Treat the peer as not active due to BFD down only if established X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=da4a7b0356fa2f4a711b87ae9e38bc6bc44fb523;p=matthieu%2Ffrr.git bgpd: Treat the peer as not active due to BFD down only if established If we have `neighbor X bfd` and BFD status is DOWN and/or ADMIN_DOWN, and BGP session is not yet established, we never allow the session to establish. Let's fix this regression that was in 10.2. Fixes: 1fb48f5 ("bgpd: Do not start BGP session if BFD profile is in shutdown state") Signed-off-by: Donatas Abraitis --- diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 5ebcebd1d6..8b527943da 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -4789,7 +4789,7 @@ enum bgp_peer_active peer_active(struct peer_connection *connection) return BGP_PEER_CONNECTION_UNSPECIFIED; if (peer->bfd_config) { - if (bfd_session_is_down(peer->bfd_config->session)) + if (peer_established(connection) && bfd_session_is_down(peer->bfd_config->session)) return BGP_PEER_BFD_DOWN; }