]> git.ipfire.org Git - thirdparty/bird.git/log
thirdparty/bird.git
7 months agolockfree.c: Solution for lfjour_cleanup_hook() too often scheduling. This function... lfjour-cleanup-optimize
Katerina Kubecova [Fri, 6 Dec 2024 12:16:18 +0000 (13:16 +0100)] 
lockfree.c: Solution for lfjour_cleanup_hook() too often scheduling. This function was scheduled each time any of the journal recipients
reached end of a block of journal items or read all of journal items. lfjour_cleanup_hook() can clean only journal items every recipient has processed,
so it was often called uselessly.

This commit restricts most of the unusefull scheduling. Only some consumers are given a token alowing them to try to schedule the lfjour_cleanup_hook().
When a consumer wants to schedule the lfjour_cleanup_hook(), it checks whether it has a token. If yes, it decrements number of tokens the journal has given (issued_tokens)
and discards its own token. If issued_tokens reaches zero, the consumer is allowed do schedule the lfjour_cleanup_hook().

There is a maximum number of tokens a journal can give to its customers (max_tokens). A new customer is given a token in its init, if the maximum number of tokens was not reached.
The rest of tokens is given to customers in lfjour_cleanup_hook(). In lf_jour_cleanup_hook(), it is increased the issued_tokens number in order not to call the hook
before it finishes. Then, tokens are given to the slowest recipients (but never to more than max_token recipients). Before leaving lfjour_cleanup_hook(),
the issued_tokens number is decreased. If no other tokens are given, we have to make sure the lfjour_cleanup_hook will be called again. If every item in journal
was read by every recipient, tokens are given to random recipients. If all recipients with tokens managed to finish until now, we give the token to first
unfinished customer we find or we call the hook again.

7 months agoNest: fixed a race-condition between import and export
Maria Matejka [Tue, 10 Dec 2024 09:52:52 +0000 (10:52 +0100)] 
Nest: fixed a race-condition between import and export

There was a leaking stack pointer to the global memory.
Fixed by making that temporary structure thread local static.

7 months agoBMP: Dropped remnants of unused channels
Maria Matejka [Thu, 5 Dec 2024 14:07:56 +0000 (15:07 +0100)] 
BMP: Dropped remnants of unused channels

7 months agoBMP: refactored lists and table locks to tlists
Maria Matejka [Thu, 5 Dec 2024 13:59:54 +0000 (14:59 +0100)] 
BMP: refactored lists and table locks to tlists

7 months agoBMP: protocol state ingestion refactoring
Maria Matejka [Thu, 5 Dec 2024 11:12:34 +0000 (12:12 +0100)] 
BMP: protocol state ingestion refactoring

8 months agoBMP: Tamed a TX buffer warning
Maria Matejka [Wed, 4 Dec 2024 09:16:42 +0000 (10:16 +0100)] 
BMP: Tamed a TX buffer warning

8 months agoMerge commit 'a47704a53db4f088e52e43f8b24785e5777ce147' into thread-next
Ondrej Zajicek [Tue, 3 Dec 2024 18:40:21 +0000 (19:40 +0100)] 
Merge commit 'a47704a53db4f088e52e43f8b24785e5777ce147' into thread-next

8 months agoMerge commit '73e7d3f5cede2e72eb9e77d61424a8c443672c09' into thread-next
Ondrej Zajicek [Tue, 3 Dec 2024 18:00:05 +0000 (19:00 +0100)] 
Merge commit '73e7d3f5cede2e72eb9e77d61424a8c443672c09' into thread-next

8 months agoMerge commit '5205ff97448cc34cf7334e90172c28eb48f227f2' into thread-next
Ondrej Zajicek [Tue, 3 Dec 2024 17:48:20 +0000 (18:48 +0100)] 
Merge commit '5205ff97448cc34cf7334e90172c28eb48f227f2' into thread-next

