]> git.ipfire.org Git - thirdparty/bird.git/log
thirdparty/bird.git
6 days agoCI: Force v3.1.5 package rebuild release-v3.1.5
Maria Matejka [Tue, 9 Dec 2025 20:46:22 +0000 (21:46 +0100)] 
CI: Force v3.1.5 package rebuild

6 days agoCI: Temporarily enabling cross-platform deb build
Maria Matejka [Mon, 8 Dec 2025 09:42:13 +0000 (10:42 +0100)] 
CI: Temporarily enabling cross-platform deb build

This commit is a temporary measure. We'll refactor the CI and make the
builds more systematic.

6 days agoCI: No more APKG in Debian packaging
Maria Matejka [Sat, 6 Dec 2025 21:43:54 +0000 (22:43 +0100)] 
CI: No more APKG in Debian packaging

All of that can be handled by a little Bash script.

6 days agoCI: Update supported distributions
Maria Matejka [Sat, 6 Dec 2025 23:34:24 +0000 (00:34 +0100)] 
CI: Update supported distributions

Debian 10 is too oldstable.
Ubuntu 24.10 is EOL.
Adding Ubuntu 25.04 and 25.10.

6 days agoCI: Building for Oracle Linux 8, 9 and 10, and also Fedora 43.
Maria Matejka [Tue, 25 Nov 2025 18:37:37 +0000 (19:37 +0100)] 
CI: Building for Oracle Linux 8, 9 and 10, and also Fedora 43.

Oracle Linux is basically a fork of RHEL.

11 days agoNEWS and version update stable-v3.1 v3.1.5
Maria Matejka [Thu, 4 Dec 2025 14:21:10 +0000 (15:21 +0100)] 
NEWS and version update

13 days agoRAdv: Fix flags for deprecated prefixes
Ondrej Zajicek [Thu, 27 Nov 2025 16:59:44 +0000 (17:59 +0100)] 
RAdv: Fix flags for deprecated prefixes

When a prefix is deprecated (valid_lifetime == 0), it should be
announced with the same flags as before. The old code announced it
without any flags, which leads to being ignored by recipients.

Note that a prefix could be depreacted for two reason - it is removed
from the interface, or it is deconfigured in BIRD configuration.

Thanks to Michael Saxl for the bugreport.

Fixes: #323
2 weeks agoBSD: Fix export of non-multipath routes
David Petera [Mon, 24 Nov 2025 14:28:09 +0000 (15:28 +0100)] 
BSD: Fix export of non-multipath routes

Due to incorrect logic in sysdep/bsd/krt-sock.c:krt_capable
it was impossible to export non-mulitpatch route to kernel table.

This is now fixed.

Thanks to Yuri Honegger <yuri.honegger@icloud.com> for report and fix suggestion.

2 weeks agoMRT: Fix crash when protocol mrtdump configured without a specified file
Maria Matejka [Tue, 25 Nov 2025 17:22:26 +0000 (18:22 +0100)] 
MRT: Fix crash when protocol mrtdump configured without a specified file

If somebody configured mrtdump option in the protocol block and had no
mrtdump file configured on toplevel, BIRD 3 would crash on first MRT
message to be written after that.

Fixed by passing the rfile structure through up to the actual place
where mrt_dump_message() checks whether anything is open. Theoretically
there could be a smaller fix involving just adding null-checks to
mrt_dump_bgp_message() and mrt_dump_bgp_state_change(), but this is more
future-proof.

Reported-By: Káťa Kubecová
Fixes: #243
2 weeks agoFilter: fix undefined memory access in nexthop handling
Maria Matejka [Thu, 20 Nov 2025 11:03:02 +0000 (12:03 +0100)] 
Filter: fix undefined memory access in nexthop handling

If nexthop is special (blackhole, unreachable, prohibit), directly
asking for anything else from there accessed undefined memory. This
manifested with checking for interface name where it actually
dereferenced a pointer from there, causing a crash.

In some cases, reading ifindex might have also sometimes caused a crash.
The other data (weight, gw, gw_mpls) is stored directly inside
the nexthop EA, and even though it's shorter, in most cases it "just"
returned garbage. The only exception would be probably if the
unreachable nexthop EA was allocated right at the end of tmp_pool or
locally on stack.

Fixing this by properly checking for reachability before reading the
nexthop data.

This variant of the commit does _not_ touch onlink as it is not enabled
in the 3.1 branch.

