]> git.ipfire.org Git - thirdparty/bird.git/log
thirdparty/bird.git
4 years agoTrie: Clarify handling of less-common net types
Ondrej Zajicek (work) [Mon, 29 Nov 2021 18:00:24 +0000 (19:00 +0100)] 
Trie: Clarify handling of less-common net types

For convenience, Trie functions generally accept as input values not only
NET_IPx types of nets, but also NET_VPNx and NET_ROAx types. But returned
values are always NET_IPx types.

4 years agoMemory statistics split into Effective and Overhead
Maria Matejka [Fri, 26 Nov 2021 23:21:12 +0000 (00:21 +0100)] 
Memory statistics split into Effective and Overhead

This feature is intended mostly for checking that BIRD's allocation
strategies don't consume much memory space. There are some cases where
withdrawing routes in a specific order lead to memory fragmentation and
this output should give the user at least a notion of how much memory is
actually used for data storage and how much memory is "just allocated"
or used for overhead.

Also raising the "system allocator overhead estimation" from 8 to 16
bytes; it is probably even more. I've found 16 as a local minimum in
best scenarios among reachable machines. I couldn't find any reasonable
method to estimate this value when BIRD starts up.

This commit also fixes the inaccurate computation of memory overhead for
slabs where the "system allocater overhead estimation" was improperly
added to the size of mmap-ed memory.

4 years agoTrie: Implement longest-prefix-match queries and walks
Ondrej Zajicek (work) [Fri, 26 Nov 2021 02:26:36 +0000 (03:26 +0100)] 
Trie: Implement longest-prefix-match queries and walks

The prefix trie now supports longest-prefix-match query by function
trie_match_longest_ipX() and it can be extended to iteration over all
covering prefixes for a given prefix (from longest to shortest) using
TRIE_WALK_TO_ROOT_IPx() macro.

4 years agoDirectly mapped pages are kept for future use if temporarily not needed
Maria Matejka [Wed, 24 Nov 2021 16:30:13 +0000 (17:30 +0100)] 
Directly mapped pages are kept for future use if temporarily not needed

4 years agoTrie: Implement trie walking code
Ondrej Zajicek (work) [Fri, 19 Nov 2021 17:04:32 +0000 (18:04 +0100)] 
Trie: Implement trie walking code

Trie walking allows enumeration of prefixes in a trie in the usual
lexicographic order. Optionally, trie enumeration can be restricted
to a chosen subnet (and its descendants).

4 years agoTrie: Simplify network matching code
Ondrej Zajicek (work) [Sat, 13 Nov 2021 20:11:18 +0000 (21:11 +0100)] 
Trie: Simplify network matching code

Introduce ipX_prefix_equal() and use it to simplify network matching code.

4 years agoExtended route trace: logging Path Identifiers
Maria Matejka [Tue, 9 Nov 2021 16:42:36 +0000 (17:42 +0100)] 
Extended route trace: logging Path Identifiers

4 years agoConf: Fix crash during shutdown
Ondrej Zajicek (work) [Tue, 19 Oct 2021 23:51:28 +0000 (01:51 +0200)] 
Conf: Fix crash during shutdown

BIRD implements shutdown by reconfiguring to fake empty configuration.
Such fake config structure is created from the last running config and
shares some data, including symbol table. This allows access to (removed)
routing tables and causes crash when 'show route' command is used during
shutdown.

Clean up symbol table, table list and links to default tables, so removed
routing tables cannot be accessed during shutdown.

4 years agoDropping the unused rte_same hook
Maria Matejka [Tue, 14 Sep 2021 09:20:16 +0000 (11:20 +0200)] 
Dropping the unused rte_same hook

4 years agoDropping rte-local dumper entries
Maria Matejka [Mon, 17 Feb 2020 11:42:14 +0000 (12:42 +0100)] 
Dropping rte-local dumper entries

4 years agoKernel: Convert the rte-local attributes to extended attributes and flags to pflags
Maria Matejka [Thu, 13 Feb 2020 15:59:53 +0000 (16:59 +0100)] 
Kernel: Convert the rte-local attributes to extended attributes and flags to pflags

4 years agoRoute: moved rte_src pointer from rta to rte
Maria Matejka [Fri, 10 Apr 2020 15:08:29 +0000 (17:08 +0200)] 
Route: moved rte_src pointer from rta to rte

It is an auxiliary key in the routing table, not a route attribute.