8 months agoMerge commit 'e6a100b31a7637ee739338e4b933367707ec931f' into thread-next
Ondrej Zajicek [Tue, 3 Dec 2024 17:22:14 +0000 (18:22 +0100)] 
Merge commit 'e6a100b31a7637ee739338e4b933367707ec931f' into thread-next

8 months agoMerge commit '460321cfe979459e3b78ba87694f29865d321612' into thread-next
Ondrej Zajicek [Tue, 3 Dec 2024 14:45:25 +0000 (15:45 +0100)] 
Merge commit '460321cfe979459e3b78ba87694f29865d321612' into thread-next

8 months agoBMP: Refactor route monitor message serialization
Ondrej Zajicek [Sun, 1 Dec 2024 23:00:36 +0000 (00:00 +0100)] 
BMP: Refactor route monitor message serialization

Instead of several levels of functions, just have two functions
(one for routes, the other for end-of-rib), this allows to create
messages in a simple linear fashion.

Also reduce three duplicite functions to construct BGP header for
BMP messages to just one.

8 months agoBMP: Refactor computation of message length
Ondrej Zajicek [Sun, 1 Dec 2024 21:54:11 +0000 (22:54 +0100)] 
BMP: Refactor computation of message length

Fill message length after the message is created instead of computing
it beforehand. Also rename some functions to fit common pattern.

8 months agoBMP: Refactor per-peer header arguments
Ondrej Zajicek [Sun, 1 Dec 2024 19:56:53 +0000 (20:56 +0100)] 
BMP: Refactor per-peer header arguments

Put all arguments for per-peer header into one structure instead of
passing them around as a lump of arguments. Also simplify code for
peer flags.

8 months agoBMP: simplified update queuing and better memory performance
Maria Matejka [Tue, 17 Sep 2024 14:27:54 +0000 (16:27 +0200)] 
BMP: simplified update queuing and better memory performance

This commit is quite a substantial rework of the underlying layers in
BMP TX:

- several unnecessary layers of indirection dropped, including most of
  the original BMP's buffer machinery
- all messages are now written directly into one protocol's buffer
  allocated for the whole time big enough to fit every possible message
- output blocks are allocated by pages and immediately returned when
  used, improving the overall memory footprint
- no intermediary allocation is done from the heap altogether
- there is a documented and configurable limit on the TX queue size

8 months agoFormatting numbers with order prefixes
Maria Matejka [Thu, 28 Nov 2024 22:08:50 +0000 (23:08 +0100)] 
Formatting numbers with order prefixes

Unit tests by Ondrej Zajicek.

8 months agoBMP: drop an unused mempool
Maria Matejka [Tue, 17 Sep 2024 13:59:07 +0000 (15:59 +0200)] 
BMP: drop an unused mempool

8 months agoMerge commit '3ca6e03d' into thread-merge-2.16
Maria Matejka [Fri, 29 Nov 2024 11:07:10 +0000 (12:07 +0100)] 
Merge commit '3ca6e03d' into thread-merge-2.16

8 months agoMerge commit 'fc2b4b26' into thread-merge-2.16
Maria Matejka [Fri, 29 Nov 2024 11:05:40 +0000 (12:05 +0100)] 
Merge commit 'fc2b4b26' into thread-merge-2.16

Actually, completely rewritten the original patch as in v3, the logging
initialization is much more complex and requires allocation.

This way, to bootstrap properly, the logger has a pre-defined log target
to stderr.

8 months agoMerge commit '997d2f57' into thread-merge-2.16
Maria Matejka [Fri, 29 Nov 2024 10:43:49 +0000 (11:43 +0100)] 
Merge commit '997d2f57' into thread-merge-2.16

8 months agoMerge commit '49be4a03' into thread-merge-2.16
Maria Matejka [Fri, 29 Nov 2024 10:30:59 +0000 (11:30 +0100)] 
Merge commit '49be4a03' into thread-merge-2.16