Reported-By: Lars Gierth <larsg@systemli.org>
Reproduced-By: David Petera <david.petera@nic.cz>
Fixes: #313
2 weeks agoFilters: Regression test for link-local gateway without interface.
Maria Matejka [Tue, 25 Nov 2025 09:48:29 +0000 (10:48 +0100)] 
Filters: Regression test for link-local gateway without interface.

Related to #257, commit 634c0492a590cfcb95f0a5948a639a2a490ae912.

2 weeks agoFilters: Fix crash on setting link-local gateway with no interface
Maria Matejka [Tue, 27 May 2025 08:44:53 +0000 (10:44 +0200)] 
Filters: Fix crash on setting link-local gateway with no interface

When refactoring nexthop data structures to eattrs,
we missed that we are dereferencing an interface pointer
from a possibly invalid memory.

This fixes #257.

3 weeks agoTools: Release initialization script
Maria Matejka [Sat, 22 Nov 2025 22:23:28 +0000 (23:23 +0100)] 
Tools: Release initialization script

There is a bunch of things one needs to do in gitlab when releasing and
this script simply checks whether there is everything needed and fixes
what is missing,

This commit includes the milestone fix.

3 weeks agoConf: Fix thread groups. Allow for multiple options in the block.
David Petera [Wed, 27 Aug 2025 07:59:17 +0000 (09:59 +0200)] 
Conf: Fix thread groups. Allow for multiple options in the block.

Reported-By: Robert Lister <rob@lonap.net>
3 weeks agoMRT: Fix dumps with layered attibutes
Maria Matejka [Fri, 21 Nov 2025 13:08:46 +0000 (14:08 +0100)] 
MRT: Fix dumps with layered attibutes

When route is modified during the import and the import table is on,
it's stored with layered attributes, the bottom layer containing the
original data and over that there are one or more layers containing the
changes.

Dumping into MRT files calls bgp_encode_attr() on that attribute list,
and that function requires attributes to be normalized, i.e. squashed to
one layer which can be then walked. This was mistakenly done only on
uncached attribute lists, while in reality it should be done always
because of the layering.

This caused MRT to crash in case when the import table is on and the
import filter unsets certain BGP attributes, specifically any attribute
which is longer than int, e.g. bgp_path, bgp_cluster_list,
bgp_community or bgp_next_hop. That creates a pseudo-attribute in the
top layer with the undef flag set, and bgp_encode_attr() then crashes on
unexpected NULL pointer dereference.

Fixed by requiring the attributes to be normalized always.

Reported-By: Katerina Kubecova <katerina.kubecova@nic.cz>
3 weeks agoConf: Implicit symbols should not generate warnings when overriding keywords
Maria Matejka [Thu, 13 Nov 2025 20:40:21 +0000 (21:40 +0100)] 
Conf: Implicit symbols should not generate warnings when overriding keywords

3 weeks agoCI: fix broken debian-11-i386 packaging
David Petera [Fri, 14 Nov 2025 13:07:38 +0000 (14:07 +0100)] 
CI: fix broken debian-11-i386 packaging

The error occured when trying to install 'markupsafe' v3.0.3 python package (dependency of 'apkg') on debian-11-i386 arch.
Fixed by preinstalling older version of 'markupsafe' package before the installation of 'apkg'.

Since the behavior is added to 'pkg-deb-legacy' it also effects packaging of ubuntu-18.04-amd64.
Also debian-11-amd64 is moved to 'pkg-deb-legacy' together with effected debian-11-i386 just for code clarity.

5 weeks agoMove the interfaces locking domain from attrs to rtable
Igor Putovny [Thu, 9 Oct 2025 14:08:47 +0000 (16:08 +0200)] 
Move the interfaces locking domain from attrs to rtable

The interface table domain level has been "attrs" due to limitations
imposed in the early stages of development when all operations on
routing tables, most notably next hop resolution, were done with the
table locked.

Another possible problem was accessing the BGP listen socket structures
which are on the "rtable" level.

Yet, with the introduction of the "service" level and stabilization of
other structures, the interface table domain level does not need to be
at "attrs" anymore, and therefore we may simply move it to "rtable"
as it is actually the right place for that.

This collision also caused problems with external resource locks which
are at the "attrs" level, causing a crash in interface reconfiguration
of RIP, Babel and OSPF, when the routines tried to acquire a resource
lock with the interface table being locked. Due to a lack of autotests
for interface reconfiguration, we missed this problem in BIRD 3.

This fixes #305.

2 months agoNEWS and version update v3.1.4
Maria Matejka [Mon, 22 Sep 2025 11:53:47 +0000 (13:53 +0200)] 
NEWS and version update

