]> git.ipfire.org Git - thirdparty/bird.git/log
thirdparty/bird.git
7 months agoFilter: Fix scope handling in for loops
Ondrej Zajicek [Thu, 5 Oct 2023 12:26:22 +0000 (14:26 +0200)] 
Filter: Fix scope handling in for loops

Changes in scope implementation broke scope handling in for loops.
The term in for loops is supposed to be parsed in the parent scope.

7 months agoConf: Fix 'show symbols'
Ondrej Zajicek [Wed, 4 Oct 2023 18:14:12 +0000 (20:14 +0200)] 
Conf: Fix 'show symbols'

Seems like the root scope was not marked as active.

7 months agoBGP: Custom attribute definitions should use cfg_alloc(), not malloc()
Ondrej Zajicek [Wed, 4 Oct 2023 17:45:00 +0000 (19:45 +0200)] 
BGP: Custom attribute definitions should use cfg_alloc(), not malloc()

Otherwise we would get memory leaks.

7 months agoFilter: explicitly forbidden for-loop with pre-defined variable
Maria Matejka [Wed, 4 Oct 2023 17:57:55 +0000 (19:57 +0200)] 
Filter: explicitly forbidden for-loop with pre-defined variable

7 months agoIO: Fix race condition in event processing
Ondrej Zajicek [Wed, 4 Oct 2023 15:36:03 +0000 (17:36 +0200)] 
IO: Fix race condition in event processing

When regular event was added from work event, we did remember that
regular event list was empty and therefore we did not use zero time
in poll(). This leads to ~3 s latency in route reload during
reconfiguration.

7 months agoDoc: Fix syntax errors in SGML
Ondrej Zajicek [Wed, 4 Oct 2023 13:25:05 +0000 (15:25 +0200)] 
Doc: Fix syntax errors in SGML

7 months agoMPLS: Update to support and use 64bit source id
Ondrej Zajicek [Wed, 4 Oct 2023 13:00:24 +0000 (15:00 +0200)] 
MPLS: Update to support and use 64bit source id

7 months agoDoc: L3VPN documentation
Ondrej Zajicek [Wed, 4 Oct 2023 11:00:06 +0000 (13:00 +0200)] 
Doc: L3VPN documentation

7 months agoDoc: MPLS documentation
Ondrej Zajicek [Tue, 3 Oct 2023 14:11:18 +0000 (16:11 +0200)] 
Doc: MPLS documentation

7 months agoL3VPN: Import/export target reconfiguration
Ondrej Zajicek [Sun, 1 Oct 2023 03:02:46 +0000 (05:02 +0200)] 
L3VPN: Import/export target reconfiguration

7 months agoBGP, L3VPN: Fix MPLS channel reload mq-master-merged-to-v3
Ondrej Zajicek [Sat, 30 Sep 2023 21:18:04 +0000 (23:18 +0200)] 
BGP, L3VPN: Fix MPLS channel reload

When a MPLS channel is reloaded, it should reload all regular MPLS-aware
channels. This causes re-evaluation of routes in FEC map and possibly
reannouncement of MPLS routes.

7 months agoMPLS: Implement FEC map reconfiguration
Ondrej Zajicek [Sat, 30 Sep 2023 18:07:40 +0000 (20:07 +0200)] 
MPLS: Implement FEC map reconfiguration

This allows changing label policy or label range without restart.

7 months agoMPLS: Handle label allocation failures
Ondrej Zajicek [Tue, 26 Sep 2023 16:50:20 +0000 (18:50 +0200)] 
MPLS: Handle label allocation failures

7 months agoL3VPN: Fix bug in reconfiguration
Ondrej Zajicek [Sat, 23 Sep 2023 22:24:50 +0000 (00:24 +0200)] 
L3VPN: Fix bug in reconfiguration

Fields import_target / export_target link to config structures, must be
updated during reconfiguration.

7 months agoMPLS: Improve handling of static label allocations
Ondrej Zajicek [Sat, 23 Sep 2023 15:55:01 +0000 (17:55 +0200)] 
MPLS: Improve handling of static label allocations