8 months agoConf: build fix for older bisons
Maria Matejka [Fri, 29 Nov 2024 10:27:30 +0000 (11:27 +0100)] 
Conf: build fix for older bisons

Typed blocks are probably a too new extension to rely on.

8 months agoMerge commit '82d57fb7' into thread-merge-2.16
Maria Matejka [Fri, 29 Nov 2024 10:26:18 +0000 (11:26 +0100)] 
Merge commit '82d57fb7' into thread-merge-2.16

8 months agoMerge commit '38195ac6' into thread-merge-2.16
Maria Matejka [Fri, 29 Nov 2024 09:49:53 +0000 (10:49 +0100)] 
Merge commit '38195ac6' into thread-merge-2.16

8 months agoMerge commit 'c7e843c1' into thread-merge-2.16
Maria Matejka [Fri, 29 Nov 2024 09:28:19 +0000 (10:28 +0100)] 
Merge commit 'c7e843c1' into thread-merge-2.16

8 months agoMerge commit '294d363d' into thread-merge-2.16
Maria Matejka [Fri, 29 Nov 2024 09:26:52 +0000 (10:26 +0100)] 
Merge commit '294d363d' into thread-merge-2.16

8 months agoMerge commit '1002c35b' into thread-merge-2.16
Maria Matejka [Fri, 29 Nov 2024 09:25:59 +0000 (10:25 +0100)] 
Merge commit '1002c35b' into thread-merge-2.16

8 months agoMerge commit '80ca0ed2' into thread-merge-2.16
Maria Matejka [Fri, 29 Nov 2024 08:51:38 +0000 (09:51 +0100)] 
Merge commit '80ca0ed2' into thread-merge-2.16

Fixed a nasty merge conflict with bgp_origin serving double duty
as both an attribute and enum name.

8 months agoRPKI: refactored pdu to host byte order conversion
Maria Matejka [Thu, 28 Nov 2024 13:10:40 +0000 (14:10 +0100)] 
RPKI: refactored pdu to host byte order conversion

We shouldn't convert bytes 2 and 3 of the PDU blindly, there are several
cases where these are used by bytes. Instead, the conversion is done
only where needed.

This fixes misinterpretation bug of ASPA PDU flags on little endian
architectures.

8 months agoMerge commit '072821e5' into thread-merge-2.16
Maria Matejka [Thu, 28 Nov 2024 11:44:04 +0000 (12:44 +0100)] 
Merge commit '072821e5' into thread-merge-2.16

8 months agoMerge commit 'a70ecade' into thread-merge-2.16
Maria Matejka [Thu, 28 Nov 2024 11:43:52 +0000 (12:43 +0100)] 
Merge commit 'a70ecade' into thread-merge-2.16

8 months agoMerge commit '39e75b87' into thread-merge-2.16
Maria Matejka [Thu, 28 Nov 2024 11:43:43 +0000 (12:43 +0100)] 
Merge commit '39e75b87' into thread-merge-2.16

8 months agoMerge commit '163ab313' into thread-merge-2.16
Maria Matejka [Thu, 28 Nov 2024 11:23:27 +0000 (12:23 +0100)] 
Merge commit '163ab313' into thread-merge-2.16

8 months agoMerge commit '8dc2a36a' into thread-merge-2.16
Maria Matejka [Thu, 28 Nov 2024 11:23:14 +0000 (12:23 +0100)] 
Merge commit '8dc2a36a' into thread-merge-2.16

8 months agoMerge commit '5daec239' into thread-merge-2.16
Maria Matejka [Thu, 28 Nov 2024 11:19:27 +0000 (12:19 +0100)] 
Merge commit '5daec239' into thread-merge-2.16

8 months agoMerge commit 'acbdc29d' into thread-merge-2.16
Maria Matejka [Thu, 28 Nov 2024 11:18:44 +0000 (12:18 +0100)] 
Merge commit 'acbdc29d' into thread-merge-2.16

