]> git.ipfire.org Git - thirdparty/bird.git/log
thirdparty/bird.git
2 weeks agoMerge branch '280-mq-nexthop' into HEAD thread-next
Maria Matejka [Fri, 18 Jul 2025 11:18:36 +0000 (13:18 +0200)] 
Merge branch '280-mq-nexthop' into HEAD

2 weeks agoBGP: Reintroduce channel reload message on forced route refresh
Maria Matejka [Thu, 17 Jul 2025 17:11:25 +0000 (19:11 +0200)] 
BGP: Reintroduce channel reload message on forced route refresh

When reconfiguration needs a forced route refresh because of
changed protocol/channel parameters, log the same message
as v2 does.

2 weeks agoMerge remote-tracking branch 'origin/master' into thread-next
Maria Matejka [Fri, 18 Jul 2025 11:17:54 +0000 (13:17 +0200)] 
Merge remote-tracking branch 'origin/master' into thread-next

2 weeks agoCI: Autotests for BGP setting changes
Maria Matejka [Thu, 17 Jul 2025 22:19:14 +0000 (00:19 +0200)] 
CI: Autotests for BGP setting changes

There are actually 144 test variants. Choosing 12 of them, such that:

- m2 may request no RR, basic RR or enhanced RR
- m2 may have any combination of import and export table
- import and export table settings for m1 are pseudorandomized
- the same for multiple variants how to get basic RR negotiated

This should cover all the code with not too much resource consumption.

Implements #239.

2 weeks agoBGP: restart on outgoing next hop setting change
Maria Matejka [Wed, 25 Jun 2025 11:00:11 +0000 (13:00 +0200)] 
BGP: restart on outgoing next hop setting change

When next hop self / keep / address changed, BGP only reloaded
the exports but it didn't apply the changes. To fix this problem
before actually implementing a proper change detection algorithm,
we restart the protocol if this setting changes.

Fixes #280.

5 weeks agoFilter: Add more tests for append operator oz-test
Ondrej Zajicek [Tue, 1 Jul 2025 14:43:18 +0000 (16:43 +0200)] 
Filter: Add more tests for append operator

5 weeks agoFilter: Add 'append' operator oz-append
Ondrej Zajicek [Tue, 3 Jun 2025 02:04:47 +0000 (04:04 +0200)] 
Filter: Add 'append' operator

We need append() operator to concatenate strings / bytestrings.
Can be also written as '++', (e.g. "abcd" ++ "1234").

5 weeks agoMerge remote-tracking branch 'origin/master' into HEAD
Maria Matejka [Mon, 30 Jun 2025 07:11:06 +0000 (09:11 +0200)] 
Merge remote-tracking branch 'origin/master' into HEAD

5 weeks agoCI: adding tests cf-bgp-unnumbered and cf-bgp-error-states
Maria Matejka [Sun, 29 Jun 2025 18:14:31 +0000 (20:14 +0200)] 
CI: adding tests cf-bgp-unnumbered and cf-bgp-error-states

The unnumbered test checks the onlink neighbor scenarios,
and the cf-bgp-error-states checks a regression for BIRD 3
where BGP crashed when listening socket failed to bind.

5 weeks agoBGP: Fix crash on listening socket failure
Maria Matejka [Sun, 29 Jun 2025 16:56:27 +0000 (18:56 +0200)] 
BGP: Fix crash on listening socket failure

In that specific case, bgp_stop() runs from the main loop, effectively
causing the deferred state announcement to run from a bad context.
Fixed by forcibly announcing the state immediately.

5 weeks agoMerge remote-tracking branch 'origin/master' into thread-next
Maria Matejka [Fri, 27 Jun 2025 17:44:35 +0000 (19:44 +0200)] 
Merge remote-tracking branch 'origin/master' into thread-next

5 weeks agoMerge commit '249ea3c' into thread-next
Maria Matejka [Fri, 27 Jun 2025 17:42:48 +0000 (19:42 +0200)] 
Merge commit '249ea3c' into thread-next

5 weeks agoMerge commit '0178afda' into thread-next
Maria Matejka [Fri, 27 Jun 2025 17:42:05 +0000 (19:42 +0200)] 
Merge commit '0178afda' into thread-next