Use mpls_new_label() / mpls_free_label() also for static labels, to keep
track of allocated labels and to enforce label ranges.

Static label allocations always use static label range, regardless of
configured label range.

7 months agoStatic: Add syntax for static MPLS labels
Ondrej Zajicek [Fri, 22 Sep 2023 17:49:15 +0000 (19:49 +0200)] 
Static: Add syntax for static MPLS labels

Instead of just using route attributes, static routes with
static MPLS labels can be defined just by e.g.:

  route 10.1.1.0/24 mpls 100 via 10.1.2.1 mpls 200;

7 months agoMPLS: Label range non-intersection check
Ondrej Zajicek [Fri, 22 Sep 2023 13:47:48 +0000 (15:47 +0200)] 
MPLS: Label range non-intersection check

7 months agoMPLS: Improve label range reconfiguration
Ondrej Zajicek [Mon, 18 Sep 2023 15:47:17 +0000 (17:47 +0200)] 
MPLS: Improve label range reconfiguration

Allow to shorten label range over unused area.

7 months agoMPLS: Add command 'show mpls ranges'
Ondrej Zajicek [Mon, 18 Sep 2023 15:32:24 +0000 (17:32 +0200)] 
MPLS: Add command 'show mpls ranges'

Add command to show MPLS label ranges and their stats.

7 months agoNest: Fix missing RTS_* values in filters
Ondrej Zajicek [Mon, 18 Sep 2023 12:19:20 +0000 (14:19 +0200)] 
Nest: Fix missing RTS_* values in filters

7 months agoLib: Extend MPLS label allocator bitmap
Ondrej Zajicek [Mon, 18 Sep 2023 12:12:22 +0000 (14:12 +0200)] 
Lib: Extend MPLS label allocator bitmap

Add function lmap_last_one_in_range() for finding the last active label
in a label range.

7 months agoL3VPN: BGP/MPLS VPNs using MPLS backbone
Ondrej Zajicek [Mon, 3 Oct 2022 18:06:13 +0000 (20:06 +0200)] 
L3VPN: BGP/MPLS VPNs using MPLS backbone

The L3VPN protocol implements RFC 4364 BGP/MPLS VPNs using MPLS backbone.
It works similarly to pipe. It connects IP table (one per VRF) with (global)
VPN table. Routes passed from VPN table to IP table are stripped of RD and
filtered by import targets, routes passed in the other direction are extended
with RD, MPLS labels and export targets in extended communities. A separate
MPLS channel is used to announce MPLS routes for the labels.

7 months agoMPLS: Add support for per-VRF labeling policy
Ondrej Zajicek [Sat, 1 Oct 2022 20:38:49 +0000 (22:38 +0200)] 
MPLS: Add support for per-VRF labeling policy

The new labeling policy MPLS_POLICY_VRF assigns one label to all routes
(from the same FEC map associated with one VRF), while replaces their
next hops with a lookup to a VRF table. This is useful for L3VPN
protocol.

7 months agoBGP: Add MPLS support
Ondrej Zajicek [Thu, 15 Sep 2022 00:30:15 +0000 (02:30 +0200)] 
BGP: Add MPLS support

When MPLS is active, received routes on MPLS-aware SAFIs (ipvX-mpls,
vpnX-mpls) are automatically labeled according to active label policy and
corresponding MPLS routes are automatically generated. Also routes sent
on MPLS-aware SAFIs announce local labels when it should be done.

7 months agoStatic: Add MPLS support
Ondrej Zajicek [Thu, 15 Sep 2022 00:29:12 +0000 (02:29 +0200)] 
Static: Add MPLS support

When MPLS is active, static IP/VPN routes are automatically labeled
according to active label policy and corresponding MPLS routes are
automatically generated.

7 months agoMPLS subsystem
Ondrej Zajicek [Wed, 14 Sep 2022 23:38:18 +0000 (01:38 +0200)] 
MPLS subsystem