4 years agoPreexport: No route modification, no linpool needed
Maria Matejka [Sun, 12 Apr 2020 19:54:20 +0000 (21:54 +0200)] 
Preexport: No route modification, no linpool needed

4 years agoRIP fixup + dropping the tmp_attrs mechanism as obsolete
Maria Matejka [Thu, 16 Sep 2021 09:00:19 +0000 (11:00 +0200)] 
RIP fixup + dropping the tmp_attrs mechanism as obsolete

4 years agoDropping the RTS_DUMMY temporary route storage.
Maria Matejka [Mon, 17 Feb 2020 10:18:32 +0000 (11:18 +0100)] 
Dropping the RTS_DUMMY temporary route storage.

Kernel route sync is done by other ways now and this code is not used
currently.

4 years agoPreference moved to RTA and set explicitly in protocols
Maria Matejka [Mon, 10 Feb 2020 07:41:05 +0000 (08:41 +0100)] 
Preference moved to RTA and set explicitly in protocols

4 years agoExport table: Delay freeing of old stored route.
Maria Matejka [Sat, 20 Mar 2021 20:16:12 +0000 (21:16 +0100)] 
Export table: Delay freeing of old stored route.

This is needed to provide the protocols the full old route after filters
when export table is enabled.

4 years agoBGP: Moved the suppressed and stale flags to pflags
Maria Matejka [Mon, 10 Feb 2020 14:01:36 +0000 (15:01 +0100)] 
BGP: Moved the suppressed and stale flags to pflags

4 years agoBabel: Convert the rte-local attributes to extended attributes
Maria Matejka [Thu, 13 Feb 2020 12:22:15 +0000 (13:22 +0100)] 
Babel: Convert the rte-local attributes to extended attributes

4 years agoThere may be a symbol with NULL protocol when reconfiguring
Maria Matejka [Wed, 8 Sep 2021 15:30:09 +0000 (15:30 +0000)] 
There may be a symbol with NULL protocol when reconfiguring

4 years agoOSPF: Convert the rte-local attributes to extended attributes
Maria Matejka [Tue, 11 Feb 2020 20:24:15 +0000 (21:24 +0100)] 
OSPF: Convert the rte-local attributes to extended attributes

4 years agoShow route may be accidentally called on shutdown also when not all default tables...
Maria Matejka [Wed, 8 Sep 2021 08:33:25 +0000 (08:33 +0000)] 
Show route may be accidentally called on shutdown also when not all default tables are present

4 years agoRIP: convert the rte-local attributes to extended attributes
Maria Matejka [Tue, 14 Sep 2021 18:12:33 +0000 (20:12 +0200)] 
RIP: convert the rte-local attributes to extended attributes

4 years agoExtended route attributes may include also pointers
Maria Matejka [Tue, 14 Sep 2021 17:53:03 +0000 (19:53 +0200)] 
Extended route attributes may include also pointers

4 years agoIGP metric getter refactoring to protocol callback
Maria Matejka [Sat, 20 Mar 2021 22:18:34 +0000 (23:18 +0100)] 
IGP metric getter refactoring to protocol callback

Direct protocol hooks for IGP metric inside nest/rt-table.c make the
protocol API unnecessarily complex. Instead, we use a proper callback.

4 years agofixup! Multipage allocation
Maria Matejka [Wed, 13 Oct 2021 17:08:35 +0000 (19:08 +0200)] 
fixup! Multipage allocation

4 years agoMultipage allocation
Maria Matejka [Wed, 8 Sep 2021 09:29:49 +0000 (11:29 +0200)] 
Multipage allocation

We can also quite simply allocate bigger blocks. Anyway, we need these
blocks to be aligned to their size which needs one mmap() two times
bigger and then two munmap()s returning the unaligned parts.

The user can specify -B <N> on startup when <N> is the exponent of 2,
setting the block size to 2^N. On most systems, N is 12, anyway if you
know that your configuration is going to eat gigabytes of RAM, you are
almost forced to raise your block size as you may easily get into memory
fragmentation issues or you have to raise your maximum mapping count,
e.g. "sysctl vm.max_map_count=(number)".

4 years agoCLI socket accept() may also fail and should produce some message, not a coredump.
Maria Matejka [Tue, 7 Sep 2021 16:22:32 +0000 (16:22 +0000)] 
CLI socket accept() may also fail and should produce some message, not a coredump.

