]> git.ipfire.org Git - thirdparty/bird.git/log
thirdparty/bird.git
2 years agoMerge commit 'fc354788' into thread-next
Maria Matejka [Fri, 13 Oct 2023 09:32:53 +0000 (11:32 +0200)] 
Merge commit 'fc354788' into thread-next

2 years agoRIP: actually remove the interface structures on shutdown
Maria Matejka [Fri, 13 Oct 2023 09:23:21 +0000 (11:23 +0200)] 
RIP: actually remove the interface structures on shutdown

This avoids a spurious route update fail when protocol shutdown collides
with an incoming RIP packet.

2 years agoMerge commit 'e3c0eca9' into thread-next
Maria Matejka [Fri, 13 Oct 2023 09:04:39 +0000 (11:04 +0200)] 
Merge commit 'e3c0eca9' into thread-next

2 years agoProtocol: better granularity of pool management
Maria Matejka [Fri, 13 Oct 2023 08:22:09 +0000 (10:22 +0200)] 
Protocol: better granularity of pool management

There are now 3 different pools with specific lifetime. All of these are
available since protocol start, anyway they get freed in different
moments.

First, pool_up gets freed immediately after announcing PS_STOP, to e.g.
stop all timers and events regularly updating the routing table when the
imports are already flushing.

Then, pool_inloop gets freed just before the protocol loop is finally
stopped, after all channels, imports and exports and other hooks are
cleaned up.

And finally, the pool itself is freed the last. Unless you explicitly
need the early free, use this pool.

2 years agoMerge commit '5121101136cb80151a9361c63dc4822afeb44eef' into thread-next
Maria Matejka [Thu, 12 Oct 2023 12:12:33 +0000 (14:12 +0200)] 
Merge commit '5121101136cb80151a9361c63dc4822afeb44eef' into thread-next

2 years agoChannel: using a separate pool for export data
Maria Matejka [Thu, 12 Oct 2023 08:07:57 +0000 (10:07 +0200)] 
Channel: using a separate pool for export data

2 years agoMerge commit 'e2f08c382a2adbbbd94c5cd7d996ce9175e0fb9c' into HEAD
Maria Matejka [Thu, 12 Oct 2023 09:38:16 +0000 (11:38 +0200)] 
Merge commit 'e2f08c382a2adbbbd94c5cd7d996ce9175e0fb9c' into HEAD

2 years agoMerge commit '4972590e' into thread-next
Maria Matejka [Thu, 12 Oct 2023 07:29:51 +0000 (09:29 +0200)] 
Merge commit '4972590e' into thread-next

2 years agoBGP/BMP: fixed build with no bmp at all
Maria Matejka [Thu, 12 Oct 2023 08:57:55 +0000 (10:57 +0200)] 
BGP/BMP: fixed build with no bmp at all

2 years agoBGP: dropped bgp_fix_attr_flags() (useless remnant from previous versions)
Maria Matejka [Thu, 12 Oct 2023 07:29:09 +0000 (09:29 +0200)] 
BGP: dropped bgp_fix_attr_flags() (useless remnant from previous versions)

2 years agoMerge commit 'b20b6a9ad204f2648ed3d62720435bb21dfb947c' into thread-next
Maria Matejka [Wed, 11 Oct 2023 20:26:41 +0000 (22:26 +0200)] 
Merge commit 'b20b6a9ad204f2648ed3d62720435bb21dfb947c' into thread-next

2 years agoBGP/BMP: Moved temporary allocation checks to the freeing functions
Maria Matejka [Wed, 11 Oct 2023 20:23:34 +0000 (22:23 +0200)] 
BGP/BMP: Moved temporary allocation checks to the freeing functions

2 years agoMerge branch 'mq-bmp-to-merge-to-v3' into thread-next
Maria Matejka [Wed, 11 Oct 2023 20:06:18 +0000 (22:06 +0200)] 
Merge branch 'mq-bmp-to-merge-to-v3' into thread-next

2 years agoMerge commit '2d988f71a5c3caf3b56426a45d4d234c4fd4fce7' into thread-next
Maria Matejka [Wed, 11 Oct 2023 12:16:39 +0000 (14:16 +0200)] 
Merge commit '2d988f71a5c3caf3b56426a45d4d234c4fd4fce7' into thread-next