The MPLS subsystem manages MPLS labels and handles their allocation to
MPLS-aware routing protocols. These labels are then attached to IP or VPN
routes representing label switched paths -- LSPs.

There was already a preliminary MPLS support consisting of MPLS label
net_addr, MPLS routing tables with static MPLS routes, remote labels in
next hops, and kernel protocol support.

This patch adds the MPLS domain as a basic structure representing local
label space with dynamic label allocator and configurable label ranges.
To represent LSPs, allocated local labels can be attached as route
attributes to IP or VPN routes with local labels as attributes.

There are several steps for handling LSP routes in routing protocols --
deciding to which forwarding equivalence class (FEC) the LSP route
belongs, allocating labels for new FECs, announcing MPLS routes for new
FECs, attaching labels to LSP routes. The FEC map structure implements
basic code for managing FECs in routing protocols, therefore existing
protocols can be made MPLS-aware by adding FEC map and delegating
most work related to local label management to it.

7 months agoLib: Indirect bitmap for MPLS label allocator
Ondrej Zajicek (work) [Sat, 22 May 2021 10:31:47 +0000 (12:31 +0200)] 
Lib: Indirect bitmap for MPLS label allocator

7 months agoNest: Expand rte_src.private_id to u64
Ondrej Zajicek [Mon, 2 Oct 2023 13:09:30 +0000 (15:09 +0200)] 
Nest: Expand rte_src.private_id to u64

In general, private_id is sparse and protocols may want to map some
internal values directly into it. For example, L3VPN needs to
map VPN route discriminators to private_id.

OTOH, u32 is enough for global_id, as these identifiers are dense.

7 months agoBGP config: Splitting Route Refresh and Enhanced Route Refresh
Maria Matejka [Wed, 27 Sep 2023 10:51:55 +0000 (12:51 +0200)] 
BGP config: Splitting Route Refresh and Enhanced Route Refresh

Both toggles are on by default but if some implementation needs one or
another to be switched off separately, then it's possible now.

7 months agoAggregator: brief documentation
Maria Matejka [Fri, 22 Sep 2023 13:10:45 +0000 (15:10 +0200)] 
Aggregator: brief documentation

7 months agoAggregator: Forbidden dangerous filter computations
Maria Matejka [Fri, 22 Sep 2023 12:21:21 +0000 (14:21 +0200)] 
Aggregator: Forbidden dangerous filter computations

7 months agoAggregator: Fixed hashing of adata
Maria Matejka [Wed, 12 Jul 2023 13:11:00 +0000 (15:11 +0200)] 
Aggregator: Fixed hashing of adata

7 months agoBasic route aggregation
Igor Putovny [Wed, 21 Jun 2023 11:15:07 +0000 (13:15 +0200)] 
Basic route aggregation

Add a new protocol offering route aggregation.

User can specify list of route attributes in the configuration file and
run route aggregation on the export side of the pipe protocol. Routes are
sorted and for every group of equivalent routes new route is created and
exported to the routing table. It is also possible to specify filter
which will run for every route before aggregation.

Furthermore, it will be possible to set attributes of new routes
according to attributes of the aggregated routes.

This is a work in progress.

Original work by Igor Putovny, subsequent cleanups and finalization by
Maria Matejka.

7 months agoSimple testing of reconfiguration to a slightly different one
Maria Matejka [Fri, 23 Jun 2023 07:05:48 +0000 (09:05 +0200)] 
Simple testing of reconfiguration to a slightly different one

8 months agoBGP: Setting and unsetting unknown attributes kk-bgp-unknown-attributes
katerina.kubecova [Tue, 19 Sep 2023 09:11:24 +0000 (11:11 +0200)] 
BGP: Setting and unsetting unknown attributes

All these must be declared as bytestring. Allows operators to delete
unwanted attributes breaking the Internet:

    https://blog.benjojo.co.uk/post/bgp-path-attributes-grave-error-handling

8 months agoAttributes declared in config can be bytestrings
katerina.kubecova [Mon, 18 Sep 2023 12:07:59 +0000 (14:07 +0200)] 
Attributes declared in config can be bytestrings

