]> git.ipfire.org Git - thirdparty/bird.git/log
thirdparty/bird.git
4 years agoNest: moved sender channel to the route rw structure route-storage-updates
Maria Matejka [Fri, 1 May 2020 20:44:20 +0000 (22:44 +0200)] 
Nest: moved sender channel to the route rw structure

It is needed for early pipe collision detection and it also reduces
the calling convention of rte_update() to one argument.

4 years agoMerged export moved after out_table
Maria Matejka [Wed, 24 Feb 2021 00:51:00 +0000 (01:51 +0100)] 
Merged export moved after out_table

4 years agoRecursive route nexthop updates now announced with valid new_best/old_best information
Maria Matejka [Thu, 25 Feb 2021 20:52:49 +0000 (21:52 +0100)] 
Recursive route nexthop updates now announced with valid new_best/old_best information

4 years agoKernel protocol now uses out_table resync mechanism for periodic scanning
Maria Matejka [Tue, 23 Feb 2021 22:54:13 +0000 (23:54 +0100)] 
Kernel protocol now uses out_table resync mechanism for periodic scanning

4 years agoRoute export split into sub-functions
Maria Matejka [Sun, 10 May 2020 22:15:18 +0000 (00:15 +0200)] 
Route export split into sub-functions

4 years agoRoute export: Packed all the export code before export table update to one function
Maria Matejka [Fri, 8 May 2020 21:08:07 +0000 (23:08 +0200)] 
Route export: Packed all the export code before export table update to one function

4 years agoSplit route data structure to storage (ro) / manipulation (rw) structures.
Maria Matejka [Fri, 10 Apr 2020 22:35:52 +0000 (00:35 +0200)] 
Split route data structure to storage (ro) / manipulation (rw) structures.

This should help a lot with keeping the route machinery and allocations
clean. This commit also changes behaviour of rte_update() with cached
rta. Newly, calling rte_update() keeps the number of rta references.

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 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 agoRoute export: Inlined do_rt_notify() as the split is now for nothing.
Maria Matejka [Tue, 7 Apr 2020 22:09:22 +0000 (00:09 +0200)] 
Route export: Inlined do_rt_notify() as the split is now for nothing.

4 years agoRoute export: More elegant export dispatcher.
Maria Matejka [Tue, 10 Mar 2020 15:13:41 +0000 (16:13 +0100)] 
Route export: More elegant export dispatcher.

Also:
* Feeding request by net.
* Passing only net_addr in export structure.
* Cleanup of krt_replace_rte() call.

4 years agoRoute export: rejected by filter bitmap
Maria Matejka [Mon, 9 Mar 2020 14:31:10 +0000 (15:31 +0100)] 
Route export: rejected by filter bitmap

If a route has been rejected by filter, store that information
to avoid repeated export filter runs on rejected routes.

4 years agoRoute export: dropped tail-execution of do_rt_notify()
Maria Matejka [Fri, 6 Mar 2020 14:41:51 +0000 (15:41 +0100)] 
Route export: dropped tail-execution of do_rt_notify()

4 years agoRoute export: passing the export state in a dedicated structure
Maria Matejka [Thu, 27 Feb 2020 08:44:08 +0000 (09:44 +0100)] 
Route export: passing the export state in a dedicated structure

4 years agoInternal API change: passing all the rt_notify() data as a single structure.
Maria Matejka [Tue, 25 Feb 2020 21:13:32 +0000 (22:13 +0100)] 
Internal API change: passing all the rt_notify() data as a single structure.

4 years agoExport table: Fixed segfault on withdraw.
Maria Matejka [Sat, 20 Mar 2021 20:16:12 +0000 (21:16 +0100)] 
Export table: Fixed segfault on withdraw.

This happens only if the channel really uses the old route.

4 years agoKRT: Using obligatory export table when non-trivial filters are applied.
Maria Matejka [Sat, 20 Mar 2021 20:14:54 +0000 (21:14 +0100)] 
KRT: Using obligatory export table when non-trivial filters are applied.

