0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-22 17:51:53 +00:00
Commit Graph

4141 Commits

Author SHA1 Message Date
Igor Putovny
985d9b44bd Add settle timer 2024-05-30 12:30:00 +02:00
Igor Putovny
6270714fd0 Replace goto with else 2024-05-30 12:30:00 +02:00
Igor Putovny
b572ad323d Move aggregation algorithm to separate function 2024-05-30 12:30:00 +02:00
Igor Putovny
4e29dd3f95 Add assertions 2024-05-30 12:30:00 +02:00
Igor Putovny
06712f5d0b Use memcpy with size argument based on destination size 2024-05-30 12:30:00 +02:00
Igor Putovny
9aba7b47be Remove unused code 2024-05-30 12:30:00 +02:00
Igor Putovny
8dee6af44c Replace goto with else 2024-05-30 12:30:00 +02:00
Igor Putovny
7ad8a4cfe1 Replace for loops with memcpy 2024-05-30 12:30:00 +02:00
Igor Putovny
c5ff98e57b Replace for loops with memcpy 2024-05-30 12:30:00 +02:00
Igor Putovny
eb9136c8fb Reorder parameters to stay consistent with the codebase 2024-05-30 12:30:00 +02:00
Igor Putovny
419bdde415 Add logs and declarations, remove unused code 2024-05-30 12:30:00 +02:00
Igor Putovny
de8105a44b Make small changes to increase readability 2024-05-30 12:30:00 +02:00
Igor Putovny
3715cb5085 Rename 2024-05-30 12:30:00 +02:00
Igor Putovny
975e848e57 Rename 2024-05-30 12:30:00 +02:00
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