8 months agoFilter: Function unset() accepts attributes declared in config
katerina.kubecova [Wed, 20 Sep 2023 07:50:22 +0000 (09:50 +0200)] 
Filter: Function unset() accepts attributes declared in config

8 months agoStructures bytestring and adata merged into adata.
katerina.kubecova [Mon, 18 Sep 2023 12:43:58 +0000 (14:43 +0200)] 
Structures bytestring and adata merged into adata.

8 months agoConf: Move definition of struct keyword to conf.h
Ondrej Zajicek [Thu, 14 Sep 2023 15:24:09 +0000 (17:24 +0200)] 
Conf: Move definition of struct keyword to conf.h

8 months agoFilter: Use common initializer for undefined variables and eattrs. mq-func-types
Ondrej Zajicek [Wed, 13 Sep 2023 04:21:26 +0000 (06:21 +0200)] 
Filter: Use common initializer for undefined variables and eattrs.

Undefined paths and clists should use typed f_val with empty adata
instead of just void f_val. Use common initializer to handle both
variables and eattrs.

8 months agoFilter: Minor updates to methods
Ondrej Zajicek [Tue, 12 Sep 2023 16:44:20 +0000 (18:44 +0200)] 
Filter: Minor updates to methods

Remove warning when function-like syntax is used for calling
add/remove/... methods.

Fix argument offset in error messages for function-like syntax.

8 months agoFilter: Split clist add/delete operations to multiple methods
Ondrej Zajicek [Tue, 25 Jul 2023 17:33:51 +0000 (19:33 +0200)] 
Filter: Split clist add/delete operations to multiple methods

8 months agoFilter: Implement constant promotion for multiple dispatch methods
Ondrej Zajicek [Tue, 25 Jul 2023 15:43:52 +0000 (17:43 +0200)] 
Filter: Implement constant promotion for multiple dispatch methods

8 months agoFilter: Print proper error response in multiple method dispatch
Ondrej Zajicek [Wed, 12 Jul 2023 18:11:34 +0000 (20:11 +0200)] 
Filter: Print proper error response in multiple method dispatch

When no matching method is found, print an error response containing
position and type of infringing argument and a set of expected types.

8 months agoFilter: Move argument list reversal from function_call to var_list
Ondrej Zajicek [Wed, 12 Jul 2023 18:01:03 +0000 (20:01 +0200)] 
Filter: Move argument list reversal from function_call to var_list

List of arguments for function calls is constructed in reverse and then
reverted. This was done in function_call grammar rule. Do the reverse
directly in var_list grammar rule. This fixes reverse order of arguments
in method calls.

8 months agoFilter: Better syntax for function return types
Ondrej Zajicek [Tue, 4 Jul 2023 17:07:30 +0000 (19:07 +0200)] 
Filter: Better syntax for function return types

The C-style syntax does not really fit into rest of our syntax.

8 months agoFilter: Implement multiple dispatch for methods
Ondrej Zajicek [Mon, 3 Jul 2023 15:00:58 +0000 (17:00 +0200)] 
Filter: Implement multiple dispatch for methods

 - Extend method descriptors with type signature
 - Daisy chain method descriptors for the same symbol
 - Dispatch methods for same symbol based on type signature
 - Split add/delete/filter operations to multiple methods
 - Replace ad-hoc dispatch of old-style syntax with scope-based dispatch
 - Also change method->arg_num to count initial arg

It still needs some improvements, like better handling of untyped
expressions and better error reporting when no dispatch can be done.

The multiple dispatch could also be extended to dispatch regular
function-like expressions in a uniform way.

8 months agoFilter: Make f_method_call_*() usage symmetric
Ondrej Zajicek [Tue, 27 Jun 2023 23:21:23 +0000 (01:21 +0200)] 
Filter: Make f_method_call_*() usage symmetric

8 months agoFilter: Convert more methods to use METHOD_R()
Ondrej Zajicek [Tue, 27 Jun 2023 19:38:05 +0000 (21:38 +0200)] 
Filter: Convert more methods to use METHOD_R()

