]> git.puffer.fish Git - matthieu/frr.git/commitdiff
Revert "bgpd: Add peers back to peer hash when peer_xfer_conn fails"
authorDonatas Abraitis <donatas@opensourcerouting.org>
Thu, 31 Aug 2023 14:33:57 +0000 (17:33 +0300)
committerDonatas Abraitis <donatas@opensourcerouting.org>
Thu, 31 Aug 2023 14:33:57 +0000 (17:33 +0300)
peer is NULL, but we pass it to hash_get().

This reverts commit 6f8c927b03c454aa309b84cefccc4faa31e0c03f.

bgpd/bgp_fsm.c

index df137b8d54d8abe1f8d4c2c7752dff804aeba9bd..b0d2a8fe0e08dd70fa8550cbae7daabda71d54b6 100644 (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;
        }