4 years agoOSPF: explicitly stop the periodic tick on shutdown to avoid recalculation races
Maria Matejka [Sun, 5 Sep 2021 11:00:08 +0000 (13:00 +0200)] 
OSPF: explicitly stop the periodic tick on shutdown to avoid recalculation races

4 years agoLinpools may use pages instead of xmalloc
Maria Matejka [Fri, 3 Sep 2021 17:48:38 +0000 (19:48 +0200)] 
Linpools may use pages instead of xmalloc

4 years agofixup! Bound allocated pages to resource pools with page caches to avoid unnecessary...
Maria Matejka [Wed, 13 Oct 2021 16:59:45 +0000 (18:59 +0200)] 
fixup! Bound allocated pages to resource pools with page caches to avoid unnecessary syscalls

4 years agoFilter: Add prefix trie benchmarks
Ondrej Zajicek (work) [Sat, 25 Sep 2021 14:00:30 +0000 (16:00 +0200)] 
Filter: Add prefix trie benchmarks

Add trie tests intended as benchmarks that use external datasets
instead of generated prefixes. As datasets are not included, they
are commented out by default.

4 years agoFilter: Improve prefix trie tests
Ondrej Zajicek (work) [Tue, 21 Apr 2020 11:49:29 +0000 (13:49 +0200)] 
Filter: Improve prefix trie tests

Add tests explicitly matching insides and outsides of trie and update
tests to do testing of both IPv4 and IPv6 tries.

4 years agoFilter: Update trie documentation
Ondrej Zajicek (work) [Mon, 6 Apr 2020 12:20:16 +0000 (14:20 +0200)] 
Filter: Update trie documentation

4 years agoFilter: Fix trie test
Ondrej Zajicek (work) [Sun, 5 Apr 2020 01:56:07 +0000 (03:56 +0200)] 
Filter: Fix trie test

Generated prefixes must be valid.

4 years agoFilter: Faster prefix sets
Ondrej Zajicek (work) [Sun, 5 Apr 2020 01:24:46 +0000 (03:24 +0200)] 
Filter: Faster prefix sets

Use 16-way (4bit) branching in prefix trie instead of basic binary
branching. The change makes IPv4 prefix sets almost 3x faster, but
with more memory consumption and much more complicated algorithm.

Together with a previous filter change, it makes IPv4 prefix sets
about ~4.3x faster and slightly smaller (on my test data).

4 years agoBound allocated pages to resource pools with page caches to avoid unnecessary syscalls
Maria Matejka [Tue, 31 Aug 2021 22:46:46 +0000 (00:46 +0200)] 
Bound allocated pages to resource pools with page caches to avoid unnecessary syscalls

4 years agoReducing filter stack size to allow for lesser thread stack size
Maria Matejka [Wed, 25 Aug 2021 20:20:48 +0000 (22:20 +0200)] 
Reducing filter stack size to allow for lesser thread stack size

4 years agoOSPF: Setting a list node NULL before use
Maria Matejka [Thu, 27 May 2021 08:35:38 +0000 (10:35 +0200)] 
OSPF: Setting a list node NULL before use

4 years agoFixed memory poisoning in slab
Maria Matejka [Thu, 27 May 2021 08:35:33 +0000 (10:35 +0200)] 
Fixed memory poisoning in slab

4 years agoDebug output uses local buffer to avoid clashes between threads.
Maria Matejka [Wed, 26 May 2021 14:42:02 +0000 (16:42 +0200)] 
Debug output uses local buffer to avoid clashes between threads.

4 years agoFilter: Additional consistency checks
Maria Matejka [Mon, 27 Apr 2020 20:33:10 +0000 (22:33 +0200)] 
Filter: Additional consistency checks

4 years agoNest: Clean up main channel handling
Ondrej Zajicek (work) [Thu, 17 Jun 2021 14:56:51 +0000 (16:56 +0200)] 
Nest: Clean up main channel handling

Remove assumption that main channel is the only channel.

4 years agoNest: Clean up main channel handling 1/merge 23/merge
Ondrej Zajicek (work) [Thu, 17 Jun 2021 14:56:51 +0000 (16:56 +0200)] 
Nest: Clean up main channel handling

Remove assumption that main channel is the only channel.

4 years agoNest: Fix export of tmpattrs through pipes
Ondrej Zajicek (work) [Mon, 14 Jun 2021 18:02:50 +0000 (20:02 +0200)] 
Nest: Fix export of tmpattrs through pipes