2 years agoMerge commit '6e908775' into thread-next
Maria Matejka [Wed, 11 Oct 2023 11:28:30 +0000 (13:28 +0200)] 
Merge commit '6e908775' into thread-next

2 years agoMerge branch 'mq-bmp-to-merge-to-v3' into HEAD
Maria Matejka [Tue, 10 Oct 2023 13:04:26 +0000 (15:04 +0200)] 
Merge branch 'mq-bmp-to-merge-to-v3' into HEAD

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

2 years agoConf: Improve handling of keywords
Ondrej Zajicek [Thu, 27 Apr 2023 16:20:49 +0000 (18:20 +0200)] 
Conf: Improve handling of keywords

For whatever reason, parser allocated a symbol for every parsed keyword
in each scope. That wasted time and memory. The effect is worsened with
recent changes allowing local scopes, so keywords often promote soft
scopes (with no symbols) to real scopes.

Do not allocate a symbol for a keyword. Take care of keywords that could
be promoted to symbols (kw_sym) and do it explicitly.

2 years agoConf: Fix symbol lookup
Ondrej Zajicek [Thu, 27 Apr 2023 15:09:00 +0000 (17:09 +0200)] 
Conf: Fix symbol lookup

The symbol table used just symbol name as a key, and used a trick with
active flag to find symbols in active scopes with one hash table lookup.

The disadvantage is that it can degenerate to O(n) for negative queries
in situations where are many symbols with the same name in different
scopes.

Thanks to Yanko Kaneti for the bugreport.

2 years agoChannel: Refeeding by an auxiliary request if needed.
Maria Matejka [Fri, 29 Sep 2023 14:24:50 +0000 (16:24 +0200)] 
Channel: Refeeding by an auxiliary request if needed.

If the protocol supports route refresh on export, we keep the stop-start
method of route refeed. This applies for BGP with ERR or with export
table on, for OSPF, Babel, RIP or Pipe.

For BGP without ERR or for future selective ROA reloads, we're adding an
auxiliary export request, doing the refeed while the main export request
is running, somehow resembling the original method of BIRD 2 refeed.

There is also a refeed request queue to keep track of different refeed
requests.

2 years agoBabel: Properly handle route refeed
Maria Matejka [Wed, 27 Sep 2023 14:47:25 +0000 (16:47 +0200)] 
Babel: Properly handle route refeed

2 years agoRIP: Properly handle route refeed
Maria Matejka [Wed, 27 Sep 2023 14:29:44 +0000 (16:29 +0200)] 
RIP: Properly handle route refeed

2 years agoBabel: Remove interfaces on shutdown
Maria Matejka [Mon, 25 Sep 2023 07:31:18 +0000 (09:31 +0200)] 
Babel: Remove interfaces on shutdown

This avoids calling interface timer between Babel going
PS_DOWN and finally cleaning up the resource pool.

2 years agoKernel: refeed routes and delete them from kernel before actual shutdown
Maria Matejka [Sun, 24 Sep 2023 20:20:27 +0000 (22:20 +0200)] 
Kernel: refeed routes and delete them from kernel before actual shutdown

2 years agoProtocols have now assigned startup phases
Maria Matejka [Sun, 24 Sep 2023 21:22:43 +0000 (23:22 +0200)] 
Protocols have now assigned startup phases

For now, there are 4 phases: Necessary (device), Connector (kernel, pipe), Generator (static, rpki) and Regular.
Started and reconfigured are from Necessary to Regular, shutdown backwards.

This way, kernel can flush routes before actually being shutdown.

2 years agoIface: trace log messages cleanup
Maria Matejka [Sun, 24 Sep 2023 20:20:01 +0000 (22:20 +0200)] 
Iface: trace log messages cleanup

2 years agoTable: Added some journal and export tracing
Maria Matejka [Sun, 24 Sep 2023 10:15:26 +0000 (12:15 +0200)] 
Table: Added some journal and export tracing

2 years agoTable: Fixed feed race condition
Maria Matejka [Sun, 24 Sep 2023 09:47:24 +0000 (11:47 +0200)] 
Table: Fixed feed race condition

The problem happened like this:

1. Single route for the given net in table
2. A feed is started
3. The route is deleted (from another thread)
4. The feed finds an empty net, exports nothing, ignores journal (here is bug)
5. The route is added
6. The export transitions from FEEDING to READY
7. While processing the journal, the route deletion and addition combines into noop.

This way routes mysteriously disappeared in specific cases of link instability.

Problem fixed by explicitly marking the empty-net journal entries as processed in step 4.

2 years agoExport: More strict export state checking on change
Maria Matejka [Tue, 15 Aug 2023 10:31:28 +0000 (12:31 +0200)] 
Export: More strict export state checking on change

2 years agoProperly consted routes inside table
Maria Matejka [Mon, 3 Jul 2023 18:38:24 +0000 (20:38 +0200)] 
Properly consted routes inside table

2 years agoFilter iterator accepts lines instead of filter
Maria Matejka [Sun, 2 Jul 2023 13:10:39 +0000 (15:10 +0200)] 
Filter iterator accepts lines instead of filter

2 years agoRenamed channel class pointers
Vojtech Vilimek [Thu, 14 Sep 2023 13:21:53 +0000 (15:21 +0200)] 
Renamed channel class pointers

The channel class pointers were strangely named , not .

2 years agoLogging: fixed size logfiles behaving as mmapped ringbuffers
Maria Matejka [Thu, 24 Aug 2023 15:00:54 +0000 (17:00 +0200)] 
Logging: fixed size logfiles behaving as mmapped ringbuffers

This variant of logging avoids calling write() for every log line,
allowing for waitless logging. This makes heavy logging less heavy
and more useful for race condition debugging.

2 years agoLogging limit enforcement moved into the rfile structure
Maria Matejka [Thu, 24 Aug 2023 13:38:44 +0000 (15:38 +0200)] 
Logging limit enforcement moved into the rfile structure

2 years agoLogging now doesn't lock with each message
Maria Matejka [Mon, 21 Aug 2023 16:44:10 +0000 (18:44 +0200)] 
Logging now doesn't lock with each message

The original logging routines were locking a common mutex. This led to
massive underperformance and unwanted serialization when heavily logging
due to lock contention. Now the logging is lockless, though still
serializing on write() syscalls to the same filedescriptor.

This change also brings in a persistent logging channel structures and
thus avoids writing into active configuration data structures during
regular run.

2 years agoThreads: added a generic method to run in all threads
Maria Matejka [Mon, 21 Aug 2023 18:56:19 +0000 (20:56 +0200)] 
Threads: added a generic method to run in all threads

2 years agoLogging: Abolished stdio in favor of write() to make the logging faster.
Maria Matejka [Wed, 16 Aug 2023 13:05:36 +0000 (15:05 +0200)] 
Logging: Abolished stdio in favor of write() to make the logging faster.

2 years agoCLI: Dropping the mechanism of echoing log messages
Maria Matejka [Tue, 15 Aug 2023 15:05:58 +0000 (17:05 +0200)] 
CLI: Dropping the mechanism of echoing log messages

This is better done by running tail -f on a logfile.

2 years agoBGP: When debug { routes } is set, updates considered as loop are logged
Maria Matejka [Thu, 14 Sep 2023 12:44:35 +0000 (14:44 +0200)] 
BGP: When debug { routes } is set, updates considered as loop are logged

2 years agoEnhanced tracing of route refresh state
Maria Matejka [Thu, 14 Sep 2023 12:40:33 +0000 (14:40 +0200)] 
Enhanced tracing of route refresh state

2 years agoHostentry application locking
Maria Matejka [Mon, 28 Aug 2023 13:36:40 +0000 (15:36 +0200)] 
Hostentry application locking

Due to a race condition between rta_apply_hostentry() and rt_update_hostentry(),
happening when a new route is inserted to a table, this commit makes it mandatory
to lock the next hop resolution table while resolving the next hop.

This may be slow, we'll fix it better in some future release

2 years agoConfig obstacles are lockless now
Maria Matejka [Mon, 21 Aug 2023 13:37:09 +0000 (15:37 +0200)] 
Config obstacles are lockless now

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

2 years 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!

2 years 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!

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

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

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

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

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

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

2 years 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)

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

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

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

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

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

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

2 years 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().

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

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

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

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

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

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