When the kernel filter is anything more sophisticated than FILTER_ACCEPT
or FILTER_REJECT, we should ensure that the old route being sent to the
kernel protocol is really what was sent there before. This fixes the old
misbehavior when an unfiltered old route was used.

4 years agoCleaning up also the rte_same hook which is never set
Maria Matejka [Mon, 17 Feb 2020 11:55:11 +0000 (12:55 +0100)] 
Cleaning up also the rte_same hook which is never set

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 agoDropping the tmp_attrs mechanism as obsolete
Maria Matejka [Mon, 17 Feb 2020 11:40:09 +0000 (12:40 +0100)] 
Dropping the tmp_attrs mechanism as obsolete

There are no protocol-specific fields in rte now.

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 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 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 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 agoRIP: Convert the rte-local attributes to extended attributes
Maria Matejka [Sat, 20 Mar 2021 22:21:25 +0000 (23:21 +0100)] 
RIP: Convert the rte-local attributes to extended attributes

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

4 years agoAllow a generic pointer in route extended attributes
Maria Matejka [Tue, 11 Feb 2020 12:25:04 +0000 (13:25 +0100)] 
Allow a generic pointer in route extended attributes

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 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 agoRoute import API redefinition.
Maria Matejka [Tue, 28 Jan 2020 10:42:46 +0000 (11:42 +0100)] 
Route import API redefinition.

Hidden rte_get_temp() into rte_update().
Split rte_update() / rte_withdraw().

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 agoNEWS and version update v2.0.8
Ondrej Zajicek (work) [Thu, 18 Mar 2021 19:18:38 +0000 (20:18 +0100)] 
NEWS and version update

4 years agoAdd new BGP tests
Ondrej Zajicek (work) [Thu, 18 Mar 2021 14:54:44 +0000 (15:54 +0100)] 
Add new BGP tests

4 years agoBGP: Do not show statistics
Ondrej Zajicek (work) [Thu, 18 Mar 2021 14:44:04 +0000 (15:44 +0100)] 
BGP: Do not show statistics

BGP statistics code was preliminary and i wanted to replace it by
separate 'show X stats' command. The patch hides the preliminary
output in 'show protocols all' so it is not part of the released
version.

4 years agoRPKI: Improve error handling of DNS resolver
Ondrej Zajicek (work) [Wed, 17 Mar 2021 16:24:00 +0000 (17:24 +0100)] 
RPKI: Improve error handling of DNS resolver

4 years agoMinor fixes for restricted builds
Ondrej Zajicek (work) [Wed, 17 Mar 2021 14:56:12 +0000 (15:56 +0100)] 
Minor fixes for restricted builds

4 years agoPipe: Propagate debug flags from protocol to channels
Ondrej Zajicek (work) [Tue, 16 Mar 2021 19:10:00 +0000 (20:10 +0100)] 
Pipe: Propagate debug flags from protocol to channels

Pipe channels are kind-of implicit, so setting protocol debug flags
should also set pipe debug flags.

4 years agoOSPFv3: Update neighbor authentication state from Hello packets
Ondrej Zajicek (work) [Tue, 16 Mar 2021 15:34:42 +0000 (16:34 +0100)] 
OSPFv3: Update neighbor authentication state from Hello packets

In OSPFv3, only Hello and DBDes packets contain flags specifying whether
RFC 7166 authentication trailer is used. Other packets are processed
based on stored authentication state in neighbor structure. Update this
state with each received Hello to handle authentication change from
reconfigurations.

Thanks to Joakim Tjernlund and Kenth Eriksson for the bugreport.

4 years agoFilter: Update 'gw' to handle IPv6 link-local addresses
Ondrej Zajicek (work) [Mon, 15 Mar 2021 17:35:23 +0000 (18:35 +0100)] 
Filter: Update 'gw' to handle IPv6 link-local addresses

When a link-local address is set, use the existing iface for scope.