2 months agoBGP: Fixed crash on Notification with a message
Maria Matejka [Thu, 18 Sep 2025 16:01:37 +0000 (18:01 +0200)] 
BGP: Fixed crash on Notification with a message

Due to wrong locking order, when a peer with an established BGP
session sent a Notification with a custom message, BIRD always
crashed when trying to allocate the memory for that message.

This is a minimal crashfix for stable branches; the development
branch will get a more systematic protocol allocation rework.

Reported-By: Rob Lister <rob@lonap.net>
2 months agoCI: Ubuntu 24.10 is EOL, 25.04 is current
Maria Matejka [Mon, 22 Sep 2025 15:37:05 +0000 (17:37 +0200)] 
CI: Ubuntu 24.10 is EOL, 25.04 is current

2 months agoPipe: Do not show statistics for a stopping pipe
Maria Matejka [Mon, 22 Sep 2025 09:17:34 +0000 (11:17 +0200)] 
Pipe: Do not show statistics for a stopping pipe

There is no guarantee of such statistics to exist.

Reported-By: NIX-CZ
2 months agoBGP: Fixed invalid memory access in pending TX flush
Maria Matejka [Mon, 22 Sep 2025 08:37:16 +0000 (10:37 +0200)] 
BGP: Fixed invalid memory access in pending TX flush

When BGP is shutting down (or graceful-restarting), it must flush the
pending TX data. In quite rare cases, it may have happened that with the
export table on and shutting down a session with just the right amount
of unsent updates, the flush may have caused a step-down of the prefix
hash in the middle of walking it.

Usually, when downsizing, the prefix of the allocated block is used, but
if the block is large enough, it may have been re-used by another thread
early enough to cause some very unwanted out-of-buffer access.

Reported-By: NIX-CZ
2 months agoHash: Assert that table is not resized during HASH_WALK
Igor Putovny [Wed, 11 Jun 2025 15:44:38 +0000 (17:44 +0200)] 
Hash: Assert that table is not resized during HASH_WALK

According to measurements of hash_test, hash table with this assertion added
was not found to be significantly slower than without it on average. Therefore
we conclude that this addition would not hamper the performance of HASH_WALK.

2 months agoHash: fix buffer overflow in unit test
Igor Putovny [Wed, 11 Jun 2025 10:00:23 +0000 (12:00 +0200)] 
Hash: fix buffer overflow in unit test

This bug manifested itself as segmentation fault of t_insert2_find test when
TEST_ORDER was increased from 13 to 14. When checking the validity of filled
table, the table is iterated from 0 to MAX_NUM. However, when order is an even
number, the size of the table is lower than MAX_NUM (due to table resizing),
which caused reading beyond the allocated memory.

This bug does not apply to BIRD itself.

2 months agoROA Aggregator: Fix crash on multiwithdraw
Maria Matejka [Tue, 16 Sep 2025 10:04:21 +0000 (12:04 +0200)] 
ROA Aggregator: Fix crash on multiwithdraw

Theoretically, multiple withdraw from the best feed should never happen
but apparently there is an opportunity. We are unable to reproduce that
but it's obvious that with the old code, if the last ROA to remove is at
the end of the list, an undefined memory is checked. If it accidentally
matches (which seems to be pretty rare), BIRD may call memcpy() with
a negative length and subsequently crash on segfault.

Reported-By: NIX-CZ
2 months agoProtocol: State announcements must be always processed before leaving the loop
Katerina Kubecova [Thu, 18 Sep 2025 09:21:41 +0000 (11:21 +0200)] 
Protocol: State announcements must be always processed before leaving the loop

When using PROTO_LOCKED_FROM_MAIN or other birdloop_enter, there may be
deferred state announcements which have to be sent immediately,
otherwise the main loop would try to execute them out of the appropriate
locked context.

2 months agoProto: deferring start from proto_enable
Maria Matejka [Thu, 18 Sep 2025 10:43:44 +0000 (12:43 +0200)] 
Proto: deferring start from proto_enable

When the enable command is issued from CLI, we actually do not need
to enable the protocol right away, it's enough to run the rethink goal
function later from a deferred context. This allows us to change the
protocol's loop safely.

3 months agoBGP: Fixing an unlikely situation, when listening socket is created too late.
Katerina Kubecova [Thu, 4 Sep 2025 08:56:44 +0000 (10:56 +0200)] 
BGP: Fixing an unlikely situation, when listening socket is created too late.

closes #298

3 months agoNEWS and version update v3.1.3
Maria Matejka [Wed, 3 Sep 2025 14:16:43 +0000 (16:16 +0200)] 
NEWS and version update

