summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Hanreich <s.hanreich@proxmox.com>2025-04-18 10:36:19 +0200
committerStefan Hanreich <s.hanreich@proxmox.com>2025-04-18 11:41:55 +0200
commitab73284535ce24bd2f2c2b73a9841cf075f906b0 (patch)
treeec4c69e978c89ab67afe88857cf5f97d741aff5d
parent646bf178de61158dc06b40d666e5d0d071b47bfb (diff)
bgpd: Treat the peer as not active due to BFD down only if established (backport #18562)
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>
-rw-r--r--bgpd/bgpd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c
index 0601400afd..f6b8abd9cc 100644
--- a/bgpd/bgpd.c
+++ b/bgpd/bgpd.c
@@ -4648,7 +4648,7 @@ bool peer_active(struct peer *peer)
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;
}