]> git.ipfire.org Git - thirdparty/bird.git/log
thirdparty/bird.git
7 days agoDoc: BFD update master
Ondrej Zajicek [Wed, 17 Apr 2024 15:07:47 +0000 (17:07 +0200)] 
Doc: BFD update

8 days agoBFD: Set password per session oz-test
Katerina Kubecova [Thu, 11 Apr 2024 12:53:39 +0000 (14:53 +0200)] 
BFD: Set password per session

13 days agoDoc: Fix datetime format for password entries
Ondrej Zajicek [Thu, 11 Apr 2024 16:54:23 +0000 (18:54 +0200)] 
Doc: Fix datetime format for password entries

In BIRD 1, we used DD-MM-YYYY, while in BIRD 2 we switched to the usual
format YYYY-MM-DD.

Thanks to Janne Pisilä for the bugreport.

2 weeks agoOSPF: Allow loopback nexthop in OSPFv3-IPv4
Ondrej Zajicek [Thu, 4 Apr 2024 16:37:26 +0000 (18:37 +0200)] 
OSPF: Allow loopback nexthop in OSPFv3-IPv4

In OSPFv3-IPv4 there is no requirement that link-local next hop announced
in Link-LSA must be in interface address range. Therefore, for interfaces
that do not have IPv4 address we can use some loopback IP address and
announce it as a next hop. Also we should accept such address.

4 weeks agoASPA: checks done in filters; no autoreload yet
Maria Matejka [Sun, 15 Oct 2023 21:52:46 +0000 (23:52 +0200)] 
ASPA: checks done in filters; no autoreload yet

4 weeks agoASPA: basic data structures and Static protocol support
Maria Matejka [Sun, 15 Oct 2023 14:04:36 +0000 (16:04 +0200)] 
ASPA: basic data structures and Static protocol support

4 weeks agoExpanded usage of stdbool.h to the whole BIRD
Maria Matejka [Sun, 15 Oct 2023 10:06:11 +0000 (12:06 +0200)] 
Expanded usage of stdbool.h to the whole BIRD

4 weeks agoNEWS and version update v2.15.1
Ondrej Zajicek [Fri, 22 Mar 2024 00:40:43 +0000 (01:40 +0100)] 
NEWS and version update

4 weeks agoStatic: Fix invalid combination of nexthop options
Ondrej Zajicek [Thu, 21 Mar 2024 23:40:06 +0000 (00:40 +0100)] 
Static: Fix invalid combination of nexthop options

BFD requires defined local IP, but for nexthop with onlink there might
not be such address. So we reject this combination of nexthop options.
This prevent crash where such combination of options is used.

4 weeks agoRevert "OSPF: On physical PtP links, skip next-hop resolving"
Ondrej Zajicek [Thu, 21 Mar 2024 14:59:26 +0000 (15:59 +0100)] 
Revert "OSPF: On physical PtP links, skip next-hop resolving"

This reverts commit 31aa62ae6d2e111e87c08b4b27a16ead968f0689.

4 weeks agoMerge commit '44e351d1522f0099687aac9fd65dcea73a04af43'
Ondrej Zajicek [Thu, 21 Mar 2024 14:58:52 +0000 (15:58 +0100)] 
Merge commit '44e351d1522f0099687aac9fd65dcea73a04af43'

5 weeks agoBabel: Fix build with limited set of protocols
Ondrej Zajicek [Tue, 19 Mar 2024 14:39:46 +0000 (15:39 +0100)] 
Babel: Fix build with limited set of protocols

5 weeks agoAggregator: Fix build with limited set of protocols
Ondrej Zajicek [Tue, 19 Mar 2024 14:39:19 +0000 (15:39 +0100)] 
Aggregator: Fix build with limited set of protocols

6 weeks agoStatic: Fix build with limited set of protocols
Michal Zagorski [Mon, 11 Mar 2024 11:57:13 +0000 (12:57 +0100)] 
Static: Fix build with limited set of protocols