3 months agoNest: Function aspa_check() should return ASPA_INVALID for paths containing AS_SET
Evann DREUMONT [Tue, 2 Sep 2025 14:23:34 +0000 (16:23 +0200)] 
Nest: Function aspa_check() should return ASPA_INVALID for paths containing AS_SET

The aspa_check() uses as_path_getlen() to estimate the size of a buffer,
which does not work for AS_SET segments, because as_path_getlen() returns
length 1 for them regardless of their length. This may cause buffer
overflow and crash.

As AS_SET segments are not valid for ASPA verification, we can just
handle them explicitly. See https://datatracker.ietf.org/doc/html/draft-ietf-sidrops-aspa-verification#section-6

Co-Authored-By: Alarig <alarig@swordarmor.fr>
Minor changes by committer.

3 months agoCI: Add test of user and groups before and after package installation
David Petera [Wed, 20 Aug 2025 14:45:06 +0000 (16:45 +0200)] 
CI: Add test of user and groups before and after package installation

Also fix typo and add more descriptive logging to installation test

3 months agoCI: Add debian trixie to pipeline
David Petera [Tue, 19 Aug 2025 16:05:22 +0000 (18:05 +0200)] 
CI: Add debian trixie to pipeline

3 months agoCI: Fix installation on newer debian-based distros
David Petera [Wed, 20 Aug 2025 16:04:37 +0000 (18:04 +0200)] 
CI: Fix installation on newer debian-based distros

Package 'adduser' needs to be installed explicitly

3 months agoCI: Limit log bloating for netlab runners
Maria Matejka [Thu, 19 Jun 2025 19:12:52 +0000 (21:12 +0200)] 
CI: Limit log bloating for netlab runners

There is no useful configurable file size limit for netlab, allowing
the job to eat up all the disk. Thus we limit it directly in the script
by setting ulimit -f to 1G.

3 months agoCI: Fix tests for merge requests
Maria Matejka [Thu, 12 Jun 2025 09:55:21 +0000 (11:55 +0200)] 
CI: Fix tests for merge requests

The branch name check needed to be extended to include merge requests.
Now for merge requests, we generate a fake branch name.

3 months agoCI: Fix netlab failure artifact collection
Maria Matejka [Thu, 12 Jun 2025 09:52:32 +0000 (11:52 +0200)] 
CI: Fix netlab failure artifact collection

When implementing artifact collection for netlab,
I forgot that the coredumps and logs are generated outside the
repository. Moving the artifacts to the right place for collection.

Introduced in 3d88a81f102783bd4af3d99db1e1f14d14050d6c.

3 months agoCI: Note on how to trigger image rebuild when adding new dockerfile.
Jana Babovakova [Tue, 27 May 2025 10:42:13 +0000 (12:42 +0200)] 
CI: Note on how to trigger image rebuild when adding new dockerfile.

3 months agoCI: Added Docker for Rocky Linux 8 and 9.
Jana Babovakova [Tue, 27 May 2025 10:34:45 +0000 (12:34 +0200)] 
CI: Added Docker for Rocky Linux 8 and 9.

Updated both to supported versions 8.10, 9.5.

6 months agoNEWS and version update v3.1.2
Maria Matejka [Mon, 26 May 2025 19:08:07 +0000 (21:08 +0200)] 
NEWS and version update

6 months agoTable: Do not attempt to prune an empty table
Maria Matejka [Sat, 24 May 2025 12:16:44 +0000 (14:16 +0200)] 
Table: Do not attempt to prune an empty table

Table pruning is requested from multiple places, including
a timer. Sometimes this may happen in a race condition with
table shutdown, and therefore we explicitly refuse to schedule
pruning if the table is empty.

Also added a full-blown check that a shutting-down table
is indeed empty, and several more asserts to catch imminent crashes
before they happen in hard-to-debug places.

This fixes #254.

6 months agoShutdown: Do not export routes
Maria Matejka [Fri, 23 May 2025 18:40:22 +0000 (20:40 +0200)] 
Shutdown: Do not export routes

When shutting down, the tables start flushing routes before all protocols
are even officially aware of the shutdown. This fix allows for a fast check
whether the shutdown is already running or not, and if so, all exports are
ignored instead of processing them.

One notable exception is the kernel protocol which needs to process all
the exports normally to actually withdraw the routes.

This is a hotfix for #251 and #252. Proper fix will require protocol
state machine refactoring.

6 months agoTable: fix a race condition in export
Maria Matejka [Fri, 23 May 2025 17:17:53 +0000 (19:17 +0200)] 
Table: fix a race condition in export