Pipes copy the original rte with old values, so they require rte to be
exported with stored tmpattrs. Other protocols access stored attributes
using eattr list, so they require rte to be exported with expanded
tmpattrs. This is temporary hack, we plan to remove whoe tmpattr mechanism.

Thanks to Paul Donohue for the bugreport.

4 years agoRevert "Nest: Fix export of tmpattrs through pipes"
Ondrej Zajicek (work) [Mon, 14 Jun 2021 15:58:37 +0000 (17:58 +0200)] 
Revert "Nest: Fix export of tmpattrs through pipes"

This reverts commit f8e273b5e7a3c721f4a30cf27a0b4fe54602e83f.

4 years agoNest: Fix export of tmpattrs through pipes
Ondrej Zajicek (work) [Mon, 14 Jun 2021 14:30:59 +0000 (16:30 +0200)] 
Nest: Fix export of tmpattrs through pipes

In most cases of export there is no need to store back temporary
attributes to rte, as receivers (protocols) access eattr list anyway.
But pipe copies the original rte with old values, so we should store
tmpattrs also during export.

Thanks to Paul Donohue for the bugreport.

4 years agoCI: Allow Babel tests
Ondrej Zajicek (work) [Thu, 10 Jun 2021 23:31:10 +0000 (01:31 +0200)] 
CI: Allow Babel tests

4 years agoNest: Allow both 'password' and 'key' keywords for authentication keys
Ondrej Zajicek (work) [Wed, 9 Jun 2021 17:54:01 +0000 (19:54 +0200)] 
Nest: Allow both 'password' and 'key' keywords for authentication keys

4 years agoBabel: Simplify auth expiration
Ondrej Zajicek (work) [Wed, 9 Jun 2021 17:31:55 +0000 (19:31 +0200)] 
Babel: Simplify auth expiration

Just use hello_expiry for that, keep init_expiry for initial
unauthentized neighbors.

4 years agoNest: Fix password list parsing code
Ondrej Zajicek (work) [Sun, 6 Jun 2021 17:10:33 +0000 (19:10 +0200)] 
Nest: Fix password list parsing code

One of previous patches broke password list parsing code, fix that.

4 years agoLib: Fix static assert macro
Ondrej Zajicek (work) [Sun, 6 Jun 2021 15:23:45 +0000 (17:23 +0200)] 
Lib: Fix static assert macro

4 years agoBabel: Add MAC authentication support - update
Ondrej Zajicek (work) [Sun, 6 Jun 2021 13:22:59 +0000 (15:22 +0200)] 
Babel: Add MAC authentication support - update

Some cleanups and bugfixes to the previous patch, including:

 - Fix rate limiting in index mismatch check

 - Fix missing BABEL_AUTH_INDEX_LEN in auth_tx_overhead computation

 - Fix missing auth_tx_overhead recalculation during reconfiguration

 - Fix pseudoheader construction in babel_auth_sign() (sport vs fport)

 - Fix typecasts for ptrdiffs in log messages

 - Make auth log messages similar to corresponding RIP/OSPF ones

 - Change auth log messages for events that happen during regular
   operation to debug messages

 - Switch meaning of babel_auth_check*() functions for consistency
   with corresponding RIP/OSPF ones

 - Remove requirement for min/max key length, only those required by
   given MAC code are enforced

4 years agoBabel: Add MAC authentication support
Toke Høiland-Jørgensen [Sat, 17 Apr 2021 13:04:16 +0000 (15:04 +0200)] 
Babel: Add MAC authentication support

This implements support for MAC authentication in the Babel protocol, as
specified by RFC 8967. The implementation seeks to follow the RFC as close
as possible, with the only deliberate deviation being the addition of
support for all the HMAC algorithms already supported by Bird, as well as
the Blake2b variant of the Blake algorithm.

For description of applicability, assumptions and security properties,
see RFC 8967 sections 1.1 and 1.2.

4 years agoBabel: Refactor TLV parsing code for easier reuse
Toke Høiland-Jørgensen [Thu, 15 Apr 2021 18:15:53 +0000 (20:15 +0200)] 
Babel: Refactor TLV parsing code for easier reuse

In preparation for adding authentication checks, refactor the TLV
walking code so it can be reused for a separate pass of the packet
for authentication checks.

4 years agoNest: Allow MAC algorithms to specify min/max key length
Toke Høiland-Jørgensen [Thu, 15 Apr 2021 02:38:49 +0000 (04:38 +0200)] 
Nest: Allow MAC algorithms to specify min/max key length