8 months agoFilter: Remove number of args from METHOD_R()
Ondrej Zajicek [Tue, 27 Jun 2023 19:16:11 +0000 (21:16 +0200)] 
Filter: Remove number of args from METHOD_R()

Macro METHOD_R() is used for simplest methods, there is no place to
define argument types, so let's force it to be 0.

8 months agoConf: Remove toksym from symbol_known
Ondrej Zajicek [Tue, 27 Jun 2023 12:49:28 +0000 (14:49 +0200)] 
Conf: Remove toksym from symbol_known

No need to have toksym in symbol_known, as defined symbols are preferred
(by scope) to keywords anyway. Adding it just creates grammar conflicts.

8 months agoFilter: Print instructions take only one value (simplification)
Maria Matejka [Mon, 19 Jun 2023 15:24:30 +0000 (17:24 +0200)] 
Filter: Print instructions take only one value (simplification)

8 months agoFilter: Shortened method declarations
Maria Matejka [Mon, 19 Jun 2023 13:49:51 +0000 (15:49 +0200)] 
Filter: Shortened method declarations

8 months agoFilter: The for loop uses the method system for type dispatch
Maria Matejka [Sun, 18 Jun 2023 20:50:45 +0000 (22:50 +0200)] 
Filter: The for loop uses the method system for type dispatch

8 months agoRemoving unused terminals from filter config
Maria Matejka [Sat, 17 Jun 2023 11:05:23 +0000 (13:05 +0200)] 
Removing unused terminals from filter config

8 months agoFilter: Methods rework
Maria Matejka [Fri, 16 Jun 2023 15:35:37 +0000 (17:35 +0200)] 
Filter: Methods rework

Methods can now be called as x.m(y), as long as x can have its type
inferred in config time. If used as a command, it modifies the object,
if used as a value, it keeps the original object intact.

Also functions add(x,y), delete(x,y), filter(x,y) and prepend(x,y) now
spit a warning and are considered deprecated.

It's also possible to call a method on a constant, see filter/test.conf
for examples like bgp_path = +empty+.prepend(1).

Inside instruction definitions (filter/f-inst.c), a METHOD_CONSTRUCTOR()
call is added, which registers the instruction as a method for the type
of its first argument. Each type has its own method symbol table and
filter parser switches between them based on the inferred type of the
object calling the method.

Also FI_CLIST_(ADD|DELETE|FILTER) instructions have been split to allow
for this method dispatch. With type inference, it's now possible.

8 months agoUninitialized filter variables of path/[el]?clist types are now explicitly empty
Maria Matejka [Sat, 17 Jun 2023 08:16:28 +0000 (10:16 +0200)] 
Uninitialized filter variables of path/[el]?clist types are now explicitly empty

8 months agoConf: config warnings show the file position
Maria Matejka [Fri, 16 Jun 2023 20:11:03 +0000 (22:11 +0200)] 
Conf: config warnings show the file position

8 months agoFilter: functions can and should have typed return values
Maria Matejka [Thu, 15 Jun 2023 11:25:40 +0000 (13:25 +0200)] 
Filter: functions can and should have typed return values

8 months agoFilter/Conf: Method names have their own keyword hash
Maria Matejka [Tue, 13 Jun 2023 07:39:29 +0000 (09:39 +0200)] 
Filter/Conf: Method names have their own keyword hash

To allow for future dynamic method definition, parsing method names is
done via a dedicated keyword hash/scope.

8 months agoConf: Allowing conf scope to be explicitly read only
Maria Matejka [Tue, 13 Jun 2023 09:09:41 +0000 (11:09 +0200)] 
Conf: Allowing conf scope to be explicitly read only

8 months agoConf: Symbol manipulation gets its context explicitly
Maria Matejka [Tue, 13 Jun 2023 08:51:03 +0000 (10:51 +0200)] 
Conf: Symbol manipulation gets its context explicitly

8 months agoFilter: any lvalue can get its methods called
Maria Matejka [Mon, 12 Jun 2023 09:37:50 +0000 (11:37 +0200)] 
Filter: any lvalue can get its methods called

