0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2025-03-11 17:08:46 +00:00

5351 Commits

Author SHA1 Message Date
Maria Matejka
4b7d9f33fa Merge branch 'mq-build-update' into 132-compat-cli 2025-01-13 23:14:49 +01:00
Maria Matejka
b8e282bbf8 fixup! fixup! use python venv for debian 2025-01-13 23:04:57 +01:00
Maria Matejka
862a4dbe1d fixup! use python venv for debian 2025-01-13 22:49:16 +01:00
Maria Matejka
9b96d0bac3 use python venv for debian 2025-01-13 22:21:43 +01:00
Maria Matejka
3f2ad7ec68 Merge remote-tracking branch 'refs/remotes/origin/132-compat-cli' into 132-compat-cli 2025-01-13 22:04:10 +01:00
Maria Matejka
5fc0aad738 Merge branch 'mq-build-update' into 132-compat-cli 2025-01-13 22:02:59 +01:00
Maria Matejka
d2d00bc222 fixup! Update build and package targets 2025-01-13 22:01:50 +01:00
Maria Matejka
6d5b30baa8 Merge branch 'mq-build-update' into 132-compat-cli 2025-01-13 21:59:47 +01:00
Maria Matejka
a052acbcc0 Merge branch 'mq-build-update' into 132-compat-cli 2025-01-13 21:54:32 +01:00
Maria Matejka
efb3498613 Update build and package targets
Fedora builds for 32-41, Debian up to 12, Ubuntu up to 24.10.

Includes autorebuilder if a Dockerfile changes.

The CI file is obnoxiously boilerplaty. TODO: generate it from a list?
2025-01-13 21:52:00 +01:00
Maria Matejka
0c32f6218f CLI: fix channel stats display
The overall number of updates/withdrawals received, as well as
the number of routes limited, were not updated.
2025-01-13 21:51:14 +01:00
Maria Matejka
c94d7dae27 CLI: v2 compatibility mode for attribute name display
Also fixed display of bgp_otc (was just "otc" before).
2025-01-13 21:51:14 +01:00
Maria Matejka
77582da162 NEWS and version update v3.0.1 2025-01-09 21:54:53 +01:00
Maria Matejka
bd3ba2af92 Merge remote-tracking branch 'origin/stable-v2.16' into HEAD 2025-01-09 21:54:15 +01:00
Maria Matejka
11913f58cb NEWS and version update v2.16.1 2025-01-09 21:51:15 +01:00
Maria Matejka
000ba7e960 Merge commit 'abecb5bb408f253cd24345ba94940ea0f7b59f4f' into HEAD 2025-01-09 18:55:26 +01:00
Maria Matejka
4074112992 Merge commit '85aa283071ed75059fd8c889bc4ee33be1f901af' into HEAD 2025-01-09 18:46:04 +01:00
Maria Matejka
d0a328bfa9 Merge commit 'd221f39731be40ed3821f8db09d590edb849cb0c' into HEAD 2025-01-09 18:45:50 +01:00
Maria Matejka
5c3eff5645 Merge commit 'e063365590b9b857a5bd0acfa519783eba639bbf' into stable-v3.0 2025-01-09 18:40:29 +01:00
Ondrej Zajicek
abecb5bb40 lib: Unify alignment of allocators
Different internal allocators (memory blocks, linpools, and slabs) used
different way to compute alignment. Unify it to use alignment based on
standard max_align_t type.

On x86_64, this does not change alignment of memory blocks and linpools
(both old and new is 16), but it increases alignment of slabs from 8 to
16.

Minor changes by commiter.
2025-01-09 17:42:55 +01:00
Maria Matejka
b2de140d1a Table: Fixed table debug settings reconfiguration 2025-01-09 10:35:00 +01:00
Maria Matejka
a24ec59d24 Table: more best route refeed fixes
Best route refeed is tricky. The journal may include repeatedly the same
route in the old and/or in the new position in case of flaps. We don't
like checking that fully in the RCU critical section which is already
way too long, thus we filter out the repeated occurence of the current
best route while keeping possibly more old routes.