The race condition happens as follows:

- channel A starts feeding
- channel B imports a route ahead of the feeding pointer
- channel A exports this route and continues feeding from the pointer
- no other import hits this specific prefix
- there is at least one channel C which has not cleared this export
- channel A computes ecnt=0 for this prefix because all exports
  have been already cleared
- the condition e >= ecnt mistakenly triggers retry

If the birdloops involved get assigned to the same thread, this race
condition then can't recover and the thread is stuck in an infinite
loop.

Fixed the race condition by moving the consistency check after actually
checking eligibility of the export, not before.

Found by randomly observing performance tests.

6 months agoASPA: fix the table subscription
Maria Matejka [Wed, 21 May 2025 11:11:10 +0000 (13:11 +0200)] 
ASPA: fix the table subscription

With the partial reloads of ROA, the ASPA reload must be different.
When merging ASPA from 2.16, we forgot about that, and the ROA digesting
procedures simply do not work with ASPA, so we instead re-add the settle
timer back.

This fixes #237.

6 months agoASPA: fix aspa_check_upstream and aspa_check_downstream parse crash
Maria Matejka [Wed, 21 May 2025 11:53:35 +0000 (13:53 +0200)] 
ASPA: fix aspa_check_upstream and aspa_check_downstream parse crash

Due to internal differences between BIRD 2 and 3, there is
FI_CURRENT_ROUTE in BIRD 3 and `val.rte == NULL` is not supported
as a shortcut for fetching the route object.

When merging, we forgot to fix this difference in the BGP config parser,
thus the constant folder failed to recognize that this is not a constant
expression, leading to accidentally dereference the NULL route pointer
in config parse time.

This fixes #247.

6 months agoBGP: fix warnings for roa_check() with no import table and route refresh on
Maria Matejka [Wed, 21 May 2025 09:06:01 +0000 (11:06 +0200)] 
BGP: fix warnings for roa_check() with no import table and route refresh on

When roa_check() appears in import filters, the autoreload is switched
on but prohibited for BGP if no import table is available. By fixing the
route refresh feature in 9edc421148fe9c5e7d6038b667ba8fafb587a1eb, we
inadvertently exposed another bug where Nest wasn't distinguishing
between locally and remotely available reload.

Whereas on manual reconfiguration, the route refresh is expected to be
invoked, the autoreload should not trigger any remote actions. Therefore
now the channels actualy indicate whether their reload hook triggers
remote actions or not. This information can be then used to decide
whether to allow autoreload or not.

6 months agoAll events are required to have their hook
Maria Matejka [Wed, 21 May 2025 08:15:49 +0000 (10:15 +0200)] 
All events are required to have their hook

This is quite an obvious requirement but it wasn't enforced properly,
leading to unnecessarily tedious debugging when an uninitialized event
is improperly enqueued.

Now BIRD is going to crash as soon as somebody tries to enqueue such
an event, not when trying to execute nothing from a clean context.

Would have helped with #238.

6 months agoMRT: Fix typo in assert
Katerina Kubecova [Tue, 13 May 2025 08:43:17 +0000 (10:43 +0200)] 
MRT: Fix typo in assert

In mrt_cli_dump_done, BIRD 3 always crashed because the assert could
never be true by a typo.

6 months agoLogs: Reset found_old flags in struct log_config
Katerina Kubecova [Mon, 12 May 2025 14:43:36 +0000 (16:43 +0200)] 
Logs: Reset found_old flags in struct log_config

When recycling an existing configuration (configure undo), the found_old
flags were already set. Due to this oversight, log files failed to
reopen on configure undo.

This fixes #188.

6 months agoCI: Add package install tests.
David Petera [Wed, 7 May 2025 14:02:09 +0000 (16:02 +0200)] 
CI: Add package install tests.

We are checking that generated BIRD packages can be installed and run.
Communication between bird and birdc is also tested.

This fixes #202

6 months agoCI: added new ASPA tests.
Jana Babovakova [Fri, 23 May 2025 10:19:59 +0000 (12:19 +0200)] 
CI: added new ASPA tests.

6 months agoGitlab: fix cleanup after failed netlab
Maria Matejka [Thu, 22 May 2025 15:57:00 +0000 (17:57 +0200)] 
Gitlab: fix cleanup after failed netlab

I forgot to add cd command to move to the right directory.

6 months agoCI: Stayrtr binary has moved elsewhere
Maria Matejka [Thu, 22 May 2025 15:21:13 +0000 (17:21 +0200)] 
CI: Stayrtr binary has moved elsewhere

