]> git.ipfire.org Git - thirdparty/bird.git/log
thirdparty/bird.git
20 months agoAdd assertions and general code improvements
Igor Putovny [Thu, 16 Nov 2023 16:14:13 +0000 (17:14 +0100)] 
Add assertions and general code improvements

20 months agoRemove unused code
Igor Putovny [Thu, 16 Nov 2023 15:56:13 +0000 (16:56 +0100)] 
Remove unused code

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

21 months agoAllow sanitization compiler option
Igor Putovny [Tue, 24 Oct 2023 11:46:28 +0000 (13:46 +0200)] 
Allow sanitization compiler option

21 months agoRename constant
Igor Putovny [Fri, 20 Oct 2023 11:13:47 +0000 (13:13 +0200)] 
Rename constant

21 months agoFix how bucket for new leaf nodes is chosen
Igor Putovny [Fri, 20 Oct 2023 11:11:49 +0000 (13:11 +0200)] 
Fix how bucket for new leaf nodes is chosen

21 months agoUse net_addr_ip4 instead of ip4_addr for printing prefixes
Igor Putovny [Fri, 20 Oct 2023 10:20:12 +0000 (12:20 +0200)] 
Use net_addr_ip4 instead of ip4_addr for printing prefixes

21 months agoRemove unused code
Igor Putovny [Fri, 20 Oct 2023 09:59:23 +0000 (11:59 +0200)] 
Remove unused code

21 months agoAdd comments
Igor Putovny [Wed, 18 Oct 2023 10:12:27 +0000 (12:12 +0200)] 
Add comments

21 months agoChange order of parameters in a few functions
Igor Putovny [Wed, 18 Oct 2023 10:06:27 +0000 (12:06 +0200)] 
Change order of parameters in a few functions

21 months agoSimplify delete_trie() function
Igor Putovny [Fri, 13 Oct 2023 13:26:03 +0000 (15:26 +0200)] 
Simplify delete_trie() function

22 months agoAssign bucket of ancestor node to leaf node
Igor Putovny [Fri, 6 Oct 2023 12:38:07 +0000 (14:38 +0200)] 
Assign bucket of ancestor node to leaf node

22 months agoFix incorrect implementation of the third pass
Igor Putovny [Fri, 6 Oct 2023 12:19:04 +0000 (14:19 +0200)] 
Fix incorrect implementation of the third pass

22 months agoAssign route bucket only to the last inserted node
Igor Putovny [Fri, 6 Oct 2023 11:50:05 +0000 (13:50 +0200)] 
Assign route bucket only to the last inserted node

22 months agoFix argument order in several functions
Igor Putovny [Fri, 6 Oct 2023 11:40:11 +0000 (13:40 +0200)] 
Fix argument order in several functions

22 months agoAdd a few comments, print prefixes after aggregation
Igor Putovny [Fri, 6 Oct 2023 10:52:08 +0000 (12:52 +0200)] 
Add a few comments, print prefixes after aggregation

22 months agoExtend remove_node() with deleting root node
Igor Putovny [Thu, 21 Sep 2023 11:33:17 +0000 (13:33 +0200)] 
Extend remove_node() with deleting root node

22 months agoFix aggregator_bucket_unionize()
Igor Putovny [Thu, 21 Sep 2023 10:37:37 +0000 (12:37 +0200)] 
Fix aggregator_bucket_unionize()

The last two while loops were incorrectly placed inside the first while loop

22 months agoFix const warning, add few comments
Igor Putovny [Wed, 20 Sep 2023 11:28:42 +0000 (13:28 +0200)] 
Fix const warning, add few comments

22 months agoDelete trie during aggregator shutdown
Igor Putovny [Wed, 20 Sep 2023 11:05:49 +0000 (13:05 +0200)] 
Delete trie during aggregator shutdown

22 months agoRefactor and fix aggregator_bucket_unionize()
Igor Putovny [Tue, 19 Sep 2023 15:00:16 +0000 (17:00 +0200)] 
Refactor and fix aggregator_bucket_unionize()

22 months agoFix aggregator_bucket_intersect(), add comments and fix naming
Igor Putovny [Tue, 19 Sep 2023 10:06:52 +0000 (12:06 +0200)] 
Fix aggregator_bucket_intersect(), add comments and fix naming

22 months agoRemove unused code
Igor Putovny [Mon, 18 Sep 2023 12:47:04 +0000 (14:47 +0200)] 
Remove unused code

