Ondrej Zajicek [Thu, 27 Mar 2025 16:43:56 +0000 (17:43 +0100)]
BFD: Fix crash related to reconfiguration and passwords
Any change in BFD iface configuration should trigger session
reconfiguration, as config is copied into the bfd_session structure
and not just accessed through the bfd_iface structure.
As bfd_session now contains a pointer to the password list allocated
from the configuration, forgetting to update the bfd_session causes
use-after-free.
Ondrej Zajicek [Mon, 24 Mar 2025 16:09:25 +0000 (17:09 +0100)]
BGP: Add option to specify format of link-local next hop
When a BGP session is established using link-local next hop addresses,
there is no global IPv6 address for next hop. Implementations differ on
how to encode such next hop. This leads to interoperability problems.
Add the option 'link local next hop format' to specify which format to
use when encoding such next hops.
Based on a patch from Andrey V. Elsukov and Georgy Kirichenko, submitted
by Aleksandr Stepanov, thanks!
Ondrej Zajicek [Thu, 6 Mar 2025 02:43:15 +0000 (03:43 +0100)]
Nest: Fix locking of tables by channels
Channels that are down keep ptr on routing tables but do not keep them
locked. It is safe because the existence of tables depend on being
configured. But when a table is removed during reconfiguration, the
channel kept a dangling pointer since it fell down until it was removed.
This could be triggered by 'show protocols all' and other similar.
Change locking so that a channel kept a table locked for its whole
existence. The same change is already in BIRD 3.
Note that this is somewhat conceptually problematic as downed channels
do not keep resources. Also, other objects in specialized channels
(igp_table, base_table in bgp_channel, mpls_domain / mpls_range in
mpls_channel) are still locked only when channel is active, but for
them it is easier to keep track that they are not accessed when
they are deconfigured.
Ondrej Zajicek [Thu, 9 Jan 2025 15:44:51 +0000 (16:44 +0100)]
lib: Unify alignment of allocators
Different internal allocators (memory blocks, linpools, and slabs) used
different way to compute alignment. Unify it to use alignment based on
standard max_align_t type.
On x86_64, this does not change alignment of memory blocks and linpools
(both old and new is 16), but it increases alignment of slabs from 8 to
16.
Maria Matejka [Sun, 19 Jan 2025 00:06:24 +0000 (01:06 +0100)]
Doc: autoconvertor of our SGML to Markdown
Some minor changes were done in the original documentation to allow for
easier conversion, and also to make the documentation a little bit more
strictly valid.
Ondrej Zajicek [Thu, 9 Jan 2025 15:44:51 +0000 (16:44 +0100)]
lib: Unify alignment of allocators
Different internal allocators (memory blocks, linpools, and slabs) used
different way to compute alignment. Unify it to use alignment based on
standard max_align_t type.
On x86_64, this does not change alignment of memory blocks and linpools
(both old and new is 16), but it increases alignment of slabs from 8 to
16.
Ondrej Zajicek [Tue, 17 Dec 2024 08:00:42 +0000 (09:00 +0100)]
Nest: Fix handling of 64-bit rte_src.private_id
The commit 21213be523baa7f2cbf0feaa617f265c55e9b17a expanded private_id
in route source to u64, but forgot to modify function arguments, so it
was still cropped at 32-bit, which may cause some collisions for L3VPN.
This patch fixes that.
Ondrej Zajicek [Thu, 12 Dec 2024 03:04:07 +0000 (04:04 +0100)]
Netlink: Handle onlink flag on BSD-Netlink
On BSD, the onlink flag is not tracked or reported by kernel. We are
using an heuristic that assigns the onlink flag to routes scanned from
the kernel. We should use the same heuristic even in BSD-Netlink
case, as the onlink flag is not reported here too.
Fabian Bläse [Tue, 10 Dec 2024 01:14:06 +0000 (02:14 +0100)]
Babel: fix seqno wrapping on seqno request
The Babel seqno wraps around when reaching its maximum value (UINT16_MAX).
When comparing seqnos, this has to be taken into account. Therefore,
plain number comparisons do not work.
Maria Matejka [Tue, 3 Dec 2024 16:27:09 +0000 (17:27 +0100)]
CI: test building single protocols
Several users build BIRD with excluded support for protocols they don't
need. Testing single-protocol builds; the assumption is that if single
protocols and all protocols are buildable, then possibly any reasonable
combination is buildable as well.
Ondrej Zajicek [Tue, 17 Dec 2024 08:00:42 +0000 (09:00 +0100)]
Nest: Fix handling of 64-bit rte_src.private_id
The commit 21213be523baa7f2cbf0feaa617f265c55e9b17a expanded private_id
in route source to u64, but forgot to modify function arguments, so it
was still cropped at 32-bit, which may cause some collisions for L3VPN.
This patch fixes that.
Ondrej Zajicek [Thu, 12 Dec 2024 03:04:07 +0000 (04:04 +0100)]
Netlink: Handle onlink flag on BSD-Netlink
On BSD, the onlink flag is not tracked or reported by kernel. We are
using an heuristic that assigns the onlink flag to routes scanned from
the kernel. We should use the same heuristic even in BSD-Netlink
case, as the onlink flag is not reported here too.