8 months agoMerge commit 'c9836207' into thread-merge-2.16
Maria Matejka [Thu, 28 Nov 2024 11:08:52 +0000 (12:08 +0100)] 
Merge commit 'c9836207' into thread-merge-2.16

8 months agoMerge commit 'df22b314' into thread-merge-2.16
Maria Matejka [Thu, 28 Nov 2024 11:08:43 +0000 (12:08 +0100)] 
Merge commit 'df22b314' into thread-merge-2.16

8 months agoMerge commit '08ff0af8' into thread-merge-2.16
Maria Matejka [Thu, 28 Nov 2024 11:07:30 +0000 (12:07 +0100)] 
Merge commit '08ff0af8' into thread-merge-2.16

8 months agoMerge commit 'f3b6661d' into thread-merge-2.16
Maria Matejka [Thu, 28 Nov 2024 11:00:45 +0000 (12:00 +0100)] 
Merge commit 'f3b6661d' into thread-merge-2.16

8 months agoMerge commit 'a95fff37' into thread-merge-2.16
Maria Matejka [Thu, 28 Nov 2024 09:57:37 +0000 (10:57 +0100)] 
Merge commit 'a95fff37' into thread-merge-2.16

8 months agoMerge commit '09f50f37' into thread-merge-2.16
Maria Matejka [Thu, 28 Nov 2024 09:02:07 +0000 (10:02 +0100)] 
Merge commit '09f50f37' into thread-merge-2.16

8 months agoMerge commit '8a40bccf' into thread-merge-2.16
Maria Matejka [Thu, 28 Nov 2024 08:36:33 +0000 (09:36 +0100)] 
Merge commit '8a40bccf' into thread-merge-2.16

8 months agoMerge commit '00b139bd' into thread-merge-2.16
Maria Matejka [Thu, 28 Nov 2024 08:09:00 +0000 (09:09 +0100)] 
Merge commit '00b139bd' into thread-merge-2.16

8 months agoMerge commit 'a5b4c21d' into thread-merge-2.16
Maria Matejka [Thu, 28 Nov 2024 08:08:32 +0000 (09:08 +0100)] 
Merge commit 'a5b4c21d' into thread-merge-2.16

8 months agoMerge commit '2d6fb31c' into thread-merge-2.16
Maria Matejka [Thu, 28 Nov 2024 08:07:23 +0000 (09:07 +0100)] 
Merge commit '2d6fb31c' into thread-merge-2.16

8 months agoMerge commit 'e29f134a' into thread-merge-2.16
Maria Matejka [Thu, 28 Nov 2024 08:04:31 +0000 (09:04 +0100)] 
Merge commit 'e29f134a' into thread-merge-2.16

8 months agoMerge commit '280daed5' into thread-merge-2.16
Maria Matejka [Thu, 28 Nov 2024 08:02:59 +0000 (09:02 +0100)] 
Merge commit '280daed5' into thread-merge-2.16

8 months agoMerge commit 'bc10975a' into thread-merge-2.16
Maria Matejka [Thu, 28 Nov 2024 07:56:27 +0000 (08:56 +0100)] 
Merge commit 'bc10975a' into thread-merge-2.16

8 months agoMerge commit '08571b20' into thread-merge-2.16
Maria Matejka [Thu, 28 Nov 2024 07:22:06 +0000 (08:22 +0100)] 
Merge commit '08571b20' into thread-merge-2.16

8 months agoString tests: fixed too strict strcmp checks
Maria Matejka [Wed, 27 Nov 2024 11:01:58 +0000 (12:01 +0100)] 
String tests: fixed too strict strcmp checks

The strcmp function is not guaranteed to return -1 or +1
but any negative or positive value if the input strings
are different. Fixed the false assumption which triggered
a build bug on emulated arm64.

8 months agoFixed crash if logging happened in unit tests
Ondrej Zajicek [Wed, 27 Nov 2024 03:15:16 +0000 (04:15 +0100)] 
Fixed crash if logging happened in unit tests

