0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-09-20 20:35:20 +00:00
Commit Graph

4099 Commits

Author SHA1 Message Date
Igor Putovny
79981d2ad2 Bugfix
Due to wrong cast of void pointer, pointers to potential buckets
were compared and eventually sorted in wrong order, thus assigning
wrong buckets to trie nodes.
This caused some trie nodes to stay in trie even though they should
have been removed. Consequently, trie contained superfluos prefixes
after the algorithm finished.

Since pointers were never dereferenced, only compared by their numeric
values in the comparator function, program did not crash (even though
pointers could be NULL because of the incorrect cast to double pointer
and single dereference).
2024-05-30 12:30:00 +02:00
Igor Putovny
22060fe09f Add small changes to test script 2024-05-30 12:30:00 +02:00
Igor Putovny
03d71cb98c Remove unused code 2024-05-30 12:30:00 +02:00
Igor Putovny
24d9004d4d Add script to prepare test case run 2024-05-30 12:30:00 +02:00
Igor Putovny
e40ea2b98e Create default empty route for aggregation 2024-05-30 12:30:00 +02:00
Igor Putovny
f85e3a6ae5 Add more assertions 2024-05-30 12:30:00 +02:00
Igor Putovny
80f2d6e0c5 Make pointer to aggregator bucket const 2024-05-30 12:30:00 +02:00
Igor Putovny
fccb5140e2 Do not discard bucket from internal nodes 2024-05-30 12:30:00 +02:00
Igor Putovny
4a1f4e837d Do not assign bucket of any prefix to the root node 2024-05-30 12:30:00 +02:00
Igor Putovny
299f9e80f7 Create event to run ORTC algorithm exactly once 2024-05-30 12:30:00 +02:00
Igor Putovny
2b6cfd2065 Run ORTC algorithm 2024-05-30 12:30:00 +02:00
Igor Putovny
e68363df0f Add assertions and general code improvements 2024-05-30 12:30:00 +02:00
Igor Putovny
f1d280981e Remove unused code 2024-05-30 12:30:00 +02:00
Maria Matejka
9b34d91233 Autoconf: minor reduction of redundancy
Joined BIRD_CHECK_GCC_OPTION and BIRD_ADD_GCC_OPTION.
2024-05-30 12:30:00 +02:00
Igor Putovny
6923545597 Allow sanitization compiler option 2024-05-30 12:30:00 +02:00
Igor Putovny
5bde9a161a Rename constant 2024-05-30 12:30:00 +02:00
Igor Putovny
2b18dea7c2 Fix how bucket for new leaf nodes is chosen 2024-05-30 12:30:00 +02:00
Igor Putovny
98621a741a Use net_addr_ip4 instead of ip4_addr for printing prefixes 2024-05-30 12:30:00 +02:00
Igor Putovny
6522bc04e4 Remove unused code 2024-05-30 12:30:00 +02:00
Igor Putovny
ef6a526588 Add comments 2024-05-30 12:30:00 +02:00
Igor Putovny
4352095801 Change order of parameters in a few functions 2024-05-30 12:30:00 +02:00
Igor Putovny
dca392e7c6 Simplify delete_trie() function 2024-05-30 12:30:00 +02:00
Igor Putovny
1cf73f74ac Assign bucket of ancestor node to leaf node 2024-05-30 12:30:00 +02:00
Igor Putovny
7213cc08f3 Fix incorrect implementation of the third pass 2024-05-30 12:30:00 +02:00
Igor Putovny
2d2354f54e Assign route bucket only to the last inserted node 2024-05-30 12:30:00 +02:00
Igor Putovny
1712d83c01 Fix argument order in several functions 2024-05-30 12:30:00 +02:00
Igor Putovny
ec1eb83bf0 Add a few comments, print prefixes after aggregation 2024-05-30 12:30:00 +02:00
Igor Putovny
7657d05592 Extend remove_node() with deleting root node 2024-05-30 12:30:00 +02:00
Igor Putovny
26ac6dca5c Fix aggregator_bucket_unionize()
The last two while loops were incorrectly placed inside the first while loop
2024-05-30 12:30:00 +02:00
Igor Putovny
9954b24f57 Fix const warning, add few comments 2024-05-30 12:30:00 +02:00
Igor Putovny
f7161a875f Delete trie during aggregator shutdown 2024-05-30 12:30:00 +02:00
Igor Putovny
6d5e75e46d Refactor and fix aggregator_bucket_unionize() 2024-05-30 12:30:00 +02:00
Igor Putovny
45c7a5463e Fix aggregator_bucket_intersect(), add comments and fix naming 2024-05-30 12:30:00 +02:00
Igor Putovny
d046a0a42f Remove unused code 2024-05-30 12:30:00 +02:00
Igor Putovny
5a933c6fe5 Add new implementation of third_pass() and remove old implementation 2024-05-30 12:30:00 +02:00
Igor Putovny
ca4a1dc9d3 Move trie initialization to aggregator_start() 2024-05-30 12:30:00 +02:00
Igor Putovny
7d93e8b7d3 Fix previous version, aggregator is now stable but untested 2024-05-30 12:30:00 +02:00
Igor Putovny
2d822231d4 Implement basics of prefix aggregation functionality 2024-05-30 12:30:00 +02:00
Maria Matejka
ccc5166280 Aggregator: Fixed hashing of adata 2024-05-30 12:30:00 +02:00
Maria Matejka
a582ee9c6d Aggregator moved to a separate protocol
Also updated data structures and reconfigure.

