0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-22 09:41:54 +00:00
Commit Graph

3726 Commits

Author SHA1 Message Date
Maria Matejka
28e81229a8 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.
2021-03-21 00:28:17 +01:00
Maria Matejka
a89cf0525a Merged export moved after out_table 2021-03-21 00:28:17 +01:00
Maria Matejka
ef95b3c7c8 Recursive route nexthop updates now announced with valid new_best/old_best information 2021-03-21 00:28:17 +01:00
Maria Matejka
f23f014ef3 Kernel protocol now uses out_table resync mechanism for periodic scanning 2021-03-21 00:28:17 +01:00
Maria Matejka
73ee8e18b3 Route export split into sub-functions 2021-03-21 00:28:13 +01:00
Maria Matejka
b7c26c1030 Route export: Packed all the export code before export table update to one function 2021-03-21 00:11:00 +01:00
Maria Matejka
d24a6ad4c7 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.
2021-03-21 00:09:17 +01:00
Maria Matejka
a9d468c590 Preexport: No route modification, no linpool needed 2021-03-20 23:53:59 +01:00
Maria Matejka
415d6e299c Route: moved rte_src pointer from rta to rte
It is an auxiliary key in the routing table, not a route attribute.
2021-03-20 23:53:56 +01:00
Maria Matejka
7d67c21b12 Route export: Inlined do_rt_notify() as the split is now for nothing. 2021-03-20 23:52:31 +01:00
Maria Matejka
3357e0a199 Route export: More elegant export dispatcher.
Also:
* Feeding request by net.
* Passing only net_addr in export structure.
* Cleanup of krt_replace_rte() call.
2021-03-20 23:45:32 +01:00
Maria Matejka
7930c03a23 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.
2021-03-20 23:24:12 +01:00
Maria Matejka
d53623f120 Route export: dropped tail-execution of do_rt_notify() 2021-03-20 23:24:12 +01:00
Maria Matejka
05336bb615 Route export: passing the export state in a dedicated structure 2021-03-20 23:24:12 +01:00
Maria Matejka
45475df1bc Internal API change: passing all the rt_notify() data as a single structure. 2021-03-20 23:24:12 +01:00
Maria Matejka
1cddde9fa6 Export table: Fixed segfault on withdraw.
This happens only if the channel really uses the old route.
2021-03-20 23:24:12 +01:00
Maria Matejka
f604915200 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.
2021-03-20 23:24:12 +01:00
Maria Matejka
6cbeefc2ac Cleaning up also the rte_same hook which is never set 2021-03-20 23:24:12 +01:00
Maria Matejka
f2918e20ea Dropping rte-local dumper entries 2021-03-20 23:24:12 +01:00
Maria Matejka
5ceaec93f7 Dropping the tmp_attrs mechanism as obsolete
There are no protocol-specific fields in rte now.
2021-03-20 23:24:12 +01:00
Maria Matejka
c32410fb40 Kernel: Convert the rte-local attributes to extended attributes and flags to pflags 2021-03-20 23:24:12 +01:00
Maria Matejka
1a52c2ffff Dropping the RTS_DUMMY temporary route storage.
Kernel route sync is done by other ways now and this code is not used
currently.
2021-03-20 23:24:12 +01:00
Maria Matejka
3eca940c22 Babel: Convert the rte-local attributes to extended attributes 2021-03-20 23:24:10 +01:00
Maria Matejka
3a7ee2c90d OSPF: Convert the rte-local attributes to extended attributes 2021-03-20 23:22:47 +01:00
Maria Matejka
984ba01589 RIP: Convert the rte-local attributes to extended attributes 2021-03-20 23:21:25 +01:00
Maria Matejka
9d0dec40f8 IGP metric getter refactoring to switch 2021-03-20 23:18:34 +01:00
Maria Matejka
a67064a494 Allow a generic pointer in route extended attributes 2021-03-20 20:54:10 +01:00
Maria Matejka
dd18eef5ac BGP: Moved the suppressed and stale flags to pflags 2021-03-20 20:52:13 +01:00
Maria Matejka
cda7a1936d Preference moved to RTA and set explicitly in protocols 2021-03-20 20:51:53 +01:00
Maria Matejka
aac08f12a7 Route import API redefinition.
Hidden rte_get_temp() into rte_update().
Split rte_update() / rte_withdraw().
2021-03-20 20:41:41 +01:00
Maria Matejka
b8b900e803 Filter: Additional consistency checks 2021-03-20 20:36:19 +01:00
Ondrej Zajicek (work)
82f19ba95e NEWS and version update 2021-03-18 20:18:38 +01:00
Ondrej Zajicek (work)
f1ffe6a231 Add new BGP tests 2021-03-18 15:54:44 +01:00
Ondrej Zajicek (work)
5a6e8380f8 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.
2021-03-18 15:44:04 +01:00
Ondrej Zajicek (work)
454ae30445 RPKI: Improve error handling of DNS resolver 2021-03-17 17:24:00 +01:00
Ondrej Zajicek (work)
0a3db4c680 Minor fixes for restricted builds 2021-03-17 15:56:12 +01:00
Ondrej Zajicek (work)
2f98153490 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.
2021-03-16 20:10:00 +01:00
Ondrej Zajicek (work)
ae9ae864d3 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.
2021-03-16 16:34:42 +01:00
Ondrej Zajicek (work)
94abefc00b 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.
2021-03-15 18:37:18 +01:00
Ondrej Zajicek (work)
0d1a11cca3 Doc: Document automatic RPKI reload 2021-03-15 17:51:33 +01:00
Ondrej Zajicek (work)
6489a2450e Doc: Document channel debug options 2021-03-15 16:16:32 +01:00
Ondrej Zajicek (work)
7be3af7fa6 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).
2021-03-12 15:35:56 +01:00
Ondrej Zajicek (work)
9cf3d53311 Static: Implement reload hook 2021-03-10 15:07:19 +01:00
Ondrej Zajicek (work)
211fe69c98 Nest: No automatic ROA reload on non-reloadable channels 2021-03-09 18:37:52 +01:00
Ondrej Zajicek (work)
d3782c72b9 Nest: Add option to control automatic RPKI reload
Also, no automatic reload for BGP channels without import/export table.
2021-02-12 05:05:18 +01:00
Ondrej Zajicek (work)
77ce849ecf Tests: Add missing mockup function to tests 2021-02-10 17:29:14 +01:00
Vincent Bernat
714238716e 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.
2021-02-10 16:53:57 +01:00
Ondrej Zajicek (work)
00b85905b9 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.
2021-02-10 03:09:57 +01:00
Ondrej Zajicek (work)
d06a875b04 Filter: Recursive filter iteration code
Add macros for recursive filter iteration that allows to examine
all instructions reachable from a filter.
2021-02-07 19:21:42 +01:00
Ondrej Zajicek (work)
5d414309ec 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.
2021-01-22 04:34:15 +01:00