]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: Remove peer->hash as that it is unused
authorDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 17 Jan 2018 19:17:15 +0000 (14:17 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 19 Jan 2018 16:09:23 +0000 (11:09 -0500)
The peer->hash pointer is allocating a bunch of memory
but is never used.  Remove.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
bgpd/bgp_advertise.c
bgpd/bgpd.h

index 91a60b72a09f19b242655bc78c9360be623c998d..60b82bdf2ee28da5d62bd00397c671c0485b8043 100644 (file)
@@ -245,8 +245,6 @@ void bgp_sync_init(struct peer *peer)
                        BGP_ADV_FIFO_INIT(&sync->withdraw);
                        BGP_ADV_FIFO_INIT(&sync->withdraw_low);
                        peer->sync[afi][safi] = sync;
-                       peer->hash[afi][safi] =
-                               hash_create(baa_hash_key, baa_hash_cmp);
                }
 }
 
@@ -261,9 +259,5 @@ void bgp_sync_delete(struct peer *peer)
                                XFREE(MTYPE_BGP_SYNCHRONISE,
                                      peer->sync[afi][safi]);
                        peer->sync[afi][safi] = NULL;
-
-                       if (peer->hash[afi][safi])
-                               hash_free(peer->hash[afi][safi]);
-                       peer->hash[afi][safi] = NULL;
                }
 }
index 2e7e04c2ed74301595461c6ff8670403557736fc..3cf7d89054e31d6f3cec85fb21374d5ed6b3ba6f 100644 (file)
@@ -804,9 +804,6 @@ struct peer {
        /* Send prefix count. */
        unsigned long scount[AFI_MAX][SAFI_MAX];
 
-       /* Announcement attribute hash.  */
-       struct hash *hash[AFI_MAX][SAFI_MAX];
-
        /* Notify data. */
        struct bgp_notify notify;