]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: Treat the peer as not active due to BFD down only if established 18562/head
authorDonatas Abraitis <donatas@opensourcerouting.org>
Wed, 2 Apr 2025 14:24:09 +0000 (17:24 +0300)
committerDonatas Abraitis <donatas@opensourcerouting.org>
Wed, 2 Apr 2025 14:24:09 +0000 (17:24 +0300)
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 <donatas@opensourcerouting.org>
bgpd/bgpd.c

index 5ebcebd1d6f53e86d57c67c1a2abdf76e78ff34f..8b527943daae1470957529606a6ec22721a49e51 100644 (file)
@@ -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;
        }