5 weeks agoMerge commit 'f11f15e82' into thread-next
Maria Matejka [Fri, 27 Jun 2025 17:41:35 +0000 (19:41 +0200)] 
Merge commit 'f11f15e82' into thread-next

5 weeks agoBGP: Allow onlink neighbors
Maria Matejka [Thu, 19 Jun 2025 16:57:15 +0000 (18:57 +0200)] 
BGP: Allow onlink neighbors

In certain scenarios, the direct neighbor is not inside any prefix
assigned to the appropriate interface. There is a route for that address
pointing to that interface, though.

In such cases, the user may specify the neighbor as onlink, effectively
disabling the prefix check and trying to connect immediately. It is
expected that the operator ensures that the neighbor is indeed there.

6 weeks agoCI: Limit log bloating for netlab runners mq-pin-apkg
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.

6 weeks agoCI: Pinned apkg version to 0.5.1 until 0.6.0 is fixed
Maria Matejka [Thu, 19 Jun 2025 19:03:27 +0000 (21:03 +0200)] 
CI: Pinned apkg version to 0.5.1 until 0.6.0 is fixed

This workarounds packaging/apkg#114.

6 weeks agoCI: split make gitlab to local and venv variant
Maria Matejka [Thu, 19 Jun 2025 16:40:23 +0000 (18:40 +0200)] 
CI: split make gitlab to local and venv variant

If you prefer to install python3-jinja2 and pyaml yourself,
run gitlab-local. If you prefer the thing to create a venv
and pip3 all the dependencies, run gitlab-venv.

7 weeks agoDoc: Fix documentation for "next hop prefer" ip-bgp-next-hop-prefer-local
Igor Putovny [Fri, 30 May 2025 16:08:46 +0000 (18:08 +0200)] 
Doc: Fix documentation for "next hop prefer"

7 weeks agoBGP: Add option "next hop prefer local" and use it in direct mode of next hop computation
Igor Putovny [Thu, 29 May 2025 15:55:49 +0000 (17:55 +0200)] 
BGP: Add option "next hop prefer local" and use it in direct mode of next hop computation

7 weeks agoRIP: fix split horizon instability
Maria Matejka [Tue, 17 Jun 2025 14:09:45 +0000 (16:09 +0200)] 
RIP: fix split horizon instability

When split horizon is active (by default), RIP withdraws routes from
these neighbors which have sent the best route to us. This helps with
reducing routing loops. When ECMP is on (by default), RIP behaves this
way only to the first neighbor in the list.

In BIRD 2, the neighbors were first sorted and then the first one was
chosen. This was lost in BIRD 3 and the first neighbor in the unsorted
list was considered instead.

The overall result in routing does not change so this is not technically
a bug and should not result in misrouting. The final result is unstable
and time-sensitive though, making debugging harder and automatic tests
fail.

We are rectifying this to be stable again so that our tests may get
green again.

Fixes: #284
Reproduced-By: David Petera while checking RIP in VRFs
Identified-By: Ondrej Zajicek
7 weeks agoCLI: Add missing semicolon for option RESTRICT 241-bgp-improve-next-hop-prefer-option-2
Vojtech Vilimek [Tue, 17 Jun 2025 13:34:43 +0000 (15:34 +0200)] 
CLI: Add missing semicolon for option RESTRICT

