mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-09 18:26:10 +00:00
Merge pull request #14301 from donaldsharp/bgp_lost_hash
bgpd: Add peers back to peer hash when peer_xfer_conn fails
This commit is contained in:
commit
885146ea9c
@ -2146,6 +2146,17 @@ bgp_establish(struct peer_connection *connection)
|
|||||||
peer = peer_xfer_conn(peer);
|
peer = peer_xfer_conn(peer);
|
||||||
if (!peer) {
|
if (!peer) {
|
||||||
flog_err(EC_BGP_CONNECT, "%%Neighbor failed in xfer_conn");
|
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;
|
return BGP_FSM_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user