Thanks to Marcel Krüger for the bugreport.

4 years agoDoc: Document automatic RPKI reload
Ondrej Zajicek (work) [Mon, 15 Mar 2021 16:51:33 +0000 (17:51 +0100)] 
Doc: Document automatic RPKI reload

4 years agoDoc: Document channel debug options
Ondrej Zajicek (work) [Mon, 15 Mar 2021 15:16:32 +0000 (16:16 +0100)] 
Doc: Document channel debug options

4 years agoRate-limit scheduling of work-events
Ondrej Zajicek (work) [Fri, 12 Mar 2021 14:35:56 +0000 (15:35 +0100)] 
Rate-limit scheduling of work-events

In general, events are code handling some some condition, which is
scheduled when such condition happened and executed independently from
I/O loop. Work-events are a subgroup of events that are scheduled
repeatedly until some (often significant) work is done (e.g. feeding
routes to protocol). All scheduled events are executed during each
I/O loop iteration.

Separate work-events from regular events to a separate queue and
rate limit their execution to a fixed number per I/O loop iteration.
That should prevent excess latency when many work-events are
scheduled at one time (e.g. simultaneous reload of many BGP sessions).

4 years agoStatic: Implement reload hook
Ondrej Zajicek (work) [Wed, 10 Mar 2021 14:07:19 +0000 (15:07 +0100)] 
Static: Implement reload hook

4 years agoNest: No automatic ROA reload on non-reloadable channels
Ondrej Zajicek (work) [Mon, 8 Mar 2021 19:45:22 +0000 (20:45 +0100)] 
Nest: No automatic ROA reload on non-reloadable channels

4 years agoNest: Add option to control automatic RPKI reload
Ondrej Zajicek (work) [Fri, 12 Feb 2021 04:05:18 +0000 (05:05 +0100)] 
Nest: Add option to control automatic RPKI reload

Also, no automatic reload for BGP channels without import/export table.

4 years agoTests: Add missing mockup function to tests
Ondrej Zajicek (work) [Wed, 10 Feb 2021 16:29:14 +0000 (17:29 +0100)] 
Tests: Add missing mockup function to tests

4 years agoBGP: Add support for BGP hostname capability
Vincent Bernat [Wed, 10 Feb 2021 15:53:57 +0000 (16:53 +0100)] 
BGP: Add support for BGP hostname capability

This is an implementation of draft-walton-bgp-hostname-capability-02.
It is implemented since quite some time for FRR and in datacenter, this
gives a nice output to avoid using IP addresses.

It is disabled by default. The hostname is retrieved from uname(2) and
can be overriden with "hostname" option. The domain name is never set
nor displayed.

Minor changes by committer.

4 years agoNest: Automatic channel reloads based on RPKI changes
Ondrej Zajicek (work) [Wed, 10 Feb 2021 02:09:57 +0000 (03:09 +0100)] 
Nest: Automatic channel reloads based on RPKI changes

If there are roa_check() calls in channel filters, then the channel
subscribes to ROA table notifications, which are sent when ROA tables
are updated (subject to settle time) and trigger channel reload or
refeed.

4 years agoFilter: Recursive filter iteration code
Ondrej Zajicek (work) [Sun, 7 Feb 2021 18:21:42 +0000 (19:21 +0100)] 
Filter: Recursive filter iteration code

Add macros for recursive filter iteration that allows to examine
all instructions reachable from a filter.

4 years agoMRT: Fix MP-BGP next hops
Ondrej Zajicek (work) [Fri, 22 Jan 2021 03:34:15 +0000 (04:34 +0100)] 
MRT: Fix MP-BGP next hops

Flag signalling that MP-BGP mode should be used got reset after first
batch of routes, so remaining routes were processed without that, leading
to missing MP_REACH_NLRI attribute.

Thanks to Piotr Wydrych for the bugreport.

4 years agoNetlink: Ignore dead routes
Ondrej Zajicek (work) [Thu, 14 Jan 2021 00:51:09 +0000 (01:51 +0100)] 
Netlink: Ignore dead routes