The patch initializes logging in unit tests. Previously, unit tests did
not initialize logging and other subsystems, just resources. But
resource_init() could under certain circumstances trigger logging and
cause crash.

The bug was Found by Jakub Ruzicka, dissected by David Petera and Maria
Matejka, disguised as failing build for Debian arm64 in pbuilder
emulation which did not like disabling THP.

Fixes #42.

8 months agoASPA: Unified the ASPA_INVALID into one result
Maria Matejka [Tue, 26 Nov 2024 19:32:53 +0000 (20:32 +0100)] 
ASPA: Unified the ASPA_INVALID into one result

The _EMPTY and _CONFED variants are easy to spot bare-eyed from the AS path.

8 months agoRPKI: Polishing of ASPA syntax and documentation
Maria Matejka [Tue, 26 Nov 2024 15:36:13 +0000 (16:36 +0100)] 
RPKI: Polishing of ASPA syntax and documentation

8 months agoRPKI: Fix PDU length check
Ondrej Zajicek [Tue, 26 Nov 2024 16:46:27 +0000 (17:46 +0100)] 
RPKI: Fix PDU length check

The END_OF_DATA PDU was extended in version 1, so it has different length
in different versions. We should do the PDU length check according to its
version.

8 months agoRPKI: added documentation and RTR version config options
Maria Matejka [Mon, 25 Nov 2024 08:35:33 +0000 (09:35 +0100)] 
RPKI: added documentation and RTR version config options

8 months agoRPKI: protocol version 2, loading ASPA
Katerina Kubecova [Fri, 8 Nov 2024 14:26:37 +0000 (15:26 +0100)] 
RPKI: protocol version 2, loading ASPA

Implemented draft-ietf-sidrops-8210bis-16, interoperable with StayRTR
development branches.

8 months agoNetlink: Fixed handling of undefined bitfields in filters
Maria Matejka [Mon, 25 Nov 2024 16:14:32 +0000 (17:14 +0100)] 
Netlink: Fixed handling of undefined bitfields in filters

The default value is obviously false everywhere so we just return zero
if nothing is found, instead of undef.

8 months agoFilter: multi-command case branches now need braces.
Maria Matejka [Mon, 25 Nov 2024 14:14:27 +0000 (15:14 +0100)] 
Filter: multi-command case branches now need braces.

Removing an exception from the otherwise quite systematic syntax.
Closes #111.

8 months agort-show.c: fixed OBSREF_SET after cf_error(), changed message when 'show route export...
Katerina Kubecova [Tue, 19 Nov 2024 09:33:49 +0000 (10:33 +0100)] 
rt-show.c: fixed OBSREF_SET after cf_error(), changed message when 'show route export' called on static protocol

8 months agoProtocol restart timer reworked.
Maria Matejka [Mon, 25 Nov 2024 11:02:13 +0000 (12:02 +0100)] 
Protocol restart timer reworked.

The restart timer was racy and didn't allow for immediate restarts
from limits. Now the protocols stores the last restart time and in case
of too frequent autorestarts caused by exceeded limits, the protocol
gets disabled with an error message.

Also now there is a configuration knob for this.

8 months agoHash test spurious fail fixed
Maria Matejka [Mon, 25 Nov 2024 08:44:00 +0000 (09:44 +0100)] 
Hash test spurious fail fixed

There was a race condition in the test itself,
causing the test reader access data after free.

8 months agoProtocol and BGP state information cleanup and fixes
Maria Matejka [Fri, 22 Nov 2024 13:49:13 +0000 (14:49 +0100)] 
Protocol and BGP state information cleanup and fixes

There were some nasty problems with deferred protocol state updates and
race conditions on BGP startup, shutdown, and also with referencing the
cached states.

Now it looks fixed.

8 months agoDebug option for ea_free
Maria Matejka [Sun, 24 Nov 2024 17:43:09 +0000 (18:43 +0100)] 
Debug option for ea_free

