From 97476e002d7dfb24a4613ac401b8f3192ca68d05 Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Wed, 3 Aug 2022 11:57:29 +0200 Subject: BGP: The bucket/prefix hashes are now a resource to allow for proper cleanup --- proto/bgp/bgp.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'proto/bgp/bgp.c') diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c index 33849b0b..e6d3f125 100644 --- a/proto/bgp/bgp.c +++ b/proto/bgp/bgp.c @@ -787,10 +787,8 @@ bgp_handle_graceful_restart(struct bgp_proto *p) } /* Reset bucket and prefix tables */ - bgp_free_bucket_table(c); - bgp_free_prefix_table(c); - bgp_init_bucket_table(c); - bgp_init_prefix_table(c); + bgp_free_pending_tx(c); + bgp_init_pending_tx(c); c->packets_to_send = 0; } @@ -1800,8 +1798,7 @@ bgp_channel_start(struct channel *C) if (c->cf->export_table) bgp_setup_out_table(c); - bgp_init_bucket_table(c); - bgp_init_prefix_table(c); + bgp_init_pending_tx(c); c->stale_timer = tm_new_init(c->pool, bgp_long_lived_stale_timeout, c, 0, 0); -- cgit v1.2.3