]> git.puffer.fish Git - mirror/frr.git/commitdiff
Revert "bgpd: Add peers back to peer hash when peer_xfer_conn fails" 14324/head
authorDonatas Abraitis <donatas@opensourcerouting.org>
Thu, 31 Aug 2023 14:33:57 +0000 (17:33 +0300)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Thu, 31 Aug 2023 15:02:58 +0000 (15:02 +0000)
peer is NULL, but we pass it to hash_get().

This reverts commit 6f8c927b03c454aa309b84cefccc4faa31e0c03f.

(cherry picked from commit bc81691247228ad14501b86afe63dff0daf96ab6)

bgpd/bgp_fsm.c

index 00aefafb3d993c02f568473599abfe7e20b003fc..09b35bc7e7f92eda53abd7a6805876cc6e56a6e0 100644 (file)
@@ -2116,17 +2116,6 @@ static enum bgp_fsm_state_progress bgp_establish(struct peer *peer)
        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;
        }