With net.ipv4.conf.XXX.ignore_routes_with_linkdown sysctl, a user can
ensure the kernel does not use a route whose target interface is down.
Such route is marked with a 'dead' / RTNH_F_DEAD flag.

Ignore these routes or multipath nexthops during scan.

Thanks to Vincent Bernat for the original patch.

4 years agoBuild: Fix tags generation
Ondrej Zajicek (work) [Tue, 12 Jan 2021 14:43:54 +0000 (15:43 +0100)] 
Build: Fix tags generation

4 years agoMRT: Fix IPv6 table dumps
Ondrej Zajicek (work) [Tue, 12 Jan 2021 14:37:01 +0000 (15:37 +0100)] 
MRT: Fix IPv6 table dumps

Add fake MP_REACH_NLRI attribute with BGP next hop when encoding MRT
table dumps for IPv6 routes. That is necessary to encode next hop as
NEXT_HOP attribute is not used for MP-BGP.

Thanks to Santiago Aggio for the bugreport.

4 years agoBFD: Dispatch sessions also by interface index
Ondrej Zajicek (work) [Sun, 10 Jan 2021 14:29:02 +0000 (15:29 +0100)] 
BFD: Dispatch sessions also by interface index

Direct BFD sessions needs to be dispatched not only by IP addresses, but
also by interfaces, in order to avoid collisions between neighbors with
the same IPv6 link-local addresses.

Extend BFD session hash_ip key by interface index to handle that. Use 0
for multihop sessions.

Thanks to Sebastian Hahn for the original patch.

4 years agoRPKI: Remove port (and SSH username) from 'Cache server' output line
Ondrej Zajicek (work) [Thu, 7 Jan 2021 04:56:34 +0000 (05:56 +0100)] 
RPKI: Remove port (and SSH username) from 'Cache server' output line

It was mixed-up if hostname is IPv6 address, and reporting separate
values (like port) on separate lines fits better into key-value style
of 'show protocols all' output. Also, the patch simplifies transport
identification formatting (although it is unused now).

Thanks to Alarig Le Lay for the suggestion.

4 years agoKernel: Do not check templates
Ondrej Zajicek (work) [Thu, 7 Jan 2021 00:56:00 +0000 (01:56 +0100)] 
Kernel: Do not check templates

So one can define kernel protocol template without channels.
For other protocols, it is either irrelevant or already done.

Thanks to Clemens Schrimpe for the bugreport.

4 years agoDoc: Describe per-nexthop static route options
Ondrej Zajicek (work) [Thu, 7 Jan 2021 00:20:56 +0000 (01:20 +0100)] 
Doc: Describe per-nexthop static route options

Also remove description of (no longer supported) per-route 'bfd' option,
and add examples of IPv6 routes with link-local nexthops.

4 years agoNest: remove last_tx_filter_change
Ondrej Zajicek (work) [Wed, 6 Jan 2021 13:51:49 +0000 (14:51 +0100)] 
Nest: remove last_tx_filter_change

No longer needed after redesign of export handling.

4 years agoBGP: Deprecate 'missing lladdr' option
Ondrej Zajicek (work) [Wed, 6 Jan 2021 13:44:23 +0000 (14:44 +0100)] 
BGP: Deprecate 'missing lladdr' option

The option is not implemented since transition to 2.0 and no plan to add it.
Also remove some deprecated RTS_* valus from documentation.

Thanks to Sébastien Parisot for notification.

4 years agoKernel: Fix handling of krt_realm with ECMP routes
Ondrej Zajicek (work) [Wed, 6 Jan 2021 04:25:59 +0000 (05:25 +0100)] 
Kernel: Fix handling of krt_realm with ECMP routes

For ECMP routes, RTA_FLOW attribute must be set per-nexthop, not
per-route. Our corresponding krt_realm attribute is per-route.

Thanks to Mikhail Petrov for the bugreport.

