Skip to content

Commit da4a7b0

Browse files
committed
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 <donatas@opensourcerouting.org>
1 parent d10b08e commit da4a7b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bgpd/bgpd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4789,7 +4789,7 @@ enum bgp_peer_active peer_active(struct peer_connection *connection)
47894789
return BGP_PEER_CONNECTION_UNSPECIFIED;
47904790

47914791
if (peer->bfd_config) {
4792-
if (bfd_session_is_down(peer->bfd_config->session))
4792+
if (peer_established(connection) && bfd_session_is_down(peer->bfd_config->session))
47934793
return BGP_PEER_BFD_DOWN;
47944794
}
47954795

0 commit comments

Comments
 (0)