Add min/max key length fields to the MAC algorithm description and
validate configured keys before they are used.

4 years agoNest: Allow specifying security keys as hex bytes as well as strings
Toke Høiland-Jørgensen [Wed, 14 Apr 2021 19:39:43 +0000 (21:39 +0200)] 
Nest: Allow specifying security keys as hex bytes as well as strings

Add support for specifying a password in hexadecimal format, The result
is the same whether a password is specified as a quoted string or a
hex-encoded byte string, this just makes it more convenient to input
high-entropy byte strings as MAC keys.

4 years agoLib: Add tests for blake2s and blake2b
Toke Høiland-Jørgensen [Wed, 14 Apr 2021 18:00:03 +0000 (20:00 +0200)] 
Lib: Add tests for blake2s and blake2b

Import the blake2-kat.h header with test vector output from the blake
reference implementation, and add tests to mac_test.c to compare the
output of the Bird MAC algorithm implementations with that reference
output.

Since the reference implementation only has test vectors for the full
output size, there are no tests for the smaller-sized output variants.

4 years agoLib: Add Blake2s and Blake2b hash functions
Toke Høiland-Jørgensen [Sat, 10 Apr 2021 15:33:28 +0000 (17:33 +0200)] 
Lib: Add Blake2s and Blake2b hash functions

The Babel MAC authentication RFC recommends implementing Blake2s as one of
the supported algorithms. In order to achieve do this, add the blake2b and
blake2s hash functions for MAC authentication. The hashing function
implementations are the reference implementations from blake2.net.

The Blake2 algorithms allow specifying an arbitrary output size, and the
Babel MAC spec says to implement Blake2s with 128-bit output. To satisfy
this, we add two different variants of each of the algorithms, one using
the default size (256 bits for Blake2s, 512 bits for Blake2b), and one
using half the default output size.

Update to BIRD coding style done by committer.

4 years agosysdep: Add wrapper to get random bytes - update
Ondrej Zajicek (work) [Wed, 7 Apr 2021 23:15:17 +0000 (01:15 +0200)] 
sysdep: Add wrapper to get random bytes - update

Simplify the code and fix an issue with getentropy() return value.

4 years agosysdep: Add wrapper to get random bytes
Toke Høiland-Jørgensen [Thu, 1 Apr 2021 17:20:13 +0000 (19:20 +0200)] 
sysdep: Add wrapper to get random bytes

Add a wrapper function in sysdep to get random bytes, and required checks
in configure.ac to select how to do it. The configure script tries, in
order, getrandom(), getentropy() and reading from /dev/urandom.

4 years agoBGP: Ensure that freed neighbor entry is not accessed
Ondrej Zajicek (work) [Mon, 31 May 2021 23:59:20 +0000 (01:59 +0200)] 
BGP: Ensure that freed neighbor entry is not accessed

Routes from downed protocols stay in rtable (until next rtable prune
cycle ends) and may be even exported to another protocol. In BGP case,
source BGP protocol is examined, although dynamic parts (including
neighbor entries) are already freed. That may lead to crash under some
race conditions. Ensure that freed neighbor entry is not accessed to
avoid this issue.

4 years agoBabel: Seqno requests are properly decoupled from neighbors when the underlying inter... mh-bird-apkg
Maria Matejka [Sun, 30 May 2021 11:07:16 +0000 (13:07 +0200)] 
Babel: Seqno requests are properly decoupled from neighbors when the underlying interface disappears

When an interface disappears, all the neighbors are freed as well. Seqno
requests were anyway not decoupled from them, leading to strange
segfaults. This fix adds a proper seqno request list inside neighbors to
make sure that no pointer to neighbor is kept after free.

4 years agoOSPF: Fix OSPFv3 in IPv4 mode with multiple areas
Ondrej Zajicek (work) [Wed, 26 May 2021 16:57:32 +0000 (18:57 +0200)] 
OSPF: Fix OSPFv3 in IPv4 mode with multiple areas

Some area handling code got confused by IPv4 setup in OSPFv3 mode.

4 years agoCI: Try different locale for Centos 7 bird-apkg
Ondrej Zajicek (work) [Thu, 20 May 2021 13:02:48 +0000 (15:02 +0200)] 
CI: Try different locale for Centos 7