22 months agoAdd new implementation of third_pass() and remove old implementation
Igor Putovny [Mon, 18 Sep 2023 12:18:25 +0000 (14:18 +0200)] 
Add new implementation of third_pass() and remove old implementation

22 months agoMove trie initialization to aggregator_start()
Igor Putovny [Fri, 15 Sep 2023 09:04:37 +0000 (11:04 +0200)] 
Move trie initialization to aggregator_start()

22 months agoFix previous version, aggregator is now stable but untested
Igor Putovny [Thu, 14 Sep 2023 07:33:14 +0000 (09:33 +0200)] 
Fix previous version, aggregator is now stable but untested

22 months agoImplement basics of prefix aggregation functionality
Igor Putovny [Mon, 11 Sep 2023 10:38:19 +0000 (12:38 +0200)] 
Implement basics of prefix aggregation functionality

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

2 years agoAggregator moved to a separate protocol
Maria Matejka [Fri, 23 Jun 2023 11:18:39 +0000 (13:18 +0200)] 
Aggregator moved to a separate protocol

Also updated data structures and reconfigure.

Known bug: the hash doesn't take adata into account. Needs fixing!

2 years agoAggregator: polishing of filter API
Maria Matejka [Fri, 23 Jun 2023 09:28:19 +0000 (11:28 +0200)] 
Aggregator: polishing of filter API

2 years agoBasic route aggregation
Igor Putovny [Wed, 21 Jun 2023 11:15:07 +0000 (13:15 +0200)] 
Basic 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.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

2 years agoGitLab: Disabling build for CentOS 7 and Ubuntu 14.04 as our build machines don't... mq-nexthop
Maria Matejka [Tue, 13 Jun 2023 10:33:53 +0000 (12:33 +0200)] 
GitLab: Disabling build for CentOS 7 and Ubuntu 14.04 as our build machines don't like C11

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

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

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

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

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

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

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

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

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

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

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

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

The redefinable keywords must be specified in any .Y file as follows:

  toksym: THE_KEYWORD ;

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

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

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 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 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 agoNEWS and version update v2.13
Ondrej Zajicek [Fri, 21 Apr 2023 18:24:43 +0000 (20:24 +0200)] 
NEWS and version update

2 years agoFilter: Disable some trie formatting tests
Ondrej Zajicek [Fri, 21 Apr 2023 17:29:17 +0000 (19:29 +0200)] 
Filter: Disable some trie formatting tests

Trie formatting works slightly different with 4-way tries than with
16-way ones, so these tests generated false error. Block them for now.

2 years agoMerge branch 'bmp'
Ondrej Zajicek [Fri, 21 Apr 2023 02:47:55 +0000 (04:47 +0200)] 
Merge branch 'bmp'

2 years agoBMP: Add some basic documentation
Ondrej Zajicek [Fri, 21 Apr 2023 02:42:13 +0000 (04:42 +0200)] 
BMP: Add some basic documentation

2 years agoBSD: IPv4 over IPv6 nexthop support on FreeBSD
Luiz Amaral [Thu, 20 Apr 2023 23:37:30 +0000 (01:37 +0200)] 
BSD: IPv4 over IPv6 nexthop support on FreeBSD

The support for IPv4 routes with IPv6 nexthops was implemented in FreeBSD
13.1, this patch allows to import and export such routes from/to kernel.

Minor change from committer.

2 years agoLinpool: Fix lp_restore()
Maria Matejka [Thu, 20 Apr 2023 17:33:00 +0000 (19:33 +0200)] 
Linpool: Fix lp_restore()

When lp_save() is called on an empty linpool, then some allocation is
done, then lp_restore() is called, the linpool is restored but the used
chunks are inaccessible. Fix it.

2 years agoBMP: Silence some log messages
Ondrej Zajicek [Thu, 20 Apr 2023 15:14:45 +0000 (17:14 +0200)] 
BMP: Silence some log messages

Hooks called from BGP to BMP should not log warning when BMP is not
connected, that is not an error (and we do not want to flood logs with
a ton of messages).

Blocked sk_send() should not log warning, that is expected situation.
Error during sk_send() is handled in error hook anyway.

2 years agoBMP: Fix connection management
Ondrej Zajicek [Thu, 20 Apr 2023 14:13:58 +0000 (16:13 +0200)] 
BMP: Fix connection management

Replace broken TCP connection management with a simple state machine.
Handle failed attempts properly with a timeout, detect and handle TCP
connection close and try to reconnect after that. Remove useless
'station_connected' flag.