8 months agoDeferred call may need to be returned for future cleanups
Maria Matejka [Sat, 23 Nov 2024 20:24:45 +0000 (21:24 +0100)] 
Deferred call may need to be returned for future cleanups

8 months agoBMP: updated to v3 API
Katerina Kubecova [Fri, 27 Sep 2024 12:02:40 +0000 (14:02 +0200)] 
BMP: updated to v3 API

8 months agoBGP: protocol specific state information cleanup
Maria Matejka [Wed, 20 Nov 2024 19:04:33 +0000 (20:04 +0100)] 
BGP: protocol specific state information cleanup

8 months agoProto: The active flag converted to actual fifth protocol state
Maria Matejka [Mon, 18 Nov 2024 21:06:50 +0000 (22:06 +0100)] 
Proto: The active flag converted to actual fifth protocol state

What was PS_DOWN before, is now PS_DOWN and PS_FLUSH.

8 months agoNeighbor locking: forgotten neighbors to unlink are actually a bug.
Katerina Kubecova [Wed, 13 Nov 2024 14:45:09 +0000 (15:45 +0100)] 
Neighbor locking: forgotten neighbors to unlink are actually a bug.

These may cause runaway pointers.

8 months agonest/cli: fixup - empty printing in birdc does not freeze
Katerina Kubecova [Fri, 15 Nov 2024 09:04:51 +0000 (10:04 +0100)] 
nest/cli: fixup - empty printing in birdc does not freeze

8 months agoMRT: buildable and running again for BIRD 3
Katerina Kubecova [Fri, 27 Sep 2024 11:58:46 +0000 (13:58 +0200)] 
MRT: buildable and running again for BIRD 3

Tests for MRT are scarce and not automated for now, so it may behave
weirdly in corner cases.

8 months agoNeighbor cache: fixed neighbor referencing
Maria Matejka [Sun, 10 Nov 2024 12:33:22 +0000 (13:33 +0100)] 
Neighbor cache: fixed neighbor referencing

8 months agoDefer: fixup missing include guards
Maria Matejka [Sun, 10 Nov 2024 12:32:16 +0000 (13:32 +0100)] 
Defer: fixup missing include guards

8 months agoBGP: exporting protocol-specific state information
Katerina Kubecova [Fri, 11 Oct 2024 10:38:18 +0000 (12:38 +0200)] 
BGP: exporting protocol-specific state information

8 months agoBGP: Start state is now using extended state
Maria Matejka [Tue, 15 Oct 2024 11:10:58 +0000 (13:10 +0200)] 
BGP: Start state is now using extended state

8 months agoProto: adding lockless state table and journal
Katerina Kubecova [Tue, 15 Oct 2024 09:31:32 +0000 (11:31 +0200)] 
Proto: adding lockless state table and journal

To allow reading of protocol states from other protocols or completely
different routines, we have to export these states to data structures
not requiring to lock the protocol loops.

On one hand, this doesn't give the reader the actual state "right now",
on the other hand, getting that is impossible in a properly
multithreaded environment and you will always get the information with
some (little but noteworthy) delay.

This implementation handles only the basic state information of the
protocols, common for all the protocols. Adding protocol-specific state
information should be done by implementing the protocol hook init_state().

Channel information is stored but not announced, as we don't need the
announcements for now.

8 months agoASPA: Automatic channel reload
Katerina Kubecova [Wed, 8 Nov 2023 12:46:42 +0000 (13:46 +0100)] 
ASPA: Automatic channel reload

8 months agoMore attribute types: pointers, strings, btime
Katerina Kubecova [Tue, 15 Oct 2024 08:50:29 +0000 (10:50 +0200)] 
More attribute types: pointers, strings, btime

For the upcoming rework of protocol state information propagation,
we need some more eattr types to be defined.

These types are probably not defined completely and before using
them for route attributes, you should check that they don't lack
some crucial methods.