6 weeks agoNEWS and version update v2.15
Ondrej Zajicek [Sun, 10 Mar 2024 17:57:04 +0000 (18:57 +0100)] 
NEWS and version update

7 weeks agoClient: Add support for completion of command options
Ondrej Zajicek [Tue, 5 Mar 2024 18:04:10 +0000 (19:04 +0100)] 
Client: Add support for completion of command options

We can easily extend command completion to handle also keywords for
command options. Help for command options is not yet supported.

7 weeks agoFilter: Add route attribute gw_mpls_stack
Ondrej Zajicek [Tue, 5 Mar 2024 15:38:24 +0000 (16:38 +0100)] 
Filter: Add route attribute gw_mpls_stack

Add route attribute gw_mpls_stack to make MPLS stack of route nexthop
accessible from filters. Its type is T_CLIST, which is really not correct
(as it is a list, while T_CLIST is a set). Therefore, we keep this
attribute *undocumented* and it will be *changed* without further notice.

Based on a patch from Trisha Biswas <tbiswas@fastly.com>, thanks!

7 weeks agoBFD: Add arguments to 'show bfd sessions' command
Ondrej Zajicek [Mon, 4 Mar 2024 22:20:53 +0000 (23:20 +0100)] 
BFD: Add arguments to 'show bfd sessions' command

Add several arguments to 'show bfd sessions' command to filter
the list of sessions.

7 weeks agoBFD: Improve 'show bfd sessions all' command
Ondrej Zajicek [Fri, 1 Mar 2024 17:39:09 +0000 (18:39 +0100)] 
BFD: Improve 'show bfd sessions all' command

7 weeks agoBFD: Show session for ip / ip prefix
Katerina Kubecova [Thu, 18 Jan 2024 11:36:48 +0000 (12:36 +0100)] 
BFD: Show session for ip / ip prefix

7 weeks agoBFD: show bfd sessions all
Katerina Kubecova [Tue, 16 Jan 2024 10:02:22 +0000 (11:02 +0100)] 
BFD: show bfd sessions all

2 months agoRPKI: Add 'local address' configuration option
Job Snijders [Thu, 22 Feb 2024 13:58:29 +0000 (14:58 +0100)] 
RPKI: Add 'local address' configuration option

Allow to explicitly configure the source IP address for RPKI-To-Router
sessions. Predictable source addresses are useful for minimizing the
holes to be poked in ACLs.

Changed from 'source address' to 'local address' by committer.

2 months agoBGP: Maintain valid route attribute flags even in local tables
Ondrej Zajicek [Tue, 20 Feb 2024 16:39:05 +0000 (17:39 +0100)] 
BGP: Maintain valid route attribute flags even in local tables

BGP route attributes have flags (Optional, Transitive) that are validated
on decode and set to valid value on export. But if such attribute is
modified by filter or set internally by BGP during import, then its flags
would be zero in local tables. That usually does not matter, as they are
not used locally and they were fixed on export, but invalid flags leaked
in BMP and MRT dumps.

Keep route attribute flags set to valid values even when set by filters
or modified by BGP.

2 months agoBGP: Update SendHoldTimer BGP Error code
Job Snijders [Sun, 18 Feb 2024 08:00:10 +0000 (09:00 +0100)] 
BGP: Update SendHoldTimer BGP Error code

IANA registered an "Early Allocation" BGP Error code for 'Send Hold
Timer Expired' event. Update BIRD to use that error code.

2 months agoStatic: Allow to define both nexthop and interface
Ondrej Zajicek [Fri, 16 Feb 2024 17:44:40 +0000 (18:44 +0100)] 
Static: Allow to define both nexthop and interface

Allow to define both nexthop and interface using iproute2-like syntax,
e.g.: route 10.0.0.0/16 via 10.1.0.1 dev "eth0";

Now we can avoid to use link-local scope hack (e.g. 10.1.0.1%eth0)
for cases where both nexthop and interface have to be defined.

Thanks to Marcin Saklak for the suggestion.