We also don't want to send spurious withdraws, and we need to check that
only one notification per net is sent for RA_OPTIMAL.

There was also missing a rejected map update in case of idempotent
squashed update, and last but not least, the best route journal should
not include invalid routes (import keep filtered).
2025-01-09 10:35:00 +01:00
Maria Matejka
9381f8f2d8 Table: old best route refeed fix
When refeeding with RA_OPTIMAL, the old best routes weren't announced,
leading to weird behavior of protocols, mostly kernel. Fixed.
2025-01-09 10:34:49 +01:00
Maria Matejka
d43538acbd BGP: fixed deterministic med crashes
There were several places of forgotten NULL checks.

Thanks to Alarig Le Lay <alarig@swordarmor.fr> for reporting:
https://trubka.network.cz/pipermail/bird-users/2024-December/017990.html
2025-01-09 10:08:27 +01:00
Maria Matejka
c2bd489bbc BGP: fix display name of bgp_otc attribute 2025-01-09 10:08:27 +01:00
Maria Matejka
ffa57a4303 Allocate the normalization buckets on stack
Even though allocating from tmp_linpool is quite cheap,
it isn't cheap when the block is larger than a page, which is the case here.
Instead, we now allocate just the result which typically fits in a page,
avoiding a necessity of a malloc().
2025-01-09 10:08:27 +01:00
Maria Matejka
4f7899e3cb BGP: TX bucket storage moved to Stonehenge 2025-01-09 10:08:27 +01:00
Maria Matejka
240dd41f06 Route attribute storage moved to Stonehenge 2025-01-09 10:08:27 +01:00
Maria Matejka
29df992f7f Stonehenge: multi-slab allocator
To mid-term allocate and free lots of small blocks in a fast pace,
mb_alloc is too slow and causes heap bloating. We can already allocate
blocks from slabs, and if we allow for a little bit of inefficiency,
we can just use multiple slabs with stepped sizes.

This technique is already used in ea_list allocation which is gonna be
converted to Stonehenge.
2025-01-09 10:08:27 +01:00
Maria Matejka
5edac7403e Graceful recovery: converted to obstacles
Yet another refcounting mechanism had a locking collision.
2025-01-09 10:08:27 +01:00
Maria Matejka
91c98efe57 Kernel: feed only once during startup
There was an inefficiency in the initial scan state machine,
causing routes to be fed several times instead of just once.
Now the export startup is postponed until first krt_scan()
finishes and we actually can do the pruning with full information.
2025-01-09 10:08:27 +01:00
Maria Matejka
56be89911a CLI: Flushing tmp_linpool after every shown net.
There is no reason to keep the allocated objects through multiple nets.
2025-01-09 10:08:27 +01:00
Maria Matejka
ccff887e50 CLI: allocate TX buffers as pages, not by malloc
Every malloc risks heap bloating and these blocks are already
the same size as pages.
2025-01-09 10:08:27 +01:00
Maria Matejka
85aa283071 Static: fixed ASPA reconfiguration
Due to an oversight, the provider lists weren't compared on reconfiguration.

Reported-By: Ralph Covelli <rcovelli@he.net>
2025-01-07 20:40:37 +01:00
Ondrej Zajicek
d221f39731 Nest: Fix handling of 64-bit rte_src.private_id
The commit 21213be523baa7f2cbf0feaa617f265c55e9b17a expanded private_id
in route source to u64, but forgot to modify function arguments, so it
was still cropped at 32-bit, which may cause some collisions for L3VPN.
This patch fixes that.
2025-01-07 20:40:17 +01:00
Ondrej Zajicek
e063365590 Lib: Ensure that all net_addr structures have the same alignment
Also weaken the explicit alignment of net_addr to be u32, as VPN
is already u32-aligned.
2025-01-07 20:40:17 +01:00
Ondrej Zajicek
fe5ca3fa7d Doc: Fix protocol outline in RPKI
Protocol outlines should not contain specific values.

