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

4707 Commits

Author SHA1 Message Date
Maria Matejka
d6d122e245 Merge commit '6b95353e' into thread-next 2023-10-27 18:34:16 +02: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
Maria Matejka
e6baff89f8 Merge commit '5951dfbd' into thread-next 2023-10-27 18:06:34 +02:00
Maria Matejka
da52d66177 Merge commit '58efa944' into thread-next
Conflicts:
	conf/cf-lex.l
	conf/conf.h
	conf/confbase.Y
	conf/gen_keywords.m4
	conf/gen_parser.m4
	filter/config.Y
	nest/config.Y
	proto/bgp/config.Y
	proto/static/config.Y

Keywords and attributes are split to separate namespaces, to avoid
collisions between regular keyword use and attribute overlay.
2023-10-25 14:41:11 +02:00
Maria Matejka
c4bcded8b9 Merge commit 'a5a6de58' into thread-next
Conflicts:
      filter/config.Y
      filter/data.h
      filter/data.c
2023-10-24 10:39:52 +02:00
Maria Matejka
25f846ee8e Merge commit '86598183' into thread-next 2023-10-24 09:34:43 +02:00
Maria Matejka
6c85016dd4 Merge commit 'aa70e14c' into thread-next 2023-10-24 09:34:06 +02:00
Maria Matejka
304c083913 Merge commit 'f5140d10' into thread-next
Smashed as "ours" as local changes are completely incompatible.
Relevant fixes will be merged from later commits if possible.
2023-10-13 15:18:12 +02:00
Maria Matejka
7efa3bac4f Merge commit 'cce48c6c' into thread-next 2023-10-13 14:02:21 +02:00
Maria Matejka
fb4cf949d5 Merge commit '32427c9c' into thread-next 2023-10-13 13:49:09 +02:00
Maria Matejka
cdb95c2858 Merge commit 'f411a19b' into thread-next 2023-10-13 13:46:04 +02:00
Maria Matejka
1234453419 CI: Temporarily disabling test-ibgp-loop-big as it tends to hang 2023-10-13 13:38:15 +02:00
Maria Matejka
407e736404 Merge commit '0dbcc927' into thread-next 2023-10-13 13:36:47 +02:00
Maria Matejka
e7acdf6428 Merge commit 'fc354788' into thread-next 2023-10-13 11:32:53 +02:00
Maria Matejka
dabf2f5625 RIP: actually remove the interface structures on shutdown
This avoids a spurious route update fail when protocol shutdown collides
with an incoming RIP packet.
2023-10-13 11:23:29 +02:00
Maria Matejka
21b75c472d Merge commit 'e3c0eca9' into thread-next 2023-10-13 11:04:39 +02:00
Maria Matejka
b901cca2df Protocol: better granularity of pool management
There are now 3 different pools with specific lifetime. All of these are
available since protocol start, anyway they get freed in different
moments.

First, pool_up gets freed immediately after announcing PS_STOP, to e.g.
stop all timers and events regularly updating the routing table when the
imports are already flushing.

Then, pool_inloop gets freed just before the protocol loop is finally
stopped, after all channels, imports and exports and other hooks are
cleaned up.