Installed our local version supporting RTRv2 and ASPA

6 months agoGitlab: properly cleanup after failed netlab jobs
Maria Matejka [Sat, 10 May 2025 18:17:34 +0000 (20:17 +0200)] 
Gitlab: properly cleanup after failed netlab jobs

Also keeps artifacts from failed netlab jobs to allow for
easier debugging

7 months agoNEWS and version update v3.1.1
Maria Matejka [Tue, 13 May 2025 15:31:42 +0000 (17:31 +0200)] 
NEWS and version update

7 months agoMakefile: Fix accidentally added dry-run markers
Maria Matejka [Tue, 13 May 2025 13:47:06 +0000 (15:47 +0200)] 
Makefile: Fix accidentally added dry-run markers

7 months agoCI: Add systemd installation to Fedora Dockerfiles and make exception in bird.spec...
David Petera [Wed, 7 May 2025 13:36:14 +0000 (15:36 +0200)] 
CI: Add systemd installation to Fedora Dockerfiles and make exception in bird.spec for CentOS and OpenSUSE distros.

7 months agoBGP: end of feeding MPLS channel must not try to schedule a packet
Maria Matejka [Sat, 10 May 2025 21:35:03 +0000 (23:35 +0200)] 
BGP: end of feeding MPLS channel must not try to schedule a packet

This caused a invalid memory use when reloading MPLS channels,
occasionally forcing BIRD to an endless loop due to invalid flag
in channel map.

7 months agoConf: Fix invalid check in text_or_ipa grammar
Ondrej Zajicek [Tue, 6 May 2025 12:50:53 +0000 (14:50 +0200)] 
Conf: Fix invalid check in text_or_ipa grammar

Can cause crash when a bad expression is used.

7 months agoGitlab: add NetBSD LTO disablement to the generator
Maria Matejka [Sat, 10 May 2025 13:21:08 +0000 (15:21 +0200)] 
Gitlab: add NetBSD LTO disablement to the generator

This fixes 083e70ba4ab3f21788160975c6f1cf40e3ebd4ce

7 months agoVersion script: fix detached mode
Maria Matejka [Sat, 10 May 2025 13:02:58 +0000 (15:02 +0200)] 
Version script: fix detached mode

7 months agoBuild: call tools/version with sh
xtex [Fri, 9 May 2025 11:14:50 +0000 (07:14 -0400)] 
Build: call tools/version with sh

As tools/version has a shebang line, it should be
fine to just call it without specifying bash.

Calling bash explicitly may lead to inconsistency,
as the first line of tools/version indicates /usr/bin/sh
but the script is always executed with bash.
And, it adds bash as a new build dependency.

Signed-off-by: xtex <xtexchooser@duck.com>
7 months agoDocs: added information about difference in export table usage on v2/3.
Jana Babovakova [Fri, 9 May 2025 14:40:34 +0000 (16:40 +0200)] 
Docs: added information about difference in export table usage on v2/3.

7 months agoBGP: Fix repeated route refresh request
Maria Matejka [Thu, 8 May 2025 21:03:57 +0000 (23:03 +0200)] 
BGP: Fix repeated route refresh request

The previous approach was crashing on rapid successions of route refreshs
without even completing the previous ones. Now the newly requested refreshs
just queue and don't start multiple refreshs over and over again.

7 months agoBGP: Fix route refresh behavior
Igor Putovny [Mon, 5 May 2025 13:47:10 +0000 (15:47 +0200)] 
BGP: Fix route refresh behavior

On import filter reconfiguration, the route refresh capability is now
honored and used instead of restarting the session.

On export filter reconfiguration, the enhanced route refresh capability
is used to indicate BoRR and EoRR, unless the export table is on. In
such cases, only relevant changes are sent as proper updates.

When route refresh request is received, the enhanced route refresh
capability is now honored.

Co-Authored-By: Maria Matejka <mq@ucw.cz>
7 months agoBGP: Fix reconfiguration of import behavior modifiers
Maria Matejka [Tue, 6 May 2025 17:54:11 +0000 (19:54 +0200)] 
BGP: Fix reconfiguration of import behavior modifiers

In case of aigp, gw mode and cost change, we need to reload routes
from the peer, and do that forcibly even if import table is on.

7 months agoDisable LTO for NetBSD. It crashes the compiler for whatever reason.
Igor Putovny [Fri, 9 May 2025 17:59:40 +0000 (19:59 +0200)] 
Disable LTO for NetBSD. It crashes the compiler for whatever reason.

