Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
/* Clear peer capability flag. */
peer->cap = 0;
- /* If the peer is passive mode, force to move to Active mode. */
- if (CHECK_FLAG(peer->flags, PEER_FLAG_PASSIVE)) {
- BGP_EVENT_ADD(connection, TCP_connection_open_failed);
- return BGP_FSM_SUCCESS;
- }
-
if (peer->bgp->vrf_id == VRF_UNKNOWN) {
if (bgp_debug_neighbor_events(peer))
flog_err(
return connect_error;
}
+ /* If the peer is passive mode, force to move to Active mode. */
+ if (CHECK_FLAG(peer->flags, PEER_FLAG_PASSIVE)) {
+ BGP_EVENT_ADD(connection, TCP_connection_open_failed);
+ return BGP_FSM_SUCCESS;
+ }
+
if (peer->conf_if || peer->ifname)
ifindex = ifname2ifindex(peer->conf_if ? peer->conf_if
: peer->ifname,