8 months agoFilter: split out dot-notation methods to separate targets
Maria Matejka [Mon, 12 Jun 2023 09:20:49 +0000 (11:20 +0200)] 
Filter: split out dot-notation methods to separate targets

This is just a preparationary refactoring to allow type-based method
tables.

8 months agoConf: Keywords have their default symbols
Maria Matejka [Fri, 9 Jun 2023 10:49:19 +0000 (12:49 +0200)] 
Conf: Keywords have their default symbols

This avoids unnecessary collapsed soft scopes caused by keyword symbol multiallocation.

8 months agoConf: Symbol hashes for all scopes
Maria Matejka [Mon, 2 May 2022 18:29:03 +0000 (20:29 +0200)] 
Conf: Symbol hashes for all scopes

This is a backport cherry-pick of commits
  165156beeb2926472bbceca3c103aacc3f81a8cc
  cce974e8ea992d0e6d2f649eca7880b436d91d71

from the v3.0 branch as we need symbol hashes directly inside their
scopes for more general usage than before.

8 months agoDropping empty-type const f_vals, they were copied anyway
Maria Matejka [Fri, 9 Jun 2023 09:02:05 +0000 (11:02 +0200)] 
Dropping empty-type const f_vals, they were copied anyway

8 months agoConf: Adding dummy thread-number setting for easier sharing of configuration between...
Maria Matejka [Fri, 9 Jun 2023 11:49:17 +0000 (13:49 +0200)] 
Conf: Adding dummy thread-number setting for easier sharing of configuration between v2 and v3

8 months agoBFD: Improve handling of AdminDown
Ondrej Zajicek [Tue, 29 Aug 2023 16:23:29 +0000 (18:23 +0200)] 
BFD: Improve handling of AdminDown

According to RFC 5882, system should not interpret the local or remote
session state transition to AdminDown as failure. We followed that for
the local session state but not for the remote session state (which
just triggered a transition of the local state to Down). The patch
fixes that.

We do not properly generate AdminDown on our side, so the patch is
relevant just for interoperability with other systems.

Thanks to Sunnat Samadov for the bugreport.

8 months agoConf: Allow keywords to be redefined by user symbols
Ondrej Zajicek [Tue, 13 Dec 2022 18:31:46 +0000 (19:31 +0100)] 
Conf: Allow keywords to be redefined by user symbols

Most syntactic constructs in BIRD configuration (e.g. protocol options)
are defined as keywords, which are distinct from symbols (user-defined
names for protocols, variables, ...). That may cause backwards
compatibility issue when a new feature is added, as it may collide with
existing user names.

We can allow keywords to be shadowed by symbols in almost all cases to
avoid this issue.

This replaces the previous mechanism, where shadowable symbols have to be
explictly added to kw_syms.

8 months agoFilter: Add separate instruction for uninitialized variable declaration
Ondrej Zajicek [Fri, 25 Aug 2023 21:14:36 +0000 (23:14 +0200)] 
Filter: Add separate instruction for uninitialized variable declaration

The previous approach (use VOID constant for variable initialization)
failed due to dynamic type check failure.

Thanks to Alexander Zubkov <green@qrator.net> for the bugreport.

8 months agoRPKI: Fix conflict in config grammar
Ondrej Zajicek [Fri, 25 Aug 2023 02:32:01 +0000 (04:32 +0200)] 
RPKI: Fix conflict in config grammar

8 months agoNest: Fix missing bar in kw_sym
Ondrej Zajicek [Fri, 25 Aug 2023 02:29:32 +0000 (04:29 +0200)] 
Nest: Fix missing bar in kw_sym

Thanks to Alexander Zubkov for the notice.

8 months agoDoc: Document bytestring type
Alexander Zubkov [Thu, 24 Aug 2023 16:04:33 +0000 (18:04 +0200)] 
Doc: Document bytestring type

