]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Recycle bucket ID when bucket is empty
authorIgor Putovny <igor.putovny@nic.cz>
Thu, 12 Dec 2024 13:51:43 +0000 (14:51 +0100)
committerIgor Putovny <igor.putovny@nic.cz>
Fri, 13 Dec 2024 10:35:55 +0000 (11:35 +0100)
proto/aggregator/aggregator.c

index c86793e9afc0cd181b93061df70facedaf94580c..1fe5168d218a637294f6f44fe17b114d02622778 100644 (file)
@@ -1962,6 +1962,7 @@ aggregator_rt_notify(struct proto *P, struct channel *src_ch, net *net, rte *new
   if (old_bucket && (!old_bucket->rte || !old_bucket->count))
   {
     ASSERT_DIE(!old_bucket->rte && !old_bucket->count);
+    hmap_clear(&p->bucket_id_map, old_bucket->id);
     HASH_REMOVE2(p->buckets, AGGR_BUCK, p->p.pool, old_bucket);
   }
 }