And finally, the pool itself is freed the last. Unless you explicitly
need the early free, use this pool.
2023-10-13 10:22:09 +02:00
Maria Matejka
767b7b22a0 Merge commit '5121101136cb80151a9361c63dc4822afeb44eef' into thread-next 2023-10-12 14:12:33 +02:00
Maria Matejka
afb9d5d450 Channel: using a separate pool for export data 2023-10-12 11:38:23 +02:00
Maria Matejka
3cfa9ac253 Merge commit 'e2f08c382a2adbbbd94c5cd7d996ce9175e0fb9c' into HEAD 2023-10-12 11:38:16 +02:00
Maria Matejka
b708dd367a Merge commit '4972590e' into thread-next 2023-10-12 11:05:28 +02:00
Maria Matejka
e2f08c382a BGP/BMP: fixed build with no bmp at all 2023-10-12 10:57:55 +02:00
Maria Matejka
4972590ea5 BGP: dropped bgp_fix_attr_flags() (useless remnant from previous versions) 2023-10-12 09:29:09 +02:00
Maria Matejka
2cbf7c48ad Merge commit 'b20b6a9ad204f2648ed3d62720435bb21dfb947c' into thread-next 2023-10-11 22:26:41 +02:00
Maria Matejka
b20b6a9ad2 BGP/BMP: Moved temporary allocation checks to the freeing functions 2023-10-11 22:23:34 +02:00
Maria Matejka
65ced75e95 Merge branch 'mq-bmp-to-merge-to-v3' into thread-next 2023-10-11 22:06:18 +02:00
Maria Matejka
1b0f320371 Merge commit '2d988f71a5c3caf3b56426a45d4d234c4fd4fce7' into thread-next 2023-10-11 14:16:39 +02:00
Maria Matejka
4b5757ee52 Merge commit '6e908775' into thread-next 2023-10-11 13:28:30 +02:00
Maria Matejka
2ed9b2d769 Merge branch 'mq-bmp-to-merge-to-v3' into HEAD 2023-10-10 15:05:50 +02:00
Ondrej Zajicek
2d988f71a5 Nest: Use generic rte_announce() also for import tables
Remove special rte_announce_in(), so we can use generic rte_announce()
for bot feed and notifications.
2023-10-10 15:04:17 +02:00
Ondrej Zajicek
6e908775cb Conf: Improve handling of keywords
For whatever reason, parser allocated a symbol for every parsed keyword
in each scope. That wasted time and memory. The effect is worsened with
recent changes allowing local scopes, so keywords often promote soft
scopes (with no symbols) to real scopes.

Do not allocate a symbol for a keyword. Take care of keywords that could
be promoted to symbols (kw_sym) and do it explicitly.
2023-10-10 14:28:01 +02:00
Ondrej Zajicek
6b2c9b7c66 Conf: Fix symbol lookup
The symbol table used just symbol name as a key, and used a trick with
active flag to find symbols in active scopes with one hash table lookup.

The disadvantage is that it can degenerate to O(n) for negative queries
in situations where are many symbols with the same name in different
scopes.

Thanks to Yanko Kaneti for the bugreport.
2023-10-10 14:27:36 +02:00
Ondrej Zajicek
15c86ed061 Static: Add MPLS support
When MPLS is active, static IP/VPN routes are automatically labeled
according to active label policy and corresponding MPLS routes are
automatically generated.
2023-10-04 13:01:21 +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
Ondrej Zajicek (work)
e55696a4f8 Lib: Indirect bitmap for MPLS label allocator 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
katerina.kubecova
216abcb12e ROA notifications store the affected nets into trie 2023-10-03 11:07:46 +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
Maria Matejka
8ad9c4bb33 BGP config: Splitting Route Refresh and Enhanced Route Refresh
Both toggles are on by default but if some implementation needs one or
another to be switched off separately, then it's possible now.
2023-09-27 20:18:46 +02:00
Maria Matejka
b58ebc4ef1 Babel: Properly handle route refeed 2023-09-27 17:40:40 +02:00
Maria Matejka
bf84daca8c RIP: Properly handle route refeed 2023-09-27 17:40:40 +02:00
Maria Matejka
a4adb09f5a Aggregator: brief documentation 2023-09-26 15:46:24 +02:00
Maria Matejka
018a77fc0b Aggregator: Forbidden dangerous filter computations 2023-09-26 15:46:24 +02:00
Maria Matejka
8674d7ab4b Aggregator: Fixed hashing of adata 2023-09-26 15:46:24 +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
860fbf0d65 Babel: Remove interfaces on shutdown
This avoids calling interface timer between Babel going
PS_DOWN and finally cleaning up the resource pool.
2023-09-25 09:31:18 +02:00
Maria Matejka
5cdc1b679c Kernel: refeed routes and delete them from kernel before actual shutdown 2023-09-24 23:23:08 +02:00
Maria Matejka
e65a5257b2 Protocols have now assigned startup phases
For now, there are 4 phases: Necessary (device), Connector (kernel, pipe), Generator (static, rpki) and Regular.
Started and reconfigured are from Necessary to Regular, shutdown backwards.

This way, kernel can flush routes before actually being shutdown.
2023-09-24 23:23:08 +02:00