diff options
author | Maria Matejka <mq@ucw.cz> | 2022-08-03 11:57:29 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2022-08-03 11:57:29 +0200 |
commit | 97476e002d7dfb24a4613ac401b8f3192ca68d05 (patch) | |
tree | b2e05d029ed03f80e18e971384d4086883917a74 /proto/bgp/bgp.c | |
parent | 0072d11f3431165240656edf6ade473554b8747e (diff) |
BGP: The bucket/prefix hashes are now a resource to allow for proper cleanup
Diffstat (limited to 'proto/bgp/bgp.c')
-rw-r--r-- | proto/bgp/bgp.c | 9 |
1 files changed, 3 insertions, 6 deletions
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); |