8 months agoDoc: Document RAdv "custom option" configuration definition
Alexander Zubkov [Thu, 24 Aug 2023 15:41:51 +0000 (17:41 +0200)] 
Doc: Document RAdv "custom option" configuration definition

8 months agoConf: Use nonterminal bytestring instead of BYTETEXT
Ondrej Zajicek [Thu, 24 Aug 2023 14:59:23 +0000 (16:59 +0200)] 
Conf: Use nonterminal bytestring instead of BYTETEXT

Nonterminal bytestring allows to provide expressions to be evaluated in
places where BYTETEXT is used now: passwords, radv custom option.

Based on the patch from Alexander Zubkov <green@qrator.net>, thanks!

8 months agoFilter: Use more generic approach for intra-config expressions
Alexander Zubkov [Thu, 24 Aug 2023 02:45:55 +0000 (04:45 +0200)] 
Filter: Use more generic approach for intra-config expressions

Replace f_eval_int() function with a type-generic variant: cf_eval().
Implement similar fuction: cf_eval_int() via inline call to cf_eval().

8 months agoFilter: Add bytestring type
Alexander Zubkov [Thu, 24 Aug 2023 02:30:42 +0000 (04:30 +0200)] 
Filter: Add bytestring type

 - Rename BYTESTRING lexem to BYTETEXT, not to collide with 'bytestring' type name
 - Add bytestring type with id T_BYTESTRING (0x2c)
 - Add from_hex() filter function to create bytestring from hex string
 - Add filter test cases for bytestring type

Minor changes by committer.

8 months agoLib: Add functions for reading and writing of bytestrings
Ondrej Zajicek [Thu, 24 Aug 2023 01:04:58 +0000 (03:04 +0200)] 
Lib: Add functions for reading and writing of bytestrings

Based on patch from Alexander Zubkov, thanks!

8 months agoNest: Treat VRF interfaces as inside respective VRFs
Ondrej Zajicek [Wed, 23 Aug 2023 13:55:31 +0000 (15:55 +0200)] 
Nest: Treat VRF interfaces as inside respective VRFs

Despite not having defined 'master interface', VRF interfaces should be
treated as being inside respective VRFs. They behave as a loopback for
respective VRFs. Treating the VRF interface as inside the VRF allows
e.g. OSPF to pick up IP addresses defined on the VRF interface.

For this, we also need to tell apart VRF interfaces and regular interfaces.
Extend Netlink code to parse interface type and mark VRF interfaces with
IF_VRF flag.

Based on the patch from Erin Shepherd, thanks!

8 months agoMerge branch 'bmp'
Ondrej Zajicek [Tue, 22 Aug 2023 13:28:05 +0000 (15:28 +0200)] 
Merge branch 'bmp'

8 months agoRPM: Sync bird.spec from Fedora dist-git
Jakub Ružička [Tue, 22 Aug 2023 12:13:55 +0000 (14:13 +0200)] 
RPM: Sync bird.spec from Fedora dist-git

It seems all Fedora packages are built from epel7 branch.

8 months agoDistro: Add apkg packaging test
Jakub Ružička [Wed, 26 Apr 2023 15:26:30 +0000 (17:26 +0200)] 
Distro: Add apkg packaging test

The test was written by Maria Matejka, thanks!

Run this using

    apkg test

8 months agoDistro: Add apkg compat level
Jakub Ružička [Fri, 21 May 2021 02:48:27 +0000 (04:48 +0200)] 
Distro: Add apkg compat level

This will allow compatibility on future apkg config updates.

8 months agoDebian: Fix for arm64 cross build
Jakub Ružička [Wed, 3 May 2023 12:13:21 +0000 (14:13 +0200)] 
Debian: Fix for arm64 cross build

Mirrors debian patch.

8 months agoDebian: Use {{ now }} in changelog
Jakub Ružička [Thu, 20 Oct 2022 16:47:09 +0000 (18:47 +0200)] 
Debian: Use {{ now }} in changelog

8 months agoDebian: Bump compat level to 11
Jakub Ružička [Wed, 22 Feb 2023 18:01:31 +0000 (19:01 +0100)] 
Debian: Bump compat level to 11