Known bug: the hash doesn't take adata into account. Needs fixing!
2024-05-30 12:30:00 +02:00
Maria Matejka
732b3981b5 Aggregator: polishing of filter API 2024-05-30 12:30:00 +02:00
Igor Putovny
c48de3cf85 Basic route aggregation
User can specify list of route attributes in the configuration file
and run route aggregation on the export side of the pipe protocol.
Routes are sorted and for every group of equivalent routes
new route is created and exported to the routing table.
It is also possible to specify filter which will run for every
route before aggregation.
Furthermore, it will be possible to set attributes of new routes
according to attributes of the aggregated routes.

This is a work in progress.
2024-05-30 12:30:00 +02:00
Maria Matejka
260de00383 Simple testing of reconfiguration to a slightly different one 2024-05-30 12:30:00 +02:00
Maria Matejka
f567e99f33 Filter: Print instructions take only one value (simplification) 2024-05-30 12:30:00 +02:00
Maria Matejka
3054e26980 Filter: Shortened method declarations 2024-05-30 12:30:00 +02:00
Maria Matejka
4a41bed418 Filter: The for loop uses the method system for type dispatch 2024-05-30 12:30:00 +02:00
Maria Matejka
8941589b97 Removing unused terminals from filter config 2024-05-30 12:30:00 +02:00
Maria Matejka
8ac15bf7a4 Filter: Methods rework
Methods can now be called as x.m(y), as long as x can have its type
inferred in config time. If used as a command, it modifies the object,
if used as a value, it keeps the original object intact.

Also functions add(x,y), delete(x,y), filter(x,y) and prepend(x,y) now
spit a warning and are considered deprecated.

It's also possible to call a method on a constant, see filter/test.conf
for examples like bgp_path = +empty+.prepend(1).

Inside instruction definitions (filter/f-inst.c), a METHOD_CONSTRUCTOR()
call is added, which registers the instruction as a method for the type
of its first argument. Each type has its own method symbol table and
filter parser switches between them based on the inferred type of the
object calling the method.

Also FI_CLIST_(ADD|DELETE|FILTER) instructions have been split to allow
for this method dispatch. With type inference, it's now possible.
2024-05-30 12:30:00 +02:00
Maria Matejka
44bac39361 Uninitialized filter variables of path/[el]?clist types are now explicitly empty 2024-05-30 12:30:00 +02:00
Maria Matejka
9bdc769851 Conf: config warnings show the file position 2024-05-30 12:30:00 +02:00