File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -2107,6 +2107,7 @@ static enum bgp_fsm_state_progress bgp_establish(struct peer *peer)
21072107 enum bgp_fsm_state_progress ret = BGP_FSM_SUCCESS ;
21082108 struct peer * other ;
21092109 int status ;
2110+ struct peer * orig = peer ;
21102111
21112112 other = peer -> doppelganger ;
21122113 hash_release (peer -> bgp -> peerhash , peer );
@@ -2116,6 +2117,17 @@ static enum bgp_fsm_state_progress bgp_establish(struct peer *peer)
21162117 peer = peer_xfer_conn (peer );
21172118 if (!peer ) {
21182119 flog_err (EC_BGP_CONNECT , "%%Neighbor failed in xfer_conn" );
2120+
2121+ /*
2122+ * A failure of peer_xfer_conn but not putting the peers
2123+ * back in the hash ends up with a situation where incoming
2124+ * connections are rejected, as that the peer is not found
2125+ * when a lookup is done
2126+ */
2127+ (void )hash_get (orig -> bgp -> peerhash , orig , hash_alloc_intern );
2128+ if (other )
2129+ (void )hash_get (other -> bgp -> peerhash , other ,
2130+ hash_alloc_intern );
21192131 return BGP_FSM_FAILURE ;
21202132 }
21212133
You can’t perform that action at this time.
0 commit comments