Merge pull request #14322 from opensourcerouting/fix/revert_6f8c927b03c454aa309b84cefccc4faa31e0c03f

Revert "bgpd: Add peers back to peer hash when peer_xfer_conn fails"
This commit is contained in:
Donald Sharp 2023-08-31 11:01:10 -04:00 committed by GitHub
commit 030d2f0b8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2146,17 +2146,6 @@ bgp_establish(struct peer_connection *connection)
peer = peer_xfer_conn(peer);
if (!peer) {
flog_err(EC_BGP_CONNECT, "%%Neighbor failed in xfer_conn");
/*
* A failure of peer_xfer_conn but not putting the peers
* back in the hash ends up with a situation where incoming
* connections are rejected, as that the peer is not found
* when a lookup is done
*/
(void)hash_get(peer->bgp->peerhash, peer, hash_alloc_intern);
if (other)
(void)hash_get(other->bgp->peerhash, other,
hash_alloc_intern);
return BGP_FSM_FAILURE;
}