Igor Putovny
ac168aa2cb
Construct trie only after protocol feed ends
2024-05-30 12:30:00 +02:00
Igor Putovny
ceb556e2cc
Don't schedule aggregation as event but run it at the protocol feed end
2024-05-30 12:30:00 +02:00
Igor Putovny
470facb69b
Use refactored first pass function
2024-05-30 12:30:00 +02:00
Igor Putovny
07d3f682ad
Remove debugging logs
2024-05-30 12:30:00 +02:00
Igor Putovny
24a450a817
Add more assertions
2024-05-30 12:30:00 +02:00
Igor Putovny
d5930c4f76
Add modified implementation of the first pass
2024-05-30 12:30:00 +02:00
Igor Putovny
c1f7d66a47
Remove debugging logs
2024-05-30 12:30:00 +02:00
Igor Putovny
7dd30de09d
Add variable to track node depth in the trie
2024-05-30 12:30:00 +02:00
Igor Putovny
09a013fbad
Add small check to the first pass of ORTC algorithm
2024-05-30 12:30:00 +02:00
Igor Putovny
24cf9cbf43
Remove code duplication
2024-05-30 12:30:00 +02:00
Igor Putovny
347b322dd9
Check correct address types during aggregation configuration
2024-05-30 12:30:00 +02:00
Igor Putovny
21f689752a
Collect and print prefixes according to address type
2024-05-30 12:30:00 +02:00
Igor Putovny
5cb2e20f4d
Create default net based on adress type
2024-05-30 12:30:00 +02:00
Igor Putovny
e468296355
Create separate functions for inserting IP4 and IPv6 prefixes into trie
2024-05-30 12:30:00 +02:00
Igor Putovny
2247e45694
Use %N for printing net addresses
2024-05-30 12:30:00 +02:00
Igor Putovny
89c55c241e
Use idiomatic functions for manipulating net_addr, remove unnecessary use of alloca
2024-05-30 12:30:00 +02:00
Igor Putovny
7644f7594b
Bugfix
...
Program crashed when disabling aggregation protocol or shutting the daemon down.
Shutdown procedure attempted to remove the first route (which is the last that
was inserted) by different key than one by which it was inserted into the table.
They key is computed from net and src of each route. It turned out that src of
the last route was inadvertently changed.
2024-05-30 12:30:00 +02:00
Igor Putovny
9619284d20
Clear bit after setting it when collecting prefixes from trie
2024-05-30 12:30:00 +02:00
Igor Putovny
da65a073c5
Add debugging logs
2024-05-30 12:30:00 +02:00
Igor Putovny
ade731e02a
Rename variables of type protocol in order to be consistent with the rest of the codebase
2024-05-30 12:30:00 +02:00
Igor Putovny
4621925ff4
Create and assign net to default route
2024-05-30 12:30:00 +02:00
Igor Putovny
0c1ac9674a
Change a few logs
2024-05-30 12:30:00 +02:00
Igor Putovny
9d6d8b1adb
Refactor functions for comparing buckets and computing union and intersection of buckets
2024-05-30 12:30:00 +02:00
Igor Putovny
dcf0038fd0
Run correct aggregation (by nets or by attributes) according to configuration
2024-05-30 12:30:00 +02:00
Igor Putovny
ecfb73332a
Collect prefixes in trie after aggregation and export new routes
2024-05-30 12:30:00 +02:00
Igor Putovny
14d82bc053
Remove const from aggregator_bucket pointers in trie nodes
2024-05-30 12:30:00 +02:00
Igor Putovny
b265df526c
Refactor printing prefixes in trie
2024-05-30 12:30:00 +02:00
Igor Putovny
518f3969e5
Remove configuration rule enforcing aggregation on NET
2024-05-30 12:30:00 +02:00
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