]> git.ipfire.org Git - thirdparty/bird.git/commit
Bugfix
authorIgor Putovny <igor.putovny@nic.cz>
Mon, 19 Aug 2024 13:24:52 +0000 (15:24 +0200)
committerIgor Putovny <igor.putovny@nic.cz>
Fri, 23 Aug 2024 14:26:17 +0000 (16:26 +0200)
commit5673e838a8b9811e0209b64ce5c20ff8c9a659b3
tree89db434727a40764654b7c7ca59e7751f34c8f73
parent6b0793bd522aeed871f19b97c3c2f5f49da76ce3
Bugfix

During implementation of the new mechanism of storing potential buckets it was
found that aggregator allocates more than 4000 buckets despite routes in the
configuration file being grouped to approximately 200 buckets.

Upon closer inspection it became clear that tmp_bucket in aggregator_rt_notify()
was allocated in the linpool when it should have been allocated on stack.
Moreover, tmp_bucket was allocated without additional space for aggr_data.
These data were never copied from tmp_bucket to new_bucket.

This was the source of false negative results of HASH_FIND. Buckets are compared
not only by their hashes, but also lists of aggr_data. Because same_val_list()
was reading beyond allocated memory, buckets were never equal. HASH_FIND
therefore returned NULL, which prompted aggregator to create many more buckets
despite already existing buckets with the same hash.
proto/aggregator/aggregator.c