8 months agoLib: Optimized printing of numbers
Ondrej Zajicek [Fri, 8 Nov 2024 17:54:13 +0000 (18:54 +0100)] 
Lib: Optimized printing of numbers

One simple trick makes printing of numbers ~4x faster.

8 months agoLib: Optimized printing of IP addresses
Ondrej Zajicek [Fri, 8 Nov 2024 17:51:54 +0000 (18:51 +0100)] 
Lib: Optimized printing of IP addresses

Makes printing network prefixes ~15x faster.

8 months agoCLI: Add timeformat command
Piotr Wydrych [Tue, 5 Nov 2024 17:53:22 +0000 (18:53 +0100)] 
CLI: Add timeformat command

Adds ability to override time format of show commands for current CLI session
so that it does not depend on configuration and may ease parsing when CLI is
called from tools.

Minor changes by committer.

8 months agoNest: Cleanup timeformat grammar
Ondrej Zajicek [Tue, 5 Nov 2024 16:35:20 +0000 (17:35 +0100)] 
Nest: Cleanup timeformat grammar

8 months agoASPA: fixed the check algorithm to actually do what is in the RFC
Maria Matejka [Wed, 6 Nov 2024 11:12:37 +0000 (12:12 +0100)] 
ASPA: fixed the check algorithm to actually do what is in the RFC

The original algorithm assumed principles not consistent with the RFC
and could have lead to false invalids.

Also added filter tests showing also how the ASPA literals are used in
the static protocol.

8 months agoBGP: Add RFC 9687 to list of supported RFCs
Ondrej Zajicek [Thu, 7 Nov 2024 14:03:01 +0000 (15:03 +0100)] 
BGP: Add RFC 9687 to list of supported RFCs

8 months agoBGP: SendHoldTimer became an RFC, updating docs
Maria Matejka [Wed, 6 Nov 2024 12:05:32 +0000 (13:05 +0100)] 
BGP: SendHoldTimer became an RFC, updating docs

9 months agoFilter: Remove T_ENUM_RTC
Ondrej Zajicek [Fri, 18 Oct 2024 14:53:12 +0000 (16:53 +0200)] 
Filter: Remove T_ENUM_RTC

It is not used for a long time.

9 months agoFilter: Replace T_ENUM_NETTYPE with T_ENUM_NET_TYPE
Ondrej Zajicek [Fri, 18 Oct 2024 14:49:19 +0000 (16:49 +0200)] 
Filter: Replace T_ENUM_NETTYPE with T_ENUM_NET_TYPE

To be consistent with other enum type names.

9 months agoFilter: Add enum types to filter grammar
Ondrej Zajicek [Fri, 18 Oct 2024 14:39:42 +0000 (16:39 +0200)] 
Filter: Add enum types to filter grammar

Enum types existed on semantic level, but not on syntactic level,
so they could not be used in filter code.

Generate filter grammar for enum types based on CF_ENUM() declarations.

Thanks to lbz for the bugreport.

9 months agoFlowspec: Fix IPv6 prefix when offset is not multiple of 8
Eric Long [Wed, 16 Oct 2024 19:32:36 +0000 (21:32 +0200)] 
Flowspec: Fix IPv6 prefix when offset is not multiple of 8

Current implementation handles flowspec prefix length and offset only
in bytes, but RFC 8956 (Dissemination of Flow Specification Rules for
IPv6) Section 3.1 [1] and example in Section 3.8.2 [2] states the
pattern should begin right after offset *bits*.

For example, pattern "::1:1234:5678:9800:0/60-104" is currently
serialized as "02 68 3c 01 12 34 56 78 98", but it should shift its
pattern 4 more bits to the left: "02 68 3c 11 23 45 67 89 80".

This patch implements shifting left/right for IPv6 type and use it to
correct the behaviour. Test data are replaced with the correct ones.

Minor changes and test vectors done by committer.