Keep open messages saved even after the BMP session establishment,
so they can be used after BMP session flaps.

Use proper log messages for session events.

2 years agoBMP: Fix reconfiguration
Ondrej Zajicek [Tue, 18 Apr 2023 16:57:54 +0000 (18:57 +0200)] 
BMP: Fix reconfiguration

It is not supported, but at least it must update internal config
pointer to not keep old one.

2 years agoBMP: Allow build without BMP and disable BMP build by default
Ondrej Zajicek [Tue, 18 Apr 2023 15:21:13 +0000 (17:21 +0200)] 
BMP: Allow build without BMP and disable BMP build by default

It has still several important issues to be enabled by default.

2 years agoBMP: Move initialization to bmp_start()
Ondrej Zajicek [Tue, 18 Apr 2023 13:13:24 +0000 (15:13 +0200)] 
BMP: Move initialization to bmp_start()

That fixes BMP socket allocation from an invalid pool.

2 years agoBMP: Fix missing template
Ondrej Zajicek [Tue, 18 Apr 2023 13:09:21 +0000 (15:09 +0200)] 
BMP: Fix missing template

It is mandatory for protocol.

2 years agoBMP: Add some missing bmp_buffer_free() calls
Ondrej Zajicek (work) [Thu, 15 Apr 2021 16:32:47 +0000 (18:32 +0200)] 
BMP: Add some missing bmp_buffer_free() calls

They were inadvertently removed during recent code refactoring.

Thanks to Dawid Macek for the bugreport and patch.

2 years agoBMP: Remove duplicate functions for update encoding
Ondrej Zajicek (work) [Mon, 29 Mar 2021 02:43:04 +0000 (04:43 +0200)] 
BMP: Remove duplicate functions for update encoding

Use existing BGP functions also for BMP update encoding.

2 years agoBMP: Integrate bmp_conn to bmp_proto
Ondrej Zajicek (work) [Sun, 28 Mar 2021 14:41:53 +0000 (16:41 +0200)] 
BMP: Integrate bmp_conn to bmp_proto

There is only one socket per BMP instance, no need to have separate
struct (like in BGP).

2 years agoBMP: Minor cleanups
Ondrej Zajicek (work) [Sun, 28 Mar 2021 13:36:59 +0000 (15:36 +0200)] 
BMP: Minor cleanups

Remove redundant 'disable' option, simplify IP address serialization,
and remove useless macros.

2 years agoBMP: Do not use global instance ptr internally
Ondrej Zajicek (work) [Sun, 28 Mar 2021 13:13:23 +0000 (15:13 +0200)] 
BMP: Do not use global instance ptr internally

Use local variable to refence relevant instance instead of using global
instance ptr. Also, use 'p' variable instead of 'bmp' so we can use
common macros like TRACE().

2 years agoBMP: Remove superfluous error handling
Ondrej Zajicek (work) [Sun, 28 Mar 2021 02:30:11 +0000 (04:30 +0200)] 
BMP: Remove superfluous error handling

Most error handling code was was for cases that cannot happen,
or they would be code bugs (and should use ASSERT()). Keep error
handling for just for I/O errors, like in rest of BIRD.

2 years agoBMP protocol support
Pawel Maslanka [Mon, 29 Mar 2021 20:45:21 +0000 (22:45 +0200)] 
BMP protocol support

Initial implementation of a basic subset of the BMP (BGP Monitoring
Protocol, RFC 7854) from Akamai team. Submitted for further review
and improvement.

2 years agoBGP: Add 'allow bgp_med' option for EBGP sessions
Trisha Biswas [Fri, 14 Apr 2023 02:28:37 +0000 (04:28 +0200)] 
BGP: Add 'allow bgp_med' option for EBGP sessions

This option allows to treat bgp_med as regular transitive attribute
on EBGP sessions (without hacks in filters).

Minor changes from committer.

2 years agoIncrease tests timeout
Jakub Ružička [Thu, 13 Apr 2023 18:06:55 +0000 (20:06 +0200)] 
Increase tests timeout

Tests may take longer than 5 s to complete on slow/virtual machines.

2 years agoBGP: Fix bgp_med handling
Ondrej Zajicek [Tue, 4 Apr 2023 03:20:49 +0000 (05:20 +0200)] 
BGP: Fix bgp_med handling