4 years agoNest: Read Babel metric as IGP metric
James Lu [Tue, 29 Dec 2020 01:23:54 +0000 (02:23 +0100)] 
Nest: Read Babel metric as IGP metric

(Minor syntactic changes by committer)

4 years agoStatic: Fix handling of 'net' attribute in per-route filters
Ondrej Zajicek (work) [Mon, 28 Dec 2020 20:19:27 +0000 (21:19 +0100)] 
Static: Fix handling of 'net' attribute in per-route filters

We need to define 'net' field temporarily as it may be accessed by
per-route filters.

Thanks to Damian Zaremba for the bugreport.

4 years agoFilter: Fix return on top-level
Ondrej Zajicek (work) [Mon, 28 Dec 2020 14:23:28 +0000 (15:23 +0100)] 
Filter: Fix return on top-level

Broken detection of top-level case caused crash when return was called
from top-of-stack position. It should behave as reject/accept.

Thanks to Damian Zaremba for the bugreport.

4 years agoNest: Per-channel debug flags
Ondrej Zajicek (work) [Mon, 7 Dec 2020 21:19:40 +0000 (22:19 +0100)] 
Nest: Per-channel debug flags

The patch add support for per-channel debug flags, currently just
'states', 'routes', and 'filters'. Flag 'states' is used for channel
state changes, remaining two for routes passed through the channel.
The per-protocol debug flags 'routes'/'filters' still enable reporting
of routes for all channels, to keep existing behavior.

The patch causes minor changes in some log messages.

4 years agoFilter: Add 'weight' route attribute
Ondrej Zajicek (work) [Wed, 2 Dec 2020 04:02:26 +0000 (05:02 +0100)] 
Filter: Add 'weight' route attribute

Add 'weight' route attribute that allows to get and set ECMP weight of
nexthops. Similar to 'gw' attribute, it is limited to the first nexthop,
but it is useful for handling BGP multipath, where an ECMP route is
merged from multiple regular routes.

4 years agoBGP: Zero the newly allocated bucket structure
Ondrej Zajicek (work) [Wed, 25 Nov 2020 14:44:00 +0000 (15:44 +0100)] 
BGP: Zero the newly allocated bucket structure

This fixes an issue with dirty node passed to add_tail().

Thanks to Andreas Rammhold for the initial patch.

4 years agoLog: Fix locking during log reconfiguration
Ondrej Zajicek (work) [Wed, 25 Nov 2020 14:15:13 +0000 (15:15 +0100)] 
Log: Fix locking during log reconfiguration

The log subsystem should be locked earlier, as default_log_list() may
internally manipulate with the current_log_list (if it is also a default
log list).

4 years agoLog: Reinitialize the static logging structures
Ondrej Zajicek (work) [Wed, 25 Nov 2020 14:04:34 +0000 (15:04 +0100)] 
Log: Reinitialize the static logging structures

The static logging structures are reused, we need to reinitialize them
otherwise add_tail() would fail in debug build. Reinitializing these
structures should be fine as the list they belong to is being
reinitialized on entry to the very same function.

Thanks to Andreas Rammhold and Mikael Magnusson for patches.

4 years agoMinor cleanups with cfg_allocz()
Ondrej Zajicek (work) [Tue, 24 Nov 2020 03:09:11 +0000 (04:09 +0100)] 
Minor cleanups with cfg_allocz()

Also fixes some more failed asserts due to add_tail().

4 years agoFix some failed asserts due to add_tail()
Ondrej Zajicek (work) [Tue, 24 Nov 2020 02:42:23 +0000 (03:42 +0100)] 
Fix some failed asserts due to add_tail()

When config structures are copied due to template application,
we need to reset list node structure before calling add_tail().

Thanks to Mikael Magnusson for patches.

4 years agoSome minor sl_allocz() cleanups
Ondrej Zajicek (work) [Tue, 24 Nov 2020 02:21:44 +0000 (03:21 +0100)] 
Some minor sl_allocz() cleanups