7 weeks agoCLI: Fix memory leak in cli_listen (fixes #285)
Vojtech Vilimek [Tue, 17 Jun 2025 13:22:58 +0000 (15:22 +0200)] 
CLI: Fix memory leak in cli_listen (fixes #285)

7 weeks agoPipe: Fix inconsistency caused by rare pipe collision
Maria Matejka [Fri, 13 Jun 2025 18:37:16 +0000 (20:37 +0200)] 
Pipe: Fix inconsistency caused by rare pipe collision

When two different pipes modify the same route in two different ways
and both results are attempted to be imported into the same table,
the table complains and should ignore the whole update. Yet it did so
only if the routes were identical (which was also tested previously).

Instead of ignoring, this routine replaced the original route with the
new one from another sender which caused a discrepancy in counters in
the original sender and later crash on failed consistency check.

Discovered randomly when trying to reproduce another bug and
accidentally doing exactly this sequence of pipe collision and
then reconfiguration to rectify the collision by removing the pipe
altogether.

Fixes: #282
7 weeks agoMerge remote-tracking branch 'origin/master' into thread-next
Maria Matejka [Sat, 14 Jun 2025 20:05:25 +0000 (22:05 +0200)] 
Merge remote-tracking branch 'origin/master' into thread-next

7 weeks agoDoc: Adding info on backported options to 2->3 migration guide
Maria Matejka [Sat, 14 Jun 2025 20:03:07 +0000 (22:03 +0200)] 
Doc: Adding info on backported options to 2->3 migration guide

7 weeks agoMerge remote-tracking branch 'origin/master' into thread-next
Maria Matejka [Sat, 14 Jun 2025 12:57:45 +0000 (14:57 +0200)] 
Merge remote-tracking branch 'origin/master' into thread-next

7 weeks agoCI: add cf-pipe-collision test 37-add-asserts-to-hash-lib-to-inhibit-modifications-when-walking 37-add-asserts-to-hash-lib-to-inhibit-modifications-when-walking-2 37-add-asserts-to-hash-lib-to-inhibit-modifications-when-walking-3
Maria Matejka [Fri, 13 Jun 2025 18:34:59 +0000 (20:34 +0200)] 
CI: add cf-pipe-collision test

7 weeks agoCLI: fix display of ambiguos command options listing 279-mq-command-expansion-fix
Maria Matejka [Fri, 13 Jun 2025 08:02:07 +0000 (10:02 +0200)] 
CLI: fix display of ambiguos command options listing

When fixing display of two-command help messages, we failed to test that
all the CLI functions still do work as expected.

Fixes: #279
Introduced-In: 457c10267054b999b188164dbf6bc5975838dd31
Reported-By: Артём Варакса <varaksaaa@basealt.ru>
7 weeks 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.

7 weeks 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.

7 weeks agoBGP: Disallow AS Sets by default (documentation)
Maria Matejka [Thu, 12 Jun 2025 18:57:19 +0000 (20:57 +0200)] 
BGP: Disallow AS Sets by default (documentation)

The documentation needed to be updated as well to be consistent
with the code.

Related to #248.

7 weeks agoBGP: Disallow AS Sets by default
Igor Putovny [Mon, 2 Jun 2025 11:44:42 +0000 (13:44 +0200)] 
BGP: Disallow AS Sets by default

For a long time, AS Sets have been considered obsolete
but they were still valid by the original RFC. Recently,
RFC 9774 flipped this and AS Sets are now formally deprecated.

Therefore, all BGP sessions will now by default reject routes
containing AS Sets in their AS Paths. If you want to keep the
old behavior, you may simply state

    allow as set;

in every BGP protocol configuration where you want to accept AS Sets.

This closes #248.

7 weeks agoDoc: Migration guide updated about onlink and from route attributes
Maria Matejka [Thu, 12 Jun 2025 08:49:13 +0000 (10:49 +0200)] 
Doc: Migration guide updated about onlink and from route attributes

The onlink route attribute has been fixed.

The from route attribute changed behavior slightly
between BIRD 2 and 3 so it is now described in the
migration guide.

Related to #258 and #262.

8 weeks agoMerge remote-tracking branch 'origin/master' into thread-next
Ondrej Zajicek [Tue, 10 Jun 2025 15:10:24 +0000 (17:10 +0200)] 
Merge remote-tracking branch 'origin/master' into thread-next

2 months agoCI: Add tests rip-vrf, ibgp-bfd-auth, ebgp-bfd-auth
Ondrej Zajicek [Thu, 5 Jun 2025 15:29:39 +0000 (17:29 +0200)] 
CI: Add tests rip-vrf, ibgp-bfd-auth, ebgp-bfd-auth

2 months agoBGP: Restart if route refresh is impossible on attribute change
Maria Matejka [Wed, 4 Jun 2025 12:53:36 +0000 (14:53 +0200)] 
BGP: Restart if route refresh is impossible on attribute change

In previous commit, we force route refresh when some protocol attributes
change. Yet, when the neighbor doesn't support route refresh, we have to
restart the session, not send an unsupported request.

Note: if the neighbor is restarting right now with graceful restart
enabled, we keep the stale routes until the neighbor converges again.

Related to #268

2 months agoBGP: Do route refresh after preference change
Ondrej Zajicek [Tue, 3 Jun 2025 14:56:41 +0000 (16:56 +0200)] 
BGP: Do route refresh after preference change

Reconfiguration of preference is handled by nest code by asking for
reload, but in case of BGP with import table, that just reloaded routes
with the old preference. In BGP, we can handle that by triggering full
route refresh.

Although, it would be probably better to set preference in nest, when
a route is propagated from the import table.

2 months agoNest: Fix route update after preference change 241-bgp-improve-next-hop-prefer-option 248-bgp-reject-as-sets-by-default 270-reject-configuration-with-secondary-and-add-paths-tx-together
Ondrej Zajicek [Thu, 29 May 2025 15:34:35 +0000 (17:34 +0200)] 
Nest: Fix route update after preference change

The route preference was ignored in route comparison, therefore if
a protocol changed it and then reloaded routes, they were ignored
and routes with the old prefernce were kept.

The bug was introduced 5 years ago, when preference was moved from
struct rte to struct rta.

2 months agoMerge remote-tracking branch 'origin/master' into thread-next
Maria Matejka [Wed, 28 May 2025 13:28:11 +0000 (15:28 +0200)] 
Merge remote-tracking branch 'origin/master' into thread-next

2 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.

2 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.

2 months agoFilters: Re-enabling onlink nexthop attribute
Maria Matejka [Tue, 27 May 2025 08:58:23 +0000 (10:58 +0200)] 
Filters: Re-enabling onlink nexthop attribute

There are still some semantic problems wrt. VRF settings,
effectively allowing botched nexthops to slip through filters,
but it makes more sense to re-enable onlink setting, than
to wait until we find out how to do that all properly.

This resolves #258.

2 months 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.

2 months agoBabel: move into its own loop
Katerina Kubecova [Fri, 25 Apr 2025 14:19:25 +0000 (16:19 +0200)] 
Babel: move into its own loop

This closes #149.

2 months agoRIP: move to its own loop
Katerina Kubecova [Fri, 9 May 2025 10:21:20 +0000 (12:21 +0200)] 
RIP: move to its own loop

This closes #147.

2 months agoOSPF: move to its own loop
Katerina Kubecova [Fri, 9 May 2025 12:29:10 +0000 (14:29 +0200)] 
OSPF: move to its own loop

This closes #146.

2 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.

2 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.

2 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.

2 months agoMerge remote-tracking branch 'origin/master' into thread-next
Maria Matejka [Fri, 23 May 2025 13:54:55 +0000 (15:54 +0200)] 
Merge remote-tracking branch 'origin/master' into thread-next

2 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.

2 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.

2 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.

2 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.

2 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

2 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.

2 months agoMerge remote-tracking branch 'origin/master' into mq-merge-master
Maria Matejka [Fri, 23 May 2025 13:03:16 +0000 (15:03 +0200)] 
Merge remote-tracking branch 'origin/master' into mq-merge-master

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

2 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.

2 months agoMerge branch 'master' into thread-next
Maria Matejka [Thu, 22 May 2025 15:30:11 +0000 (17:30 +0200)] 
Merge branch 'master' into thread-next

2 months agoMerge branch 'master' (early part) into thread-next
Maria Matejka [Thu, 22 May 2025 15:30:04 +0000 (17:30 +0200)] 
Merge branch 'master' (early part) into thread-next

2 months agoMerge commit '14cf8454' into thread-next
Maria Matejka [Thu, 22 May 2025 15:27:28 +0000 (17:27 +0200)] 
Merge commit '14cf8454' into thread-next

2 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

2 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

2 months agoBGP: Improve log messages in reconfiguration
Ondrej Zajicek [Thu, 22 May 2025 12:55:35 +0000 (14:55 +0200)] 
BGP: Improve log messages in reconfiguration

Use separate messages for import / export reload triggered by
reconfiguration.

2 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.

2 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.

2 months agoConf: Silence grammar conflict warning
Ondrej Zajicek [Wed, 21 May 2025 15:02:28 +0000 (17:02 +0200)] 
Conf: Silence grammar conflict warning

There is one harmless grammar ambiquity that is hard to avoid, so let
just document it and silence it.

2 months agoBGP: Minor refactoring of capability write
Ondrej Zajicek [Tue, 20 May 2025 16:44:40 +0000 (18:44 +0200)] 
BGP: Minor refactoring of capability write

2 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

2 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.

2 months agoMerge branch 'master' into thread-next oz-test3
Ondrej Zajicek [Sun, 11 May 2025 00:00:04 +0000 (02:00 +0200)] 
Merge branch 'master' into thread-next

2 months agoNest: Improve grammar rule for interface patterns
Ondrej Zajicek [Sat, 10 May 2025 02:30:17 +0000 (04:30 +0200)] 
Nest: Improve grammar rule for interface patterns

Interface options should allow constants/expressions for name patterns.

Thanks to Arnaud Gomes-do-Vale for the bugreport.

2 months agoStatic: Improve grammar rule for static route next hops
Ondrej Zajicek [Fri, 9 May 2025 16:51:54 +0000 (18:51 +0200)] 
Static: Improve grammar rule for static route next hops

Static routes should allow constants/expressions for interface names in
next hops.

2 months agoConf: Fix cases where lexer tokens are used instead of parser rules
Ondrej Zajicek [Fri, 9 May 2025 16:26:15 +0000 (18:26 +0200)] 
Conf: Fix cases where lexer tokens are used instead of parser rules

2 months agoConf: Switch options should use boolean values
Ondrej Zajicek [Fri, 9 May 2025 13:38:31 +0000 (15:38 +0200)] 
Conf: Switch options should use boolean values

Fix switch options to use boolean constants and expressions intead of
integer ones. Still allow integer values with deprecation warning.

Also, allow true/false in addition to on/off and yes/no.

2 months agoConf: Improve parsing of config datatypes
Ondrej Zajicek [Fri, 9 May 2025 12:53:58 +0000 (14:53 +0200)] 
Conf: Improve parsing of config datatypes

Parser rules for configuration datatypes were inconsistent about whether
they accept literals, constants, or expressions. We should accept each
of these three everywhere.

The patch also simplifies the grammar, makes it more uniform, and adds
some documentation about that.

2 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.

2 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 9bb8c0945e39b43dcef02934fe9cf6baa816f5b0

2 months agoMerge branch 'master' into thread-next
Maria Matejka [Sat, 10 May 2025 13:06:00 +0000 (15:06 +0200)] 
Merge branch 'master' into thread-next

2 months agoVersion script: fix detached mode stable-v2.17
Maria Matejka [Sat, 10 May 2025 13:02:58 +0000 (15:02 +0200)] 
Version script: fix detached mode

2 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>
2 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.

2 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.

2 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>
2 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.

2 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.

2 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.

2 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

2 months agoFix TCP AO keys dump to dump sockets from all loops
Katerina Kubecova [Mon, 14 Apr 2025 12:01:17 +0000 (14:01 +0200)] 
Fix TCP AO keys dump to dump sockets from all loops

The AO keys dump changes frequently and we don't always get
a notification when the relevant data changes. With that, we have to
send an event to each single birdloop to request the dump, and wait for
it all to complete.

This may take a long time but it is accurate.

2 months agoSockets: Make dump sockets dump all sockets again
Katerina Kubecova [Thu, 3 Apr 2025 14:54:16 +0000 (16:54 +0200)] 
Sockets: Make dump sockets dump all sockets again

Only sockets in main birdloop were dumped. Now, all sockets are dumped.
Because of serialization problems, socket dump is cached for each birdloop
and it is continuously updated. These cached dumps are then just
collected and written out without actually looking at the live data.

2 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

2 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

2 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

2 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

2 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.

2 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.

3 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 .

3 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.