]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: peer creation now takes care of the su
authorDonald Sharp <sharpd@nvidia.com>
Tue, 29 Nov 2022 14:00:39 +0000 (09:00 -0500)
committerDonald Sharp <sharpd@nvidia.com>
Mon, 5 Dec 2022 14:11:21 +0000 (09:11 -0500)
At some point in the past the peer creation was not
properly setting the su and the code had the release
and re-add when setting the su.  Since peer_create
got a bit of code to handle the su properly the
need to release then add it back in is negated
so remove the code.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
bgpd/bgp_network.c

index b43f8c8664a257e246987ca8a9034f53fb7ac9d4..fa618232f61e3149b08f2ddcb96841323654774a 100644 (file)
@@ -554,8 +554,6 @@ static void bgp_accept(struct thread *thread)
 
        peer = peer_create(&su, peer1->conf_if, peer1->bgp, peer1->local_as,
                           peer1->as, peer1->as_type, NULL);
-       hash_release(peer->bgp->peerhash, peer);
-       (void)hash_get(peer->bgp->peerhash, peer, hash_alloc_intern);
 
        peer_xfer_config(peer, peer1);
        bgp_peer_gr_flags_update(peer);