4 years agolib/slab: introduce sl_allocz() function and use it in Babel
Toke Høiland-Jørgensen [Tue, 24 Nov 2020 01:32:13 +0000 (02:32 +0100)] 
lib/slab: introduce sl_allocz() function and use it in Babel

The babel protocol code was initialising objects returned from the slab
allocator by assigning to each of the struct members individually, but
wasn't touching the NODE member while doing so. This leads to warnings on
debug builds since commit:

baac7009063d ("List expensive check.")

To fix this, introduce an sl_allocz() variant of the slab allocator which
will zero out the memory before returning it, and switch all the babel call
sites to use this version. The overhead for doing this should be negligible
for small objects, and in the case of babel, the largest object being
allocated was being zeroed anyway, so we can drop the memset in
babel_read_tlv().

4 years agoStatic: Support for multiple routes with the same network
Ondrej Zajicek (work) [Thu, 19 Nov 2020 15:38:39 +0000 (16:38 +0100)] 
Static: Support for multiple routes with the same network

Add support for proper handling of multiple routes with the same network
to the static protocol. Routes are distinguished by internal index, which
is assigned automatically (sequentially for routes within each network).
Having different route preference or igp_metric attribute is optional.

4 years agoDoc: Added example of static routes with BGP large communities
Nigel Kukard [Wed, 18 Nov 2020 17:00:12 +0000 (18:00 +0100)] 
Doc: Added example of static routes with BGP large communities

4 years agoOSPFv3: Fix intra-area-prefix-LSA origination on DR
Ondrej Zajicek (work) [Wed, 18 Nov 2020 16:37:29 +0000 (17:37 +0100)] 
OSPFv3: Fix intra-area-prefix-LSA origination on DR

When a new link-LSA is originated, we need to notify intra-area-prefix-LSA
handling, like when a new link-LSA is received. Otherwise a new network
prefix added to a DR is not propagated immediately.

Thanks to Bala Sajja for the bugreport.

4 years agoDoc: Fix typo
Ondrej Zajicek (work) [Sun, 15 Nov 2020 15:28:13 +0000 (16:28 +0100)] 
Doc: Fix typo

Thanks to Hexhu for the bugreport.

4 years agoNest: Fix crash in receive limit handling in import table
Ondrej Zajicek (work) [Sun, 15 Nov 2020 15:01:19 +0000 (16:01 +0100)] 
Nest: Fix crash in receive limit handling in import table

Logging as a result of triggered receive limit in import table code
accesset rte->net, which was not filed yet.

Thanks to Pier Carlo Chiodi for the bugreport.

4 years agoBFD: Update documentation about per-session options
Ondrej Zajicek (work) [Thu, 12 Nov 2020 03:50:45 +0000 (04:50 +0100)] 
BFD: Update documentation about per-session options

4 years agoBFD: Better handling of BFD options in BGP configs
Ondrej Zajicek (work) [Thu, 12 Nov 2020 03:02:38 +0000 (04:02 +0100)] 
BFD: Better handling of BFD options in BGP configs

Merge multiple BFD option blocks in BGP configs instead of using the last
one. That is necessary for proper handling of templates when BFD options
are used both in a BGP template and in a BGP protocol derived from that
template.

4 years agoBFD: Fix superfluous reconfiguration of sessions
Ondrej Zajicek (work) [Thu, 12 Nov 2020 01:37:42 +0000 (02:37 +0100)] 
BFD: Fix superfluous reconfiguration of sessions

4 years agoBFD: Allow per-request session options
Ondrej Zajicek (work) [Sun, 8 Nov 2020 14:33:22 +0000 (15:33 +0100)] 
BFD: Allow per-request session options

BFD session options are configured per interface in BFD protocol. This
patch allows to specify them also per-request in protocols requesting
sessions (currently limited to BGP).

4 years agoRPKI: Add 'ignore max length' option
Ondrej Zajicek (work) [Sat, 10 Oct 2020 22:53:19 +0000 (00:53 +0200)] 
RPKI: Add 'ignore max length' option