Missing translation from BGP attribute ID to eattr ID in bgp_unset_attr()
broke automatic removal of bgp_med during export to EBGP peers.

Thanks to Edward Sun for the bugreport.

2 years agoAdd missing references to "show route in" in the cli-help and doc.
Johannes Moos [Sat, 18 Mar 2023 14:33:48 +0000 (15:33 +0100)] 
Add missing references to "show route in" in the cli-help and doc.

The feature of showing all prefixes inside the given one has been added
in v2.0.9 but not well documented. Fixing it by this update.

Text in doc and commit message added by commiter.

2 years agoBGP: Free bind applies also to outbound connections
Maria Matejka [Thu, 16 Mar 2023 18:23:19 +0000 (19:23 +0100)] 
BGP: Free bind applies also to outbound connections

Even though the free bind option is primarily meant to alleviate problems
with addresses assigned too late, it's also possible to use BIRD with AnyIP
configuration, assigning whole ranges to the machine. Therefore free bind
allows also to create an outbound connection from specific address even though
such address is not assigned.

2 years agoNet: Replace runtime checks with STATIC_ASSERT()
Ondrej Zajicek [Mon, 6 Mar 2023 10:57:40 +0000 (11:57 +0100)] 
Net: Replace runtime checks with STATIC_ASSERT()

2 years agoPrintf test suite fails on systems with musl libc because tests for "%m"
Petr Vaněk [Mon, 6 Mar 2023 10:19:30 +0000 (11:19 +0100)] 
Printf test suite fails on systems with musl libc because tests for "%m"
and "%M" formats expect "Input/output error" message but musl returns
"I/O error". Proposed change compares the printf output with string
returned from strerror function for EIO constant.

See-also: https://bugs.gentoo.org/836713

Minor change from committer.

2 years agoConfig: Dropping filter instruction trees after linearization
Maria Matejka [Thu, 16 Feb 2023 13:22:23 +0000 (14:22 +0100)] 
Config: Dropping filter instruction trees after linearization

2 years agoLinpool flush drops all the allocated pages but one
Maria Matejka [Wed, 22 Feb 2023 13:45:20 +0000 (14:45 +0100)] 
Linpool flush drops all the allocated pages but one

When a linpool is used to allocate a one-off big load of memory, it
makes no sense to keep that amount of memory for future use inside the
linpool. Contrary to previous implementations where the memory was
directly free()d, we now use the page allocator which has an internal
cache which keeps the released pages for us and subsequent allocations
simply get these released pages back.

And even if the page cleanup routine kicks in inbetween, the pages get
only madvise()d, not munmap()ed so performance aspects are negligible.

This may fix some memory usage peaks in extreme cases.

2 years agoBGP: Update RFC references
Ondrej Zajicek [Sun, 19 Feb 2023 14:35:07 +0000 (15:35 +0100)] 
BGP: Update RFC references

2 years agoBabel: Update RFC references
Ondrej Zajicek [Sun, 19 Feb 2023 14:34:43 +0000 (15:34 +0100)] 
Babel: Update RFC references

2 years agoConf: Fix too early free of old configuration
Ondrej Zajicek [Sun, 19 Feb 2023 02:59:10 +0000 (03:59 +0100)] 
Conf: Fix too early free of old configuration

The change 371eb49043d225d2bab8149187b813a14b4b86d2 introduced early free
of old_config. Unfortunately, it did not properly check whether it is not
still in use (blocked by obstacle during reconfiguration). Fix that.

It also means that we still could have a short peak when three configs
are in use (when a new reconfig is requeste while the previous one is
still active).

2 years agoBabel: Keep separate auth PC counters for unicast and multicast
Toke Høiland-Jørgensen [Tue, 14 Feb 2023 17:18:32 +0000 (18:18 +0100)] 
Babel: Keep separate auth PC counters for unicast and multicast

The babel protocol normally sends all its messages as multicast packets,
but the protocol specification allows most messages to be sent as either
unicast or multicast, and the two can be mixed freely. In particular, the
babeld implementation can be configured to unicast updates to all peers
instead of sending them as unicast.

Daniel discovered that this can cause problems with the packet counter
checks in the MAC extension due to packet reordering. This happens on WiFi
networks where clients have power save enabled (which is quite common in
infrastructure networks): in this case, the access point will buffer all
multicast traffic and only send it out along with its beacons, leading to a
maximum buffering in default Linux-based access point configuration of up
to 200 ms.

