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

503 Commits

Author SHA1 Message Date
Maria Matejka
3b217f2984 Fixed L3VPN after merge to v3.
Semantics of rt_get_source() has changed between v2 and v3. Also other
minor fixes were needed to make it run.
2024-01-30 23:14:10 +01:00
Maria Matejka
06030d8bf0 Hostentry eattrs are now properly zeroed 2024-01-30 23:14:10 +01:00
Maria Matejka
95adf7b0fa Fixed regression in route feeding.
We were, once again, forgetting to mark empty-net journal entries as
processed, as was fixed in 32bb548c11.

Introduced in 548dbb2252.
Caught by cf-ebgp-graceful.
2024-01-30 21:31:13 +01:00
Maria Matejka
ea0f2c6194 Fixed attributes normalization with underlays in place 2024-01-28 13:16:25 +01:00
Maria Matejka
25e20485ae Fixed route table attribute caching 2024-01-26 14:42:55 +01:00
Maria Matejka
365ea12ea1 MPLS Subsystem Proper Locking
Added also some debug lines if debug is on.
2024-01-26 14:42:44 +01:00
Maria Matejka
e711a991d4 MPLS: FEC Map moved from protocol to MPLS channel 2024-01-08 13:03:25 +01:00
Maria Matejka
548dbb2252 Replacing table FIB by netindex and simple pointer block
Using the netindex data structure to simplify route storage inside route
tables. This should also help with future unlocking of route import.
2024-01-08 09:34:32 +01:00
Maria Matejka
25906bc5e9 Merge commit 'ef814fb2d6415206fce280c37466ea889291b043' into HEAD 2023-12-08 12:13:58 +01:00
Maria Matejka
ef814fb2d6 Merge commit 'bb094fb6' into mq-aggregator-for-v3 2023-12-08 12:09:17 +01:00
Maria Matejka
bb094fb6c7 Refactoring also net_roa_check
Having 4 functions doing almost the same is more mess than three macros.
2023-12-08 12:08:28 +01:00
Maria Matejka
8c19f8a209 Merge commit 'db1eb46664d4c76d56dc55a63ce7abe853fc6862' into HEAD 2023-12-08 11:33:43 +01:00
Maria Matejka
db1eb46664 Merge commit '54ddf90f6370f06efc71c3ffd6e02d031a86866f' into mq-aggregator-for-v3 2023-12-08 09:08:38 +01:00
Maria Matejka
54ddf90f63 Conf: debug tables
For now just a dummy config but it is needed for forward
compatibility with v3.
2023-12-07 14:38:05 +01:00
Maria Matejka
9a91ea52db Refactoring of net_route 2023-12-07 14:11:16 +01:00
Maria Matejka
3b48dc9bce Table: Adding route refresh begin and end debug messages 2023-12-07 14:11:16 +01:00
Maria Matejka
0bcbff42ca Table: nicer route validation errors 2023-12-04 10:39:32 +01:00
Maria Matejka
080e580834 Route table objects use the new locked object macro stack 2023-11-20 12:09:31 +01:00
Maria Matejka
4f2212ccf2 Merge branch 'mq-aggregator-for-v3' into thread-next 2023-11-09 16:34:04 +01:00
Maria Matejka
6067ad6c07 Merge commit '9b775859' into mq-aggregator-for-v3 2023-11-09 16:00:44 +01:00
Maria Matejka
30712a2bdf Merge branch 'mq-aggregator-for-v3' into thread-next 2023-11-08 21:51:46 +01:00
Ondrej Zajicek
a0b4835253 MPLS: Fix issue with recursive MPLS routes
Recursive MPLS routes used hostentry from the original route, which
triggered different table than MPLS table, and therefore were not
updated.
2023-11-07 16:06:15 +01:00
Maria Matejka
c6fba7d7e6 Merge branch 'thread-next' into HEAD 2023-11-02 14:43:15 +01:00
Maria Matejka
1c0bc707a0 Prefiltering routes by net and custom hook for partial reloads 2023-11-02 14:37:27 +01:00
Maria Matejka
3611555883 Merge commit '333ddd4f' into mq-aggregator-for-v3 2023-11-02 12:01:22 +01:00
Maria Matejka
f730ecef4f Dumping route sources along with protocols and routes 2023-11-01 18:25:40 +01:00
Maria Matejka
f90f2ed680 Merge branch 'mq-aggregator-for-v3' into thread-next 2023-11-01 18:08:49 +01:00
Maria Matejka
29e3a86ad1 Merge commit '21213be5' into mq-aggregator-for-v3 2023-11-01 17:49:12 +01:00
Maria Matejka
11faa7d36b Merge branch 'mq-aggregator-for-v3' into HEAD 2023-11-01 10:58:44 +01:00
Maria Matejka
8917f16e4b Merge branch 'mq-aggregator-for-v3' into HEAD 2023-11-01 10:58:31 +01:00
Maria Matejka
b958228953 Aggregator: Fixed bugs in filter usage 2023-11-01 10:57:43 +01:00
Igor Putovny
f42c118aa7 Basic route aggregation
Add a new protocol offering 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.

Original work by Igor Putovny, subsequent cleanups and finalization by
Maria Matejka.