Also fix some space intendation in code sections.
2025-01-07 20:40:17 +01:00
Ondrej Zajicek
cf659a05a4 Lib: Data type for VPN route distinguishers
Use a distinct data structure for VPN route distinguishers instead
of just u64.
2025-01-07 20:40:17 +01:00
Ondrej Zajicek
f9c7861e11 Netlink: Handle onlink flag on BSD-Netlink
On BSD, the onlink flag is not tracked or reported by kernel. We are
using an heuristic that assigns the onlink flag to routes scanned from
the kernel. We should use the same heuristic even in BSD-Netlink
case, as the onlink flag is not reported here too.

Thanks to Björn König for the original patch.
2025-01-07 20:38:49 +01:00
Fabian Bläse
de7ded6ef6 Babel: fix seqno wrapping on seqno request
The Babel seqno wraps around when reaching its maximum value (UINT16_MAX).
When comparing seqnos, this has to be taken into account. Therefore,
plain number comparisons do not work.
2025-01-07 20:38:28 +01:00
Maria Matejka
8349536278 BFD: Fix session reconfiguration locking order
The sessions have to be updated asynchronously to avoid
cross-locking between protocols.

Testsuite: cf-ibgp-bfd-switch, cf-ibgp-multi-bfd-auth
Fixes: #139

Thanks to Daniel Suchy <danny@danysek.cz> for reporting:
https://trubka.network.cz/pipermail/bird-users/2024-December/017984.html
2024-12-21 19:12:54 +01:00
Maria Matejka
6779e5da69 BGP: fix locking order error on dynamic protocol spawn
We missed that the protocol spawner violates the prescribed
locking order. When the rtable level is locked, no new protocol can be
started, thus we need to:

* create the protocol from a clean mainloop context
* in protocol start hook, take the socket

Testsuite: cf-bgp-autopeer
Fixes: #136

Thanks to Job Snijders <job@fastly.com> for reporting:
https://trubka.network.cz/pipermail/bird-users/2024-December/017980.html
2024-12-20 11:40:10 +01:00
Maria Matejka
ab74652f96 Kernel: when channel traces, we have to trace the final result
Otherwise it looks like we are sending too much traffic to netlink
every other while, which is not true. Now we can disambiguate between
in-kernel updates and ignored routes.
2024-12-19 12:28:27 +01:00
Maria Matejka
0a2f92ad20 Table: not feeding twice, once is enough
If there is no feed pending, the requested one should be
activated immediately, otherwise it is activated only after
the full run, effectively running first a full feed and
then the requested one.
2024-12-19 11:54:05 +01:00
Maria Matejka
b6caccfd45 Kernel: Fix crash for merge paths on if no route is in BIRD
There was a missing check for a NULL return value.
Also fixed an indenting error.

Thanks to Radu Anghel for reporting it:
https://bird.network.cz/pipermail/bird-users/2024-December/017977.html
2024-12-19 11:38:27 +01:00
Maria Matejka
e7bd976178 NEWS and version update v3.0.0 2024-12-17 09:42:16 +01:00
Jakub Ružička
733baa1dbd Debian: Depend on libssh's default flavor
This mirrors Debian bird2 change, gcrypt flavor is deprecated.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1074257
2024-12-16 16:36:31 +01:00
Katerina Kubecova
1f6ecd7e19 BGP: Print warnings when the allocated memory is larger than given acceptable maximum. 2024-12-16 12:33:07 +01:00
Maria Matejka
c6b778794e Table exporter journal dumping and memsize
The show-memory command wasn't showing the consumed memory
properly because it ignored the journal size. Now it does.
2024-12-16 12:31:26 +01:00
Maria Matejka
b67db7c97d Fix mallopt configure checks
Some systems do have malloc.h but don't have mallopt.
2024-12-16 09:50:20 +01:00