2 years agoRAdv: Use new syntax for custom options
Alexander Zubkov [Mon, 26 Jun 2023 13:35:22 +0000 (15:35 +0200)] 
RAdv: Use new syntax for custom options

And use WALK_LIST macro

2 years agoRAdv: Add custom options
Alexander Zubkov [Fri, 23 Jun 2023 15:21:05 +0000 (17:21 +0200)] 
RAdv: Add custom options

Currently one can use only a predefined set of advertised options in RAdv
protocol, which are supported by BIRD configuration. It would be convenient
to be able to specify other possible options at least manually as a blob
so one should not wait until it is supported in the code, released, etc.

This idea is inspired by presentation by Ondřej Caletka at CSNOG, in which
he noticed the lack of either PREF64 option or possibility to add custom
options in various software.

The patch makes it possible to define such options with the syntax:

  other type <num> <bytestring>

2 years agoAdd hex:XYZ syntax for short hex strings
Alexander Zubkov [Fri, 23 Jun 2023 14:47:37 +0000 (16:47 +0200)] 
Add hex:XYZ syntax for short hex strings

Hexadecimal bytestring literals have minimal length to not collide
with IP addresses or regular (hexadecimal) number literals.

Allow to use shorter literals with explicit hex: prefix.

2 years agoMerge tag 'v2.13.1'
Maria Matejka [Thu, 22 Jun 2023 15:25:18 +0000 (17:25 +0200)] 
Merge tag 'v2.13.1'

2 years agoNEWS and version update stable-2.13 v2.13.1
Maria Matejka [Thu, 22 Jun 2023 14:14:12 +0000 (16:14 +0200)] 
NEWS and version update

2 years agoFilter: Fixed segfault when a case option had an empty block
Maria Matejka [Thu, 22 Jun 2023 14:07:28 +0000 (16:07 +0200)] 
Filter: Fixed segfault when a case option had an empty block

Thanks to Kobayashi_Bairuo <noc@tohunet.com> for reporting.

2 years agoBGP: Fix role check when no capability option is present
Ondrej Zajicek [Thu, 18 May 2023 23:02:57 +0000 (01:02 +0200)] 
BGP: Fix role check when no capability option is present

When an OPEN message without capability options was parsed, the remote
role field was not initialized with the proper (non-zero) default value,
so it was interpreted as if 'provider' was announced.

Thanks to Mikhail Grishin for the bugreport.

2 years agoNetlink: Allow RTA_VIA even without MPLS support
Luiz Amaral [Thu, 15 Jun 2023 13:01:50 +0000 (15:01 +0200)] 
Netlink: Allow RTA_VIA even without MPLS support

It is necessary for IPv4 over IPv6 nexthop support on FreeBSD,
and RTA_VIA is not really related to MPLS.

It breaks build for some very old systems like Debian 8 and CentOS 7,
but we generally do not support older kernels than 4.14 LTS anyway.

2 years agoCI: Remove obsolete CI targets
Ondrej Zajicek [Thu, 15 Jun 2023 13:50:18 +0000 (15:50 +0200)] 
CI: Remove obsolete CI targets

Remove build-debian-8, build-ubuntu-14_04, build-centos-7, pkg-debian-9,
and pkg-centos-7 targets.

Debian 8, Ubuntu 14.04, and CentOS 7 have unsupported kernels, Debian 9
has okay kernel, but is EOL.

2 years agoBMP: Ensure that bmp_fire_tx() does nothing when not up
Ondrej Zajicek [Thu, 8 Jun 2023 03:10:05 +0000 (05:10 +0200)] 
BMP: Ensure that bmp_fire_tx() does nothing when not up

2 years agoBMP: Support multiple instances of BMP protocol
Ondrej Zajicek [Thu, 8 Jun 2023 02:56:41 +0000 (04:56 +0200)] 
BMP: Support multiple instances of BMP protocol

Add internal BMP functions with plicit bmp_proto *p as first argument,
which allows using TRACE() macro. Keep list of BMP instances and call
internal functions. Old BMP functions are wrappers that call internal
functions for all enabled BMP instances.

Extract End-of-RIB mark into separate function.

Based on patch from Michal Zagorski <mzagorsk@akamai.com>. Thanks!