Add 'ignore max length' option to RPKI protocol, which ignores received
max length in ROA records and instead uses max value (32 or 128). This
may be useful for implementing loose RPKI check for blackholes.

4 years agoDoc: Fix missing semicolons
Ondrej Zajicek (work) [Mon, 5 Oct 2020 12:52:55 +0000 (14:52 +0200)] 
Doc: Fix missing semicolons

Thanks to Marco Gartmann for the bugreport.

4 years agoDoc: Fix typo
Ondrej Zajicek (work) [Mon, 5 Oct 2020 12:45:01 +0000 (14:45 +0200)] 
Doc: Fix typo

Thanks to Sergey Kulikov for the bugreport.

4 years agoOSPF: Fixed a debug assert
Maria Matejka [Mon, 31 Aug 2020 13:41:39 +0000 (15:41 +0200)] 
OSPF: Fixed a debug assert

4 years agoOSPF: Skip out-of-state packets earlier
Ondrej Zajicek (work) [Wed, 12 Aug 2020 17:42:44 +0000 (19:42 +0200)] 
OSPF: Skip out-of-state packets earlier

Sometimes multicast OSPF packet is received when neighbor adjacency is
not established. Such packet should be ignored earlier in packet
processing as otherwise it causes strange error messages when OSPFv3
authentication is enabled.

5 years agoNest: Keep route ordering during route updates
Ondrej Zajicek (work) [Thu, 16 Jul 2020 13:02:10 +0000 (15:02 +0200)] 
Nest: Keep route ordering during route updates

Put new non-best routes to the end of list instead of the second
position. Put updated routes to their old position. Position is changed
just by best route selection.

5 years agoShow info from multiple protocols when protocol is not specified
Ondrej Zajicek (work) [Thu, 14 May 2020 01:48:17 +0000 (03:48 +0200)] 
Show info from multiple protocols when protocol is not specified

Most commands like 'show ospf neighbors' fail when protocol is not
specified and there are multiple instances of given protocol type.
This is annoying in BIRD 2, as many protocols have IPv4 and IPv6
instances. The patch changes that by showing output from all protocol
instances of appropriate type.

Note that the patch also removes terminating cli_msg() call from these
commands and moves it to the common iterating code.

5 years agoFilter: Improve handling of sets in BGP path masks
Kazuki Yamaguchi [Sun, 28 Jun 2020 13:37:01 +0000 (15:37 +0200)] 
Filter: Improve handling of sets in BGP path masks

Compare the content of PM_ASN_SET in path masks. A reconfiguration
was not properly triggering a reload of affected protocols when the
members of a set in a path mask change.

Also, update the printing code to so that it can display sets in a path
mask.

5 years agoFilter: Fix comparison of BGP path mask
Kazuki Yamaguchi [Sun, 28 Jun 2020 13:33:26 +0000 (15:33 +0200)] 
Filter: Fix comparison of BGP path mask

Add a missing return statement. Path masks with the same length were all
considered the same. Comparing two with different length would cause
out-of-bounds memory access.

5 years agoOSPF: Fix bad header length test
Ondrej Zajicek (work) [Wed, 10 Jun 2020 11:27:14 +0000 (13:27 +0200)] 
OSPF: Fix bad header length test

Thanks to Slava Aseev for the thorough bugreport.

5 years agoDoc: Add 'ptp address' to OSPF doc overview
Kenth Eriksson [Wed, 3 Jun 2020 21:05:29 +0000 (23:05 +0200)] 
Doc: Add 'ptp address' to OSPF doc overview

5 years agoTest: Fix unit test mockups
Ondrej Zajicek (work) [Wed, 3 Jun 2020 14:15:29 +0000 (16:15 +0200)] 
Test: Fix unit test mockups

5 years agoNetlink: Fix parsing of MPLS multipath routes
Kazuki Yamaguchi [Wed, 3 Jun 2020 13:18:02 +0000 (15:18 +0200)] 
Netlink: Fix parsing of MPLS multipath routes