4 years agoCI: Package build for more platforms
Matous Holinka [Wed, 19 May 2021 17:10:09 +0000 (19:10 +0200)] 
CI: Package build for more platforms

.gitlab-ci.yml:
+ pkg targets for some distros added
+ artifacts added
- some distros were commented out (due to errors).

misc/docker/*:
+ Dockerfiles updated with the necessary packages.

4 years agoCI: Try utf-8 locale to workaround apkg issue
Ondrej Zajicek (work) [Sun, 25 Apr 2021 17:52:19 +0000 (19:52 +0200)] 
CI: Try utf-8 locale to workaround apkg issue

4 years agoCI: Build documentation where tools are available
Ondrej Zajicek (work) [Sun, 25 Apr 2021 09:24:46 +0000 (11:24 +0200)] 
CI: Build documentation where tools are available

4 years agoCI: Update docker images for building of documentation
Ondrej Zajicek (work) [Sun, 25 Apr 2021 01:37:54 +0000 (03:37 +0200)] 
CI: Update docker images for building of documentation

4 years agoPkg: Enable docs subpackage for Debian
Ondrej Zajicek (work) [Sun, 25 Apr 2021 01:07:25 +0000 (03:07 +0200)] 
Pkg: Enable docs subpackage for Debian

4 years agoCI: Test of apkg build
Ondrej Zajicek (work) [Thu, 22 Apr 2021 22:20:36 +0000 (00:20 +0200)] 
CI: Test of apkg build

Also temporarily disable cf-ospf-auth, as there is some problem with it.

4 years agoTools: Improve make-dev-archive
Ondrej Zajicek (work) [Thu, 22 Apr 2021 17:23:18 +0000 (19:23 +0200)] 
Tools: Improve make-dev-archive

Use git-archive to avoid unrelated and temporary files and fix some
minor issues (e.g. dependency on bash as system shell).

4 years agoubuntu: use any init-system-helpers
Jakub Ružička [Tue, 13 Apr 2021 18:29:11 +0000 (20:29 +0200)] 
ubuntu: use any init-system-helpers

init-system-helpers (>= 1.56~) can't be satisfied on:

* Ubuntu 18.04 (1.51)
* Ubuntu 16.04 (1.29)
* Debian 9 (1.48)

Remove the specific version requirement in order to enable build on
older platforms.

4 years agosuse: fix bird.spec to work on SUSE
Jakub Ružička [Fri, 9 Apr 2021 16:36:25 +0000 (18:36 +0200)] 
suse: fix bird.spec to work on SUSE

SUSE is more strict about .spec.

* use SPDX license id
* add missing %ghost file directive

4 years agodocs: disable docs subpackage to fix FTBFS
Jakub Ružička [Fri, 9 Apr 2021 14:35:10 +0000 (16:35 +0200)] 
docs: disable docs subpackage to fix FTBFS

Adressing following FTBFS on all older debian/ubuntu distros:

    Can't locate LinuxDocTools/Data/Latin1ToSgml.pm in @INC (you may need to install the LinuxDocTools::Data::Latin1ToSgml module)

4 years agoadd apkg-powered upstream packaging for deb, rpm
Jakub Ružička [Tue, 6 Apr 2021 16:13:16 +0000 (18:13 +0200)] 
add apkg-powered upstream packaging for deb, rpm

Files in a single new distro/ dir allow apkg to build BIRD packages for
various distros directly from upstream sources as well as from upstream
archives.

Please see distro/README.md for more detail as well as apkg docs:

https://apkg.rtfd.io

I've used these files to build bird-2.0.8 on all currently supported
releases of following distros:

* Debian
* Ubuntu
* Fedora
* CentOS
* openSUSE

Please note that latest apkg with accumulated fixes for bird is needed:
https://gitlab.nic.cz/packaging/apkg/-/merge_requests/35

4 years agoFlowspec: Documentation update
Ondrej Zajicek (work) [Tue, 18 May 2021 18:41:01 +0000 (20:41 +0200)] 
Flowspec: Documentation update

4 years agoFlowspec: Label field should use numeric operator and not bitmask operator
Ondrej Zajicek (work) [Tue, 18 May 2021 18:18:06 +0000 (20:18 +0200)] 
Flowspec: Label field should use numeric operator and not bitmask operator

4 years agoFlowspec: Do not use comma for bitmask operators
Ondrej Zajicek (work) [Tue, 18 May 2021 17:54:18 +0000 (19:54 +0200)] 
Flowspec: Do not use comma for bitmask operators

For numeric operators, comma is used for disjunction in expressions like
"10, 20, 30..40". But for bitmask operators, comma is used for
conjunction in a way that does not really make much sense. Use always
explicit logical operators (&& and ||) to connect bitmask operators.

Thanks to Matt Corallo for the bugreport.

4 years agoFilter: Add MPLS label route attribute
Trisha Biswas [Mon, 17 May 2021 15:50:04 +0000 (17:50 +0200)] 
Filter: Add MPLS label route attribute

Add support to set or read outgoing MPLS labels using filters. Currently
this supports the addition of one label per route for the first next hop.

Minor changes by committer.

4 years agoFlowspec: Fix values for true/false operators
Ondrej Zajicek (work) [Fri, 14 May 2021 16:44:52 +0000 (18:44 +0200)] 
Flowspec: Fix values for true/false operators

RFC 8955 is pretty clear that 000 is false and 111 is true.

4 years agoFlowspec: Add code for conversion of flowspec parts to interval lists
Ondrej Zajicek (work) [Fri, 14 May 2021 16:33:15 +0000 (18:33 +0200)] 
Flowspec: Add code for conversion of flowspec parts to interval lists

Implement function flow_explicate_part() to convert flowspec numeric
expressions to a simple list of (disjoint, sorted) intervals. That could
be used in filters to build f_tree-based int-sets from them.

4 years agoBabel: Log the reason when refusing to run on an interface
Ondrej Zajicek (work) [Mon, 10 May 2021 18:09:31 +0000 (20:09 +0200)] 
Babel: Log the reason when refusing to run on an interface

The babel protocol code checks whether iface supports multicast, and
whether it has a link-local address assigned. However, it doesn not give
any feedback if any of those checks fail, it just silently ignores the
interface. Fix this by explicitly logging when multicast check fails.

Based on patch from Toke Høiland-Jørgensen, thanks!

4 years agoBSD: Propagate OS-level IFF_MULTICAST to internal IF_MULTICAST flag
Toke Høiland-Jørgensen [Mon, 10 May 2021 17:49:43 +0000 (19:49 +0200)] 
BSD: Propagate OS-level IFF_MULTICAST to internal IF_MULTICAST flag

The BSD code did not propagate the OS-level IFF_MULTICAST flag to the
Bird-internal IF_MULTICAST flag, which causes problems with Wireguard
interfaces on FreeBSD. The Linux sysdep code does propagate the flag
already, so just copy over the same check and flag update.

4 years agoOSPF: Allow ifaces with host address as unnumbered PtP or PtMP ifaces
Ondrej Zajicek (work) [Mon, 10 May 2021 11:39:55 +0000 (13:39 +0200)] 
OSPF: Allow ifaces with host address as unnumbered PtP or PtMP ifaces

Ifaces with host address (/32) were forced to be stubby, but now they
can be used as PtP or PtMP. For these ifaces we need to:

 - Do not force stub mode
 - Accept packets from any IP as local
 - Accept any configured neighbor as local
 - Detect ifaces properly as unnumbered
 - Use ONLINK flag for nexthops

4 years agoOSPF: Packets on PtP networks should be always sent to AllSPFRouters
Ondrej Zajicek (work) [Sun, 9 May 2021 13:16:13 +0000 (15:16 +0200)] 
OSPF: Packets on PtP networks should be always sent to AllSPFRouters

As specified in RFC 2328 8.1: "On physical point-to-point networks,
the IP destination is always set to the address AllSPFRouters."

Note that this likely break setups with multiple neighbors on a network
configured as PtP, which worked before. These should be configured as
PtMP.

Thanks to Senthil Kumar Nagappan for the original patch and to Joakim
Tjernlund for suggestions.

4 years agoOSPF: Minor refactoring of packet sending code
Ondrej Zajicek (work) [Sun, 9 May 2021 12:51:39 +0000 (14:51 +0200)] 
OSPF: Minor refactoring of packet sending code

Common behavior for LSupd and delayed LSack moved to ospf_send_to_iface()
and other minor changes.

4 years agoCI: Fix debian-10-i386 docker file
Ondrej Zajicek (work) [Sun, 25 Apr 2021 00:34:46 +0000 (02:34 +0200)] 
CI: Fix debian-10-i386 docker file

4 years agoDoc: Include full LinuxDocTools code
Ondrej Zajicek (work) [Sat, 24 Apr 2021 23:07:14 +0000 (01:07 +0200)] 
Doc: Include full LinuxDocTools code

BIRD uses hacked LinuxDocTools for building documentation, keeping some
parts locally and using remaining parts from system-installed one. This
setup breaks when LinuxDocTools makes some internal changes and is hard
to keep consistent.

Just include full LinuxDocTools code (both hacked and unmodified parts)
to avoid consistency issues. Note that we still need some binaries from
LinuxDocTools, so it still needs to be installed to build documentation.

4 years agoCI/CD: some latest releases added. mh-newer-distros
Matous [Wed, 21 Apr 2021 11:22:23 +0000 (13:22 +0200)] 
CI/CD: some latest releases added.

/misc/docker/:
+ debian 11 (i386+amd64) added,
+ fedora 32 added,
+ fedora 33 added,
+ fedora 34 added,
+ opensuse 15.2 added,
+ opensuse 15.3 added,
+ ubuntu 20.04 added,
+ ubuntu 20.10 added,
+ ubuntu 21.04 added,
- ubuntu 19.10 removed.

/.gitlab-ci.yml:
+ stages 'image' and 'build' updated.

4 years agoInternal route tables have a reduced cleanup routine
Maria Matejka [Mon, 19 Apr 2021 13:13:20 +0000 (15:13 +0200)] 
Internal route tables have a reduced cleanup routine

This fixes an internal table cleanup bug introduced
in ff397df7edcbe7a8abca5b419729b9c64c063847.

4 years agoBSD: Fix invalid pointer derefence in logging code
Stefan Haller [Mon, 19 Apr 2021 13:06:42 +0000 (15:06 +0200)] 
BSD: Fix invalid pointer derefence in logging code

For logging purposes a stack allocated net_addr struct was passed by
value as vararg (instead of the expected pointer). This resulted in
a segfault when the specific error condition got logged.

4 years agoLib: Fix handling of buffers in timestamp formatting
Ondrej Zajicek (work) [Mon, 12 Apr 2021 15:01:31 +0000 (17:01 +0200)] 
Lib: Fix handling of buffers in timestamp formatting

The code in tm_format_real_time() mixed up two buffers and their
sizes, which may cause crash in MRT dumping code.

Thanks to Piotr Wydrych for the bugreport.

5 years agoUnix: Expand accepted ranges of iproute2 constants
Ondrej Zajicek (work) [Wed, 7 Apr 2021 14:14:20 +0000 (16:14 +0200)] 
Unix: Expand accepted ranges of iproute2 constants

We support 32bit table and realm/flow ids, we should also accept them as
constants.

Thanks to Patrick Hemmer for the bugreport.

5 years agoDoc: Fix flowspec example
Ondrej Zajicek (work) [Sat, 3 Apr 2021 18:09:32 +0000 (20:09 +0200)] 
Doc: Fix flowspec example

Thanks to Matt Corallo for the bugreport.

5 years agoAllocation of ea_list in one contiguous memory block
Maria Matejka [Tue, 30 Mar 2021 19:44:35 +0000 (21:44 +0200)] 
Allocation of ea_list in one contiguous memory block

This saves some bytes of memory for complex ea's.

5 years agoRouting table is now a resource allocated from its own pool
Maria Matejka [Tue, 30 Mar 2021 16:51:31 +0000 (18:51 +0200)] 
Routing table is now a resource allocated from its own pool

This also fixes memory leaks from import/export tables being never
cleaned up and freed.

5 years agoResources: added mb_move() to complement rmove() for memory blocks
Maria Matejka [Tue, 30 Mar 2021 14:03:33 +0000 (16:03 +0200)] 
Resources: added mb_move() to complement rmove() for memory blocks

5 years agoRouting tables list iteration should use explicit node struct position
Maria Matejka [Tue, 30 Mar 2021 13:09:53 +0000 (15:09 +0200)] 
Routing tables list iteration should use explicit node struct position

5 years agoBGP: Do not keep BAF_EXT_LEN flag internally
Ondrej Zajicek (work) [Tue, 30 Mar 2021 14:59:11 +0000 (16:59 +0200)] 
BGP: Do not keep BAF_EXT_LEN flag internally

The flag makes sense just in external representation. It is reset during
BGP export, but keeping it internally broke MRT dumps for short attributes
that used it anyways.

Thanks to Simon Marsh for the bugreport and the patch.