2 years agoBabel: Minor changes to RTT formatting
Ondrej Zajicek [Fri, 2 Jun 2023 00:34:05 +0000 (02:34 +0200)] 
Babel: Minor changes to RTT formatting

Use existing %t printf code and move 'ms' in CLI output to table header.

2 years agoBabel: Add support for the RTT extension
Toke Høiland-Jørgensen [Thu, 1 Jun 2023 22:31:53 +0000 (00:31 +0200)] 
Babel: Add support for the RTT extension

This adds support to the Babel protocol for the RTT extension specified
in draft-ietf-babel-rtt-extension. While this extension is not yet at the
RFC stage, it is one of the more useful extensions to Babel[0], so it
seems worth having in Bird as well.

The extension adds timestamps to Hello and IHU TLVs and uses these to
compute an RTT to each neighbour. An extra per-neighbour cost is then
computed from the RTT based on a minimum and maximum interval and cost
value specified in the configuration. The primary use case for this is
improving routing in a geographically distributed tunnel-based overlay
network.

The implementation follows the babeld implementation when picking
constants and default configuration values. It also uses the same RTT
smoothing algorithm as babeld, and follows it in adding a new 'tunnel'
interface type which enables RTT by default.

[0] https://alioth-lists.debian.net/pipermail/babel-users/2022-April/003932.html

2 years agoIO: Add current_time_now() function for immediate timestamp
Toke Høiland-Jørgensen [Thu, 1 Jun 2023 22:26:41 +0000 (00:26 +0200)] 
IO: Add current_time_now() function for immediate timestamp

Add a current_time_now() function which gets an immediate monotonic
timestamp instead of using the cached value from the event loop. This is
useful for callers that need precise times, such as the Babel RTT
measurement code.

Minor changes by committer.

2 years agoBMP: Fix bug in buffer resize
Ondrej Zajicek [Wed, 31 May 2023 16:32:53 +0000 (18:32 +0200)] 
BMP: Fix bug in buffer resize

The buffer code in bmp_buffer_grow(), reuse the MRT buffer handling code.

Based on comments by Michal Zagorski <mzagorsk@akamai.com>, Thanks!

2 years agoBMP: Proper reconfiguration and protocol status
Ondrej Zajicek [Wed, 31 May 2023 15:41:53 +0000 (17:41 +0200)] 
BMP: Proper reconfiguration and protocol status

Based on patches from Michal Zagorski <mzagorsk@akamai.com> co-authored
with Pawel Maslanka <pmaslank@akamai.com>. Thanks!

2 years agoBMP: Add station address check
Ondrej Zajicek [Tue, 30 May 2023 15:23:56 +0000 (17:23 +0200)] 
BMP: Add station address check

Also, do not initialize it to IPA_NONE4, use regular IPA_NONE.

2 years agoBMP: Add local address option
Michal Zagorski [Tue, 30 May 2023 15:09:25 +0000 (17:09 +0200)] 
BMP: Add local address option

Also remove unused local and ip_post_policy options.

Co-authored with Pawel Maslanka <pmaslank@akamai.com>.

Minor changes by committer.

2 years agoBMP: Minor formatting cleanups
Ondrej Zajicek [Tue, 30 May 2023 13:52:01 +0000 (15:52 +0200)] 
BMP: Minor formatting cleanups

Based on patches from Michal Zagorski <mzagorsk@akamai.com> co-authored
with Pawel Maslanka <pmaslank@akamai.com>. Thanks!

2 years agoBGP: Improve bgp_create_update_bmp()
Ondrej Zajicek [Tue, 30 May 2023 13:37:52 +0000 (15:37 +0200)] 
BGP: Improve bgp_create_update_bmp()

Fix issue with missing AF cap (e.g. IPv4 unicast when no capabilities
are announced).

Add Linpool save/restore action similar to bgp_create_update().

Based on patch from Michal Zagorski <mzagorsk@akamai.com> co-authored
with Pawel Maslanka <pmaslank@akamai.com>. Thanks!

2 years agoBFD: Fixed reconfiguration issues
Maria Matejka [Mon, 29 May 2023 17:32:26 +0000 (19:32 +0200)] 
BFD: Fixed reconfiguration issues

After converting BFD to the new IO loop system, reconfiguration never
really worked. Sadly, we missed this case in our testing suite so it
passed under the radar for quite a while.