7 months agoAdd configure option to independently enable/disable link-time optimization
Igor Putovny [Fri, 9 May 2025 17:56:24 +0000 (19:56 +0200)] 
Add configure option to independently enable/disable link-time optimization

7 months agoFix use-after-free in thread group reconfiguration
Maria Matejka [Fri, 9 May 2025 20:09:18 +0000 (22:09 +0200)] 
Fix use-after-free in thread group reconfiguration

If a thread group with no running threads is deconfigured,
it was freed before fetching the next node in the linked list.

This rare bug caused a crash in unit tests in OpenBSD.

7 months agoMerge remote-tracking branch 'origin/master' into thread-next
Maria Matejka [Thu, 8 May 2025 20:10:10 +0000 (22:10 +0200)] 
Merge remote-tracking branch 'origin/master' into thread-next

7 months agoMerge commit '823281066' into thread-next
Maria Matejka [Thu, 8 May 2025 19:57:33 +0000 (21:57 +0200)] 
Merge commit '823281066' into thread-next

7 months agoMerge commit '1acc79b75' into thread-next
Maria Matejka [Thu, 8 May 2025 19:52:15 +0000 (21:52 +0200)] 
Merge commit '1acc79b75' into thread-next

7 months agoMerge commit '9784c76c9' into thread-next
Maria Matejka [Thu, 8 May 2025 19:49:51 +0000 (21:49 +0200)] 
Merge commit '9784c76c9' into thread-next

7 months agoDoc: building singlepage version with the appropriate template
Maria Matejka [Sat, 25 Jan 2025 22:01:11 +0000 (23:01 +0100)] 
Doc: building singlepage version with the appropriate template

This change caters for the new website automation and allows for
future online display of documentation even for development versions.

7 months agoBGP: Fix crash on too long export
Maria Matejka [Wed, 7 May 2025 13:02:24 +0000 (15:02 +0200)] 
BGP: Fix crash on too long export

When BGP route is short enough to be accepted but too long after local
changes, it is converted to withdraw. In these cases though, there was
a dangling pointer left from the prefix structure to the attribute
bucket.

That pointer is now pointing at the right place after the bucket gets
converted to withdraw.

Thanks to ix.br for catching and reporting this issue.

7 months agoNetlink: Fix fix BSD error
Maria Matejka [Tue, 6 May 2025 16:30:39 +0000 (18:30 +0200)] 
Netlink: Fix fix BSD error

There was a typo in the previous commit, -> instead of .

7 months agoNetlink: Fix BSD build error
Katerina Kubecova [Tue, 22 Apr 2025 08:41:06 +0000 (10:41 +0200)] 
Netlink: Fix BSD build error

Due to missing autotests, we forgot to catch this place in Netlink code
which builds only for FreeBSD and not for Linux.

Caused by incomplete merge from master.

7 months agoMerge branch 'kk-3.1-merging' into thread-next
Maria Matejka [Tue, 6 May 2025 15:39:47 +0000 (17:39 +0200)] 
Merge branch 'kk-3.1-merging' into thread-next

7 months agoDocker: lost files for OpenSuse 15.4, 15.5
Jana Babovakova [Mon, 14 Apr 2025 13:41:46 +0000 (15:41 +0200)] 
Docker: lost files for OpenSuse 15.4, 15.5

7 months agoTable export: Drop redundant not-seen old route nullification
Katerina Kubecova [Wed, 23 Apr 2025 11:50:53 +0000 (13:50 +0200)] 
Table export: Drop redundant not-seen old route nullification

This piece of code was accidentally reintroduced in
da838bca052b3b1e5533e2900299b4140e2d5d13 CLI: fix channel stats display

and not only is obviously not relevant to that commit, it is also
obviously wrong because exactly the same nullification has been pushed
later to rt_notify_basic().

7 months agoNEWS and version update v2.17.1
Maria Matejka [Tue, 29 Apr 2025 18:30:45 +0000 (20:30 +0200)] 
NEWS and version update

7 months agoTag checking
Maria Matejka [Tue, 29 Apr 2025 08:03:14 +0000 (10:03 +0200)] 
Tag checking

Adding a script to gather all information about the current release and
confirm that it is indeed ready for departure.

7 months agoCI: Checking that the reported version is actually the built one
Maria Matejka [Thu, 24 Apr 2025 19:06:27 +0000 (21:06 +0200)] 
CI: Checking that the reported version is actually the built one

7 months agoCI: Packages are built from the single release tgz package
Maria Matejka [Thu, 24 Apr 2025 18:46:34 +0000 (20:46 +0200)] 
CI: Packages are built from the single release tgz package

