]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: Treat the peer as not active due to BFD down only if established (backport... 18681/head
authorStefan Hanreich <s.hanreich@proxmox.com>
Fri, 18 Apr 2025 08:36:19 +0000 (10:36 +0200)
committerStefan Hanreich <s.hanreich@proxmox.com>
Fri, 18 Apr 2025 09:41:34 +0000 (11:41 +0200)
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: Stefan Hanreich <s.hanreich@proxmox.com>
bgpd/bgpd.c

index c5d902521e19300796668ca86360672b8d3e2d10..888d384b8d9a881aa8b5dcdb3b71075d84c19929 100644 (file)
@@ -4693,7 +4693,7 @@ bool peer_active(struct peer_connection *connection)
                return false;
 
        if (peer->bfd_config) {
-               if (bfd_session_is_down(peer->bfd_config->session))
+               if (peer_established(peer->connection) && bfd_session_is_down(peer->bfd_config->session))
                        return false;
        }