2 months agoNetlink: Fix spelling of krt_ssthresh / krt_lock_ssthresh
Ondrej Zajicek [Fri, 16 Feb 2024 13:54:17 +0000 (14:54 +0100)] 
Netlink: Fix spelling of krt_ssthresh / krt_lock_ssthresh

BIRD route attribute for RTAX_SSTHRESH metric was krt_sstresh instead of
krt_ssthresh. Fix that and keep old name as an depreacted alias.

2 months agoNetlink: Cleanups in route metrics
Ondrej Zajicek [Fri, 16 Feb 2024 13:29:54 +0000 (14:29 +0100)] 
Netlink: Cleanups in route metrics

- Add krt_fastopen_no_cookie atttibute
- Add missing krt_lock_* bits
- Fix krt_feature_allfrag
- Fix type of EA_KRT_LOCK and EA_KRT_FEATURES

2 months agoFilter: Add support for setting TCP congestion control algorithm
Ondrej Zajicek [Wed, 14 Feb 2024 13:01:04 +0000 (14:01 +0100)] 
Filter: Add support for setting TCP congestion control algorithm

Allow to set TCP congestion control algorithm using krt_congctl
route attribute.

Based on patch from Trisha Biswas <tbiswas@fastly.com>, thanks!

2 months agoFilter: Add support for string route attribute
Ondrej Zajicek [Wed, 14 Feb 2024 12:58:56 +0000 (13:58 +0100)] 
Filter: Add support for string route attribute

2 months agoBGP: Allow multiple EBGP neighbors with the same peer.
Alexander Zubkov [Wed, 7 Feb 2024 18:11:10 +0000 (19:11 +0100)] 
BGP: Allow multiple EBGP neighbors with the same peer.

We can distinguish BGP sessions if at least one side uses a different IP
address. Extend olock mechanism to handle local IP as a part of key, with
optional wildcard, so BGP sessions could local IP in the olock and not
block themselves.

2 months agobirdc: Do not execute cmd on noninteractive help request
Inrin [Tue, 6 Feb 2024 18:03:14 +0000 (19:03 +0100)] 
birdc: Do not execute cmd on noninteractive help request

The help command triggered by '?' keeps the message in readline buffer,
so it could be edited. For noninteractive shell it leads to an unexpected
side effect that `echo <cmd> ? | birdc` executes the command <cmd> after
showing its help. Avoid this by clearing the readline buffer in such case.

2 months agoBGP: Increase max length of notification data in error logs
Ondrej Zajicek [Tue, 6 Feb 2024 17:34:55 +0000 (18:34 +0100)] 
BGP: Increase max length of notification data in error logs

Increase max length of notification data in error logs from 16 to 128.
There is already enough space in the buffer.

Thanks to Marco d'Itri for the suggestion.

2 months agoNest: Fix bug in recursive routes with MPLS-labeled nexthops
Ondrej Zajicek [Sat, 27 Jan 2024 16:38:06 +0000 (17:38 +0100)] 
Nest: Fix bug in recursive routes with MPLS-labeled nexthops

When a recursive route with MPLS-labeled nexthop was exported to kernel
and read back, the nexthop_same() failed due to different labels_orig
field and kernel protocol reinstalled it unnecessarily.

For comparing hext hops, route cache has to distinguish ones with
different labels_orig, but KRT has to ignore that, so we need two
nexthop compare functions.

Thanks to Marcel Menzel for the bugreport.

3 months agoFilter: Tests for net_addr
Katerina Kubecova [Fri, 19 Jan 2024 10:54:25 +0000 (11:54 +0100)] 
Filter: Tests for net_addr

Minor changes by committer.

3 months agoTrivial code cleanups
Ondrej Zajicek [Mon, 22 Jan 2024 05:29:14 +0000 (06:29 +0100)] 
Trivial code cleanups

4 months agoRPKI: retry timer doesn't reset connections when more data is pending mq-fix-busy-rpki
Maria Matejka [Fri, 8 Dec 2023 19:53:20 +0000 (20:53 +0100)] 
RPKI: retry timer doesn't reset connections when more data is pending

With very busy deployments, RPKI may kill cache connection too early.
Instead of that, we want it to keep loading if any data is waiting to
be read and the reason for delay is just our congestion.