This means that a Babel sender that mixes unicast and multicast messages
can have the unicast messages overtake the multicast messages because of
this buffering; when authentication is enabled, this causes the receiver to
discard the multicast message when it does arrive because it now has a
packet counter value less than the unicast message that arrived before it.
Daniel observed that this happens frequently enough that Babel ceases to
work entirely when runner over a WiFi network.

The issue has been described in draft-ietf-babel-mac-relaxed, which is
currently pending RFC publication. That also describes two mitigation
mechanisms: Keeping separate PC counters for unicast and multicast, and
using a reorder window for PC values. This patch implements the former as
that is the simplest, and resolves the particular issue seen on WiFi.

Thanks to Daniel Gröber for the bugreport.

Minor changes from committer.

2 years agoBabel: Implement IPv4 via IPv6 extension (RFC 9229)
Andreas Rammhold [Tue, 14 Feb 2023 15:17:03 +0000 (16:17 +0100)] 
Babel: Implement IPv4 via IPv6 extension (RFC 9229)

The patch implements an IPv4 via IPv6 extension (RFC 9229) to the Babel
routing protocol (RFC 8966) that allows annoncing routes to an IPv4
prefix with an IPv6 next hop, which makes it possible for IPv4 traffic
to flow through interfaces that have not been assigned an IPv4 address.

The implementation is compatible with the current Babeld version.

Thanks to Toke Høiland-Jørgensen for early review on this work.

Minor changes from committer.

2 years agoDocumentation: Adding roadmap as decided in January 2023
Maria Matejka [Fri, 3 Feb 2023 08:12:34 +0000 (09:12 +0100)] 
Documentation: Adding roadmap as decided in January 2023

2 years agoBuild: Partial revert of one of previous changes
Ondrej Zajicek [Wed, 1 Feb 2023 18:30:21 +0000 (19:30 +0100)] 
Build: Partial revert of one of previous changes

There are many compatibility issues with echo -e, scratch that.

2 years agoBuild: Minor improvement to build output
Ondrej Zajicek [Wed, 1 Feb 2023 16:46:48 +0000 (17:46 +0100)] 
Build: Minor improvement to build output

2 years agoNest: Minor cleanup in buildsystem
Ondrej Zajicek [Wed, 1 Feb 2023 15:15:13 +0000 (16:15 +0100)] 
Nest: Minor cleanup in buildsystem

There ware missing dependencies for proto-build.c generation, which
sometimes lead to failed builds, and ignores changes in the set of
built protocols. Fix that, and also improve formatting of proto-build.c

2 years agoBabel: Initialise source seqno from incoming message
Toke Høiland-Jørgensen [Tue, 31 Jan 2023 14:52:14 +0000 (15:52 +0100)] 
Babel: Initialise source seqno from incoming message

When creating a new babel_source object we initialise the seqno to 0. The
caller will update the source object with the right metric and seqno value,
for both newly created and old source objects. However if we initialise the
source object seqno to 0 that may actually turn out to be a valid (higher)
seqno than the one in the routing table, because of seqno wrapping. In this
case the source metric will not be set properly, which breaks feasibility
tracking for subsequent updates.

To fix this, add a new initial_seqno argument to babel_get_source() which
is used when allocating a new object, and set that to the seqno value of
the update we're sending.

Thanks to Juliusz Chroboczek for the bugreport.

2 years agoBabel: Improve clarity of unfeasible update handling.
Ondrej Zajicek [Mon, 30 Jan 2023 22:49:20 +0000 (23:49 +0100)] 
Babel: Improve clarity of unfeasible update handling.

Add a comment and (unnecessary) check to make correctness obvious.

2 years agoBabel: Fix missing modulo comparison of seqnos
Toke Høiland-Jørgensen [Mon, 30 Jan 2023 22:36:39 +0000 (23:36 +0100)] 
Babel: Fix missing modulo comparison of seqnos

Juliusz noticed there were a couple of places we were doing straight
inequality comparisons of seqnos in Babel. This is wrong because seqnos can
wrap: so we need to use the modulo-64k comparison function for these cases
as well.

Introduce a strict-inequality version of the modulo-comparison for this
purpose.

2 years agoSmall fix of indenting
Alexander Zubkov [Mon, 23 Jan 2023 13:23:00 +0000 (14:23 +0100)] 
Small fix of indenting

2 years agoNEWS and version update v2.0.12
Ondrej Zajicek [Mon, 23 Jan 2023 01:23:19 +0000 (02:23 +0100)] 
NEWS and version update