7 months agoCI: Tasks generated from a data file and template
Maria Matejka [Sat, 19 Apr 2025 18:11:02 +0000 (20:11 +0200)] 
CI: Tasks generated from a data file and template

Instead of directly editing .gitlab-ci.yml, the pipeline definition is
generated by a script from a much shorter file defining the required
tests, and templated.

7 months agoVersion and release scripting
Maria Matejka [Mon, 14 Apr 2025 13:14:05 +0000 (15:14 +0200)] 
Version and release scripting

Version number moved to a separate file as a primary source of truth.

Added tools/release-commit to make the release process a little bit faster.

Fixes #218

7 months agoCI: Immediately fail if WIP commits pushed to a stable branch
Maria Matejka [Sat, 12 Apr 2025 19:13:19 +0000 (21:13 +0200)] 
CI: Immediately fail if WIP commits pushed to a stable branch

7 months agoCI: no pipeline for WIP commits
Maria Matejka [Fri, 11 Apr 2025 19:47:45 +0000 (21:47 +0200)] 
CI: no pipeline for WIP commits

We'd like to encourage team members to push WIP work to Gitlab. Such
work often fails to build and therefore we run no tests for these
branches.

7 months agoBGP: Update obsolete RFC 8203 to newer RFC 9003
Ondrej Zajicek [Sat, 26 Apr 2025 22:48:29 +0000 (00:48 +0200)] 
BGP: Update obsolete RFC 8203 to newer RFC 9003

7 months agoBSD: Silence some warnings
Ondrej Zajicek [Fri, 25 Apr 2025 17:02:11 +0000 (19:02 +0200)] 
BSD: Silence some warnings

7 months agoBSD: Fix build on NetBSD
Ondrej Zajicek [Fri, 25 Apr 2025 16:29:28 +0000 (18:29 +0200)] 
BSD: Fix build on NetBSD

Newer NetBSD versions removed RTF_LLINFO and added RTF_LLDATA.
In FreeBSD, RTF_LLINFO is obsolete, but still defined.

7 months agoCI: Add builds on new NetBSD workers
Ondrej Zajicek [Thu, 24 Apr 2025 15:04:15 +0000 (17:04 +0200)] 
CI: Add builds on new NetBSD workers

7 months agoBGP: Fix crash when incoming connection for disabled protocol arrives
Ondrej Zajicek [Thu, 24 Apr 2025 01:01:19 +0000 (03:01 +0200)] 
BGP: Fix crash when incoming connection for disabled protocol arrives

The function bgp_find_proto() may return a protocol in DOWN state, but
ao.keys (as most protocol data) are only valid in non-DOWN state.

7 months agoTable export: ignoring invalid routes before marking them in export maps
Maria Matejka [Mon, 10 Mar 2025 19:20:32 +0000 (20:20 +0100)] 
Table export: ignoring invalid routes before marking them in export maps

Fast subsequent updates on filtered routes made the code crash because
no flags were set while ignoring them. And if these routes flapped, the
squashed export update crashed on a consistency check.

We ignore them unconditionally so we don't have to mark them at all and
we can convert them to NULL even before export maps are touched.

7 months agoTable export: consider route never seen before actually nonexistent
Maria Matejka [Mon, 10 Mar 2025 14:58:33 +0000 (15:58 +0100)] 
Table export: consider route never seen before actually nonexistent

This may trigger some spurious warnings.

7 months agoFix crash on graceful restart of a channel with ROA subscription
Maria Matejka [Mon, 10 Mar 2025 18:57:39 +0000 (19:57 +0100)] 
Fix crash on graceful restart of a channel with ROA subscription

Reported by NIX-CZ, thanks!

7 months agoSilence some warnings
Ondrej Zajicek [Wed, 23 Apr 2025 01:53:56 +0000 (03:53 +0200)] 
Silence some warnings

7 months agoCI: Add builds on new OpenBSD workers
Ondrej Zajicek [Tue, 22 Apr 2025 13:46:34 +0000 (15:46 +0200)] 
CI: Add builds on new OpenBSD workers

7 months agoMerge remote-tracking branch 'origin/master' into thread-next
Maria Matejka [Thu, 17 Apr 2025 17:32:34 +0000 (19:32 +0200)] 
Merge remote-tracking branch 'origin/master' into thread-next

7 months agoCI: Add FreeBSD 14 and netlink builds for FreeBSD 13 and 14.
Jana Babovakova [Mon, 14 Apr 2025 13:29:58 +0000 (15:29 +0200)] 
CI: Add FreeBSD 14 and netlink builds for FreeBSD 13 and 14.