[1]: https://www.rfc-editor.org/rfc/rfc8956.html#section-3.1
[2]: https://www.rfc-editor.org/rfc/rfc8956.html#section-3.8.2

9 months agoFlowspec: Test improvements
Ondrej Zajicek [Wed, 16 Oct 2024 02:04:46 +0000 (04:04 +0200)] 
Flowspec: Test improvements

Simplify Flowspec initialization macros.

Add examples from RFC 8955 4.3 and RFC 8956 3.8 to format tests.

9 months agoDoc: Minor fixes
Ondrej Zajicek [Tue, 15 Oct 2024 15:19:42 +0000 (17:19 +0200)] 
Doc: Minor fixes

9 months agoDoc: Fix code blocks
Ondrej Zajicek [Tue, 15 Oct 2024 15:14:57 +0000 (17:14 +0200)] 
Doc: Fix code blocks

Code blocks should not be indented, as the indendation is passed
to the output,

9 months agoDoc: Improve readability of the operator documentation
Johannes Erwerle [Tue, 15 Oct 2024 14:56:48 +0000 (16:56 +0200)] 
Doc: Improve readability of the operator documentation

Minor changes by committer.

9 months agoTable: tame warnings around unused debug messages
Maria Matejka [Fri, 11 Oct 2024 10:23:15 +0000 (12:23 +0200)] 
Table: tame warnings around unused debug messages

9 months agoFix typo in documentation
Ondrej Zajicek [Wed, 9 Oct 2024 16:00:16 +0000 (18:00 +0200)] 
Fix typo in documentation

9 months agoFilter: Fixes and improvements related to case/sets
Ondrej Zajicek [Tue, 8 Oct 2024 17:34:51 +0000 (19:34 +0200)] 
Filter: Fixes and improvements related to case/sets

Unify grammar for set_atom and switch_atom to avoid inconsistencies
between them. Fix errors in documentation related to case statement
and set type. Change 'vpnrd' to 'rd' to be consistent with the filter
language.

Thanks to Mikhail Mayorov for bugreport.

9 months agoMerge branch 'dpetera-master-patch-71179' into 'master'
Ondřej Zajíček [Mon, 7 Oct 2024 14:35:55 +0000 (16:35 +0200)] 
Merge branch 'dpetera-master-patch-71179' into 'master'

Fix typo in user docs

See merge request labs/bird!27

9 months agoFix typo in user docs
David Petera [Mon, 7 Oct 2024 14:15:09 +0000 (16:15 +0200)] 
Fix typo in user docs

10 months agoRPKI: Add TCP-MD5 authentication option
Job Snijders [Thu, 3 Oct 2024 13:43:12 +0000 (15:43 +0200)] 
RPKI: Add TCP-MD5 authentication option

RPKI-To-Router (RTR) sessions seem to be similar security-sensitivity as
IBGP sessions. BIRD already offered a choice of either "plain TCP" (meh)
or "SSH" (secure, albeit a bit more hassle to set up than TCP-MD5).
The patch adds TCP-MD5 as another option. TCP-MD5 for RTR is specified
through RFC 6810 section 7.3 and RFC 8210 section 9.3.

Minor changes by committer.

10 months agoKernel: protocol shuts down synchronously
Katerina Kubecova [Fri, 27 Sep 2024 12:54:21 +0000 (14:54 +0200)] 
Kernel: protocol shuts down synchronously

Before this commit, on kernel shutdown, the routes were re-exported by
the regular export but treated as withdraw. This was too hairy and
caused unnecessary complexity of the protocol's state machine.

Instead of that, we found out that it makes more sense to just refeed
the routes synchronously and convert to withdraw. This is done by the
direct export access instead of the channel.

It would (maybe) make more sense to run export filters on this in case
the export filter updates the krt_metric attribute, but as this doesn't
work on regular withdraw anyway, it's better for now to just let it be
and maybe somebody in the future fixes this issue.