This is a split-commit of the neighboring aggregator branch
with a bit improved lvalue handling, to have easier merge into v3.
2023-10-31 16:40:46 +01:00
Maria Matejka
b0797c2dcd Merge commit 'de70474fed139f9acb4ed3f8e925d12de4edcdd0' into thread-next 2023-10-31 09:58:42 +01:00
Maria Matejka
de70474fed Filter: adding explicit route type
This is a split-commit of the neighboring aggregator branch
with a bit improved lvalue handling, to have easier merge into v3.
2023-10-30 13:10:36 +01:00
Maria Matejka
ddf698ec99 Renamed nest/rt.h back to nest/route.h
Some [redacted] (yes, myself) had a really bad idea
to rename nest/route.h to nest/rt.h while refactoring
some data structures out of it.

This led to unnecessarily complex problems with
merging updates from v2. Reverting this change
to make my life a bit easier.

At least it needed only one find-sed command:

    find -name '*.[chlY]' -type f -exec sed -i 's#nest/rt.h#nest/route.h#' '{}' +
2023-10-29 16:29:26 +01:00
Maria Matejka
0ba22509a8 Merge commit '51f2e7af' into thread-next
Conflicts:
	conf/cf-lex.l
	conf/conf.h
	conf/confbase.Y
	filter/config.Y
	nest/config.Y
	nest/proto.c
	nest/rt-table.c
	proto/bgp/bgp.c
	sysdep/unix/main.c
2023-10-27 18:29:31 +02:00
Ondrej Zajicek
9b775859cd MPLS: Handle label allocation failures 2023-10-04 13:12:05 +02:00
Ondrej Zajicek
333ddd4f98 MPLS subsystem
The MPLS subsystem manages MPLS labels and handles their allocation to
MPLS-aware routing protocols. These labels are then attached to IP or VPN
routes representing label switched paths -- LSPs.

There was already a preliminary MPLS support consisting of MPLS label
net_addr, MPLS routing tables with static MPLS routes, remote labels in
next hops, and kernel protocol support.

This patch adds the MPLS domain as a basic structure representing local
label space with dynamic label allocator and configurable label ranges.
To represent LSPs, allocated local labels can be attached as route
attributes to IP or VPN routes with local labels as attributes.

There are several steps for handling LSP routes in routing protocols --
deciding to which forwarding equivalence class (FEC) the LSP route
belongs, allocating labels for new FECs, announcing MPLS routes for new
FECs, attaching labels to LSP routes. The FEC map structure implements
basic code for managing FECs in routing protocols, therefore existing
protocols can be made MPLS-aware by adding FEC map and delegating
most work related to local label management to it.
2023-10-04 13:01:21 +02:00
Maria Matejka
198fb23a3a Merge commit '93509af4' into HEAD 2023-10-03 11:26:46 +02:00
katerina.kubecova
93509af4c1 Table preexport net-filter refactoring
Also added a possibility for filtering by trie.
2023-10-03 11:08:28 +02:00
Maria Matejka
8d1215dba6 Channel: Refeeding by an auxiliary request if needed.
If the protocol supports route refresh on export, we keep the stop-start
method of route refeed. This applies for BGP with ERR or with export
table on, for OSPF, Babel, RIP or Pipe.

For BGP without ERR or for future selective ROA reloads, we're adding an
auxiliary export request, doing the refeed while the main export request
is running, somehow resembling the original method of BIRD 2 refeed.

There is also a refeed request queue to keep track of different refeed
requests.
2023-10-03 09:54:39 +02:00
Ondrej Zajicek
21213be523 Nest: Expand rte_src.private_id to u64
In general, private_id is sparse and protocols may want to map some
internal values directly into it. For example, L3VPN needs to
map VPN route discriminators to private_id.

OTOH, u32 is enough for global_id, as these identifiers are dense.
2023-10-02 15:09:30 +02:00
Igor Putovny
977b82fba4 Basic route aggregation
Add a new protocol offering 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.

Original work by Igor Putovny, subsequent cleanups and finalization by
Maria Matejka.
2023-09-26 15:46:24 +02:00
Maria Matejka
c92b5ad218 Table: Added some journal and export tracing 2023-09-24 20:43:04 +02:00
Maria Matejka
32bb548c11 Table: Fixed feed race condition
The problem happened like this:

1. Single route for the given net in table
2. A feed is started
3. The route is deleted (from another thread)
4. The feed finds an empty net, exports nothing, ignores journal (here is bug)
5. The route is added
6. The export transitions from FEEDING to READY
7. While processing the journal, the route deletion and addition combines into noop.

This way routes mysteriously disappeared in specific cases of link instability.

Problem fixed by explicitly marking the empty-net journal entries as processed in step 4.
2023-09-24 20:43:04 +02:00
Maria Matejka
c262c728eb Export: More strict export state checking on change 2023-09-24 20:43:04 +02:00
Maria Matejka
a920b5111c Properly consted routes inside table 2023-09-24 20:43:04 +02:00
Vojtech Vilimek
b43580d77d Renamed channel class pointers
The channel class pointers were strangely named , not .
2023-09-24 20:43:04 +02:00
Maria Matejka
0faf3bb630 Enhanced tracing of route refresh state 2023-09-14 14:40:33 +02:00
Maria Matejka
51f2e7afaf Conf: Symbol manipulation gets its context explicitly 2023-09-12 15:36:46 +02:00