Current is 13, remaining blockers:

- Debian 9 @ 11 (EOL)
- Ubuntu 18.04 @ 12 (EOL 2023-04-02)

8 months agoDebian: Sync packaging with Debian
Jakub Ružička [Tue, 7 Feb 2023 18:20:52 +0000 (19:20 +0100)] 
Debian: Sync packaging with Debian

8 months agoDebian: Add birdcl manpage
Jakub Ružička [Tue, 7 Feb 2023 18:19:57 +0000 (19:19 +0100)] 
Debian: Add birdcl manpage

Mirrors Debian package change.

8 months agoRPM: Add missing BuildRequires: autoconf
Jakub Ružička [Thu, 20 May 2021 16:07:46 +0000 (18:07 +0200)] 
RPM: Add missing BuildRequires: autoconf

8 months agoUse more proper pointers to constant bytestrings
Alexander Zubkov [Tue, 22 Aug 2023 12:44:18 +0000 (14:44 +0200)] 
Use more proper pointers to constant bytestrings

8 months agoBGP: Update RFC reference
Ondrej Zajicek [Tue, 22 Aug 2023 12:20:59 +0000 (14:20 +0200)] 
BGP: Update RFC reference

RFC 5549 was obsoleted by RFC 8950.

9 months agoBMP: Improve peer_down handling
Ondrej Zajicek [Mon, 21 Aug 2023 23:24:21 +0000 (01:24 +0200)] 
BMP: Improve peer_down handling

Move all bmp_peer_down() calls to one place and make it synchronous with
BGP session down, ensuring that BMP receives peer_down before route
withdraws from flushing.

Also refactor bmp_peer_down_() message generating code.

9 months agoBMP: Use generic channel feed instead of direct walk over rtable
Ondrej Zajicek [Mon, 21 Aug 2023 02:20:32 +0000 (04:20 +0200)] 
BMP: Use generic channel feed instead of direct walk over rtable

Now we use rt_notify() and channels for both feed and notifications,
in both import tables (pre-policy) and regular tables (post-policy).

Remove direct walk in bmp_route_monitor_snapshot().

9 months agoNest: Use generic rte_announce() also for import tables
Ondrej Zajicek [Mon, 21 Aug 2023 02:17:21 +0000 (04:17 +0200)] 
Nest: Use generic rte_announce() also for import tables

Remove special rte_announce_in(), so we can use generic rte_announce()
for bot feed and notifications.

9 months agoBMP: Fix route timestamps
Ondrej Zajicek [Fri, 18 Aug 2023 13:39:08 +0000 (15:39 +0200)] 
BMP: Fix route timestamps

9 months agoBMP: Refactor route monitoring
Ondrej Zajicek [Fri, 18 Aug 2023 01:53:58 +0000 (03:53 +0200)] 
BMP: Refactor route monitoring

 - Manage BMP state through bmp_peer, bmp_stream, bmp_table structures
 - Use channels and rt_notify() hook for route announcements
 - Add support for post-policy monitoring
 - Send End-of-RIB even when there is no routes
 - Remove rte_update_in_notify() hook from import tables
 - Update import tables to support channels
 - Add bmp_hack (no feed / no flush) flag to channels

9 months agoBMP: Remove useless buffer
Ondrej Zajicek [Tue, 1 Aug 2023 16:39:38 +0000 (18:39 +0200)] 
BMP: Remove useless buffer

9 months agoBMP: Simplify route monitoring hooks
Ondrej Zajicek [Tue, 1 Aug 2023 15:56:56 +0000 (17:56 +0200)] 
BMP: Simplify route monitoring hooks

No need for *_begin(), *_commit(), and *_end() hooks. The hook *_notify()
is sufficient for everything.

10 months agoFixed a typo in documentation
Alexander Zubkov [Fri, 30 Jun 2023 11:16:09 +0000 (13:16 +0200)] 
Fixed a typo in documentation

The problem was the "/" symbol in the prefix mask that finished the formatting definition prematurely.