Add support for RTA_MULTIPATH attribute parsing for AF_MPLS routes.

BIRD is capable of installing a multipath route into kernel on Linux,
but it would not be seen because parsing fails. This made BIRD attempt
to install the same route repeatedly.

(The patch minorly updated by committer)

5 years agoRPKI: Fix unnecessary reconnection on reconfiguration
Kazuki Yamaguchi [Wed, 3 Jun 2020 13:05:35 +0000 (15:05 +0200)] 
RPKI: Fix unnecessary reconnection on reconfiguration

Compare the new timing parameters with the old configuration, not with
the temporary state of the current connection.

The timing values in struct rpki_cache is updated by a version 1 End Of
Data PDU, unless this behavior is suppressed by the configuration
explicitly by the "keep" keyword. Consequently, every reconfiguration
of BIRD triggers a reconnection even if it is not necessary.

5 years agoLog: Do not open logfiles when parse-and-exit option is active
Ondrej Zajicek (work) [Sun, 31 May 2020 11:21:55 +0000 (13:21 +0200)] 
Log: Do not open logfiles when parse-and-exit option is active

This is a quick workaround for an issue where configured logfiles are
opened/created during parsing of a config file even when parse-and-exit
option is active. We should later refactor the logging code to avoid
opening log during parsing altogether.

5 years agoOSPF: setting list node to zero before enlisting
Maria Matejka [Tue, 2 Jun 2020 14:58:06 +0000 (16:58 +0200)] 
OSPF: setting list node to zero before enlisting

5 years agoBabel: Set onlink flag for IPv4 routes with unreachable next hop
Ondrej Zajicek (work) [Tue, 26 May 2020 21:43:13 +0000 (23:43 +0200)] 
Babel: Set onlink flag for IPv4 routes with unreachable next hop

If the next hop of a route is not a reachable address, the route should be
installed as onlink. This enables a configuration common in mesh networks
where the mesh interface is assigned a /32 and babel handles the routing by
installing onlink routes.

Thanks to Toke Hoiland-Jorgensen for the patch.

5 years agoOSPF: Fix handling of unnumbered PtPs
Ondrej Zajicek (work) [Tue, 26 May 2020 16:21:43 +0000 (18:21 +0200)] 
OSPF: Fix handling of unnumbered PtPs

This issue has a long history. In 2012, we changed data field for
unnumbered PtP links from iface id (specified by RFC) to IP address based
on reports of bugs in Quagga that required it, and we used out-of-band
information to distinquish unnumberred PtPs with the same local IP
address.

Then with OSPF graceful restart implementation, we found that we can no
longer use out-of-band information, and we need to use only LSAdb info
for routing table calculation, but i forgot to finish handling of this
case, so multiple unnumbered PtPs with the same local IP addresses were
broken.

Considering that even recent Mikrotik RouterOS has broken next hop
calculation that depends on IP address in PtP link data field, we
cannot just switch back to the iface id for unnumbered PtP links.

The patch makes two changes: First, it goes back to use out-of-band
(position) info for distinguishing local interfaces in SPF when graceful
restart is not enabled, while still uses LSAdb-only approach for SPF
calculation when graceful restart is enabled.

Second, it adds OSPF interface option 'ptp address', which controls
whether IP address or iface id is used in data field. It is enabled
by default except for unnumbered PtP links with enabled graceful
restart.

Thanks to Kenth Eriksson for the bugreport and Joakim Tjernlund for
suggestions.

5 years agoNest: Allow key id 0
Ondrej Zajicek (work) [Tue, 19 May 2020 00:50:47 +0000 (02:50 +0200)] 
Nest: Allow key id 0

There is nothing in RFCs specifying that id 0 is not allowed. Some
implementations does not support it, while some other use key id 0 by
default. We allow it but start with key id 1 by default.

Thanks to Kenth Eriksson for the bugreport.