Also, when we kill the session because of actually slow cache, we want
to reload from scratch as the data we have is unreliable and nobody
knows whether the state is still valid.

4 months agoOSPF: Cleanup some warnings
Ondrej Zajicek [Wed, 13 Dec 2023 17:07:38 +0000 (18:07 +0100)] 
OSPF: Cleanup some warnings

4 months agoNest: Fix memory alignment in attribute cache
Ondrej Zajicek [Wed, 13 Dec 2023 16:46:16 +0000 (17:46 +0100)] 
Nest: Fix memory alignment in attribute cache

In attribute cache, adata structures were stored densely in one memory
block, without regard to alignment. Let's force at least u32 alignment.

4 months agoLog: Add support for UDP logging
Ondrej Zajicek [Wed, 13 Dec 2023 02:48:12 +0000 (03:48 +0100)] 
Log: Add support for UDP logging

Add support for UDP logging, using RFC 3164 syslog protocol.

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

4 months agoMerge commit 'bb094fb6'
Maria Matejka [Fri, 8 Dec 2023 11:09:30 +0000 (12:09 +0100)] 
Merge commit 'bb094fb6'

4 months agoRefactoring also net_roa_check
Maria Matejka [Fri, 8 Dec 2023 11:07:46 +0000 (12:07 +0100)] 
Refactoring also net_roa_check

Having 4 functions doing almost the same is more mess than three macros.

4 months agoMerge commit '54ddf90f'
Maria Matejka [Fri, 8 Dec 2023 07:30:30 +0000 (08:30 +0100)] 
Merge commit '54ddf90f'

4 months agoConf: debug tables
Maria Matejka [Thu, 7 Dec 2023 13:38:05 +0000 (14:38 +0100)] 
Conf: debug tables

For now just a dummy config but it is needed for forward
compatibility with v3.

4 months agoRefactoring of net_route
Maria Matejka [Thu, 7 Dec 2023 13:10:11 +0000 (14:10 +0100)] 
Refactoring of net_route

4 months agoTable: Adding route refresh begin and end debug messages
Maria Matejka [Thu, 7 Dec 2023 12:54:41 +0000 (13:54 +0100)] 
Table: Adding route refresh begin and end debug messages

4 months agoBGP: Send hold timer
Katerina Kubecova [Fri, 27 Oct 2023 15:11:06 +0000 (17:11 +0200)] 
BGP: Send hold timer

Implement BGP Send hold timer according to draft-ietf-idr-bgp-sendholdtimer.
The Send hold timer drops the session if the neighbor is sending keepalives,
but does not receive our messages, causing the TCP connection to stall.

5 months agoBGP: Add options to require BGP capabilities
Ondrej Zajicek [Thu, 23 Nov 2023 19:54:22 +0000 (20:54 +0100)] 
BGP: Add options to require BGP capabilities

Some BGP capabilities change the BGP behavior in a significant way, so if
the configuration depends on it, it is better to not establish BGP
session when the capability is not available.

Add several BGP option to require individual BGP capabilities during
session negotiation.

5 months agoBGP: Simplify capability handling
Ondrej Zajicek [Thu, 23 Nov 2023 16:18:04 +0000 (17:18 +0100)] 
BGP: Simplify capability handling

5 months agoOSPF: On physical PtP links, skip next-hop resolving
Soha Jin [Thu, 9 Nov 2023 13:33:25 +0000 (14:33 +0100)] 
OSPF: On physical PtP links, skip next-hop resolving

Signed-off-by: Soha Jin <soha@jin.sh>
Co-developed-by: Wende Tan <twd2.me@gmail.com>
6 months agoNest: Minor fixes in MPLS
Ondrej Zajicek [Wed, 25 Oct 2023 16:25:46 +0000 (18:25 +0200)] 
Nest: Minor fixes in MPLS

6 months agoDoc: prefix match prefix pattern definition typo (in sets of prefixes definition)
Michal Rada [Tue, 17 Oct 2023 12:58:14 +0000 (14:58 +0200)] 
Doc: prefix match prefix pattern definition typo (in sets of prefixes definition)