Thanks to Andrei Dinu <andrei.dinu@digitalit.ro> for reporting and
isolating this issue.

2 years agoBGP: Fix role check when no capability option is present
Ondrej Zajicek [Thu, 18 May 2023 23:02:57 +0000 (01:02 +0200)] 
BGP: Fix role check when no capability option is present

When an OPEN message without capability options was parsed, the remote
role field was not initialized with the proper (non-zero) default value,
so it was interpreted as if 'provider' was announced.

Thanks to Mikhail Grishin for the bugreport.

2 years agoLib: Improve IP/net hashing
Ondrej Zajicek [Thu, 18 May 2023 13:55:45 +0000 (15:55 +0200)] 
Lib: Improve IP/net hashing

Backport some changes from branch oz-parametric-hashes. Replace naive
hash function for IPv6 addresses, fix hashing of VPNx (where upper half
of RD was ignored), fix hashing of MPLS labels (where identity was used).

2 years agoNest: Add tests and benchmark for FIB
Ondrej Zajicek [Tue, 16 May 2023 11:25:48 +0000 (13:25 +0200)] 
Nest: Add tests and benchmark for FIB

Basic fib_get() / fib_find() test for random prefixes, FIB_WALK() test,
and benchmark for fib_find(). Also generalize and reuse some code from
trie tests.

2 years agoFixed abort when running in foreground but stdin is closed
Maria Matejka [Sat, 13 May 2023 18:33:35 +0000 (20:33 +0200)] 
Fixed abort when running in foreground but stdin is closed

A forgotten else-clause caused BIRD to treat some pseudo-random place in
memory as fd-pair. This was happening only on startup of the first
thread in group and the value there in memory was typically zero ... and
writing to stdin succeeded.

When running BIRD with stdin not present (like systemd does), it died on
this spurious write. Now it seems to work correctly.

Thanks to Daniel Suchy <danny@danysek.cz> for reporting.

http://trubka.network.cz/pipermail/bird-users/2023-May/016929.html

2 years agoNEWS and version update v3.0-alpha2
Maria Matejka [Thu, 11 May 2023 09:37:48 +0000 (11:37 +0200)] 
NEWS and version update

2 years agoFix use-after free in thread stopping code
Maria Matejka [Tue, 9 May 2023 21:31:47 +0000 (23:31 +0200)] 
Fix use-after free in thread stopping code

2 years agoBGP: fix listen socket cleanup
Maria Matejka [Mon, 8 May 2023 16:57:32 +0000 (18:57 +0200)] 
BGP: fix listen socket cleanup

2 years agoID Maps are checking whether their pool is locked
Maria Matejka [Mon, 8 May 2023 13:13:49 +0000 (15:13 +0200)] 
ID Maps are checking whether their pool is locked

2 years agoProperly protecting the route src global index by RCU read lock and atomic operations
Maria Matejka [Mon, 8 May 2023 11:09:02 +0000 (13:09 +0200)] 
Properly protecting the route src global index by RCU read lock and atomic operations

There was a bug occuring when one thread sought for a src by its global id
and another one was allocating another src with such an ID that it caused
route src global index reallocation. This brief moment of inconsistency
led to a rare use-after-free of the old global index block.

2 years agoThreads take loops faster
Maria Matejka [Sun, 7 May 2023 21:40:38 +0000 (23:40 +0200)] 
Threads take loops faster

2 years agoChannel: configurable feed block size
Maria Matejka [Sun, 7 May 2023 21:04:47 +0000 (23:04 +0200)] 
Channel: configurable feed block size

2 years agoBGP: proactively rehash prefix hash up to shorten collision lists
Maria Matejka [Sun, 7 May 2023 19:39:05 +0000 (21:39 +0200)] 
BGP: proactively rehash prefix hash up to shorten collision lists

2 years agoOLocks in BGP must be freed early
Maria Matejka [Sun, 7 May 2023 15:30:33 +0000 (17:30 +0200)] 
OLocks in BGP must be freed early

2 years agoIO Loop / Thread Groups Lock moved to level -attrs- to allow for page allocation...
Maria Matejka [Fri, 5 May 2023 18:35:55 +0000 (20:35 +0200)] 
IO Loop / Thread Groups Lock moved to level -attrs- to allow for page allocation while locked