6 months agoUse RTA_MAX_SIZE in rta_do_cow()
Ondrej Zajicek [Tue, 14 Mar 2023 15:02:32 +0000 (16:02 +0100)] 
Use RTA_MAX_SIZE in rta_do_cow()

This allows to modify MPLS label stack in filters. Fixes a bug in
handling of 'gw_mpls' attribute.

6 months agoAutoconf: minor reduction of redundancy
Maria Matejka [Tue, 24 Oct 2023 10:40:52 +0000 (12:40 +0200)] 
Autoconf: minor reduction of redundancy

Joined BIRD_CHECK_GCC_OPTION and BIRD_ADD_GCC_OPTION.

6 months agoCI: Update for new netlab worker
Ondrej Zajicek [Tue, 17 Oct 2023 23:48:11 +0000 (01:48 +0200)] 
CI: Update for new netlab worker

 - Change tag from 'birdlab' to 'netlab'
 - Change path of gitlab-runner home dir
 - Use stayrtr from Debian

6 months agoCI: Add MPLS tests
Ondrej Zajicek [Mon, 16 Oct 2023 13:24:32 +0000 (15:24 +0200)] 
CI: Add MPLS tests

6 months agoMPLS: Fix issue with recursive MPLS routes
Ondrej Zajicek [Mon, 16 Oct 2023 13:21:36 +0000 (15:21 +0200)] 
MPLS: Fix issue with recursive MPLS routes

Recursive MPLS routes used hostentry from the original route, which
triggered different table than MPLS table, and therefore were not
updated.

6 months agoNEWS and version update v2.14
Ondrej Zajicek [Fri, 6 Oct 2023 16:53:25 +0000 (18:53 +0200)] 
NEWS and version update

6 months agoDoc: Minor fixes
Ondrej Zajicek [Fri, 6 Oct 2023 16:52:02 +0000 (18:52 +0200)] 
Doc: Minor fixes

6 months agoConf: Bytestrings with hex: should use the same general format as ones without.
Ondrej Zajicek [Fri, 6 Oct 2023 00:36:59 +0000 (02:36 +0200)] 
Conf: Bytestrings with hex: should use the same general format as ones without.

Either hex:01234567, or hex:01:23:45:67. No confusing formats like
hex:0123:4567:ab:cdef, which looks like there is an implicit zero byte.

6 months agoKRT: Allow to learn routes with RTPROT_KERNEL
Pavel Šorejs [Fri, 6 Oct 2023 02:31:19 +0000 (04:31 +0200)] 
KRT: Allow to learn routes with RTPROT_KERNEL

The Kernel protocol, even with the option 'learn' enabled, ignores
direct routes created by the OS kernel (on Linux these are routes
with rtm_protocol == RTPROT_KERNEL).

Implement optional behavior where both OS kernel and third-party routes
are learned, it can be enabled by 'learn all' option.

Minor changes by committer.

6 months agoBGP: Improve custom BGP attributes
Ondrej Zajicek [Thu, 5 Oct 2023 19:29:04 +0000 (21:29 +0200)] 
BGP: Improve custom BGP attributes

 - Implement EA_GET for custom BGP attributes
 - Forbid EA_SET on existing opaque attributes
 - Forbid redefining existing attributes
 - Document possible compatibility problems

6 months agoMPLS: Handle compatibility with old configs
Ondrej Zajicek [Thu, 5 Oct 2023 15:54:43 +0000 (17:54 +0200)] 
MPLS: Handle compatibility with old configs

Old configs do not define MPLS domains and may use a static protocol
to define static MPLS routes.

When MPLS channel is the only channel of static protocol, handle it
as a main channel. Also, define implicit MPLS domain if needed and
none is defined.

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

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

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

6 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

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

6 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

6 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

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

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

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

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

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

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

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

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

6 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;

6 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

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

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

6 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

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

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

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

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

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

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

6 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

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

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

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

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

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

6 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

7 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

7 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

7 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

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