0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-23 10:11:53 +00:00
Commit Graph

878 Commits

Author SHA1 Message Date
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
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)
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)
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
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)
7a1f4baac1 Nest: remove last_tx_filter_change
No longer needed after redesign of export handling.
2021-01-06 14:51:49 +01:00
James Lu
455c13dc99 Nest: Read Babel metric as IGP metric
(Minor syntactic changes by committer)
2020-12-29 02:25:21 +01:00
Ondrej Zajicek (work)
61dae32b29 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.
2020-12-07 22:19:40 +01:00
Ondrej Zajicek (work)
30b8468269 Minor cleanups with cfg_allocz()
Also fixes some more failed asserts due to add_tail().
2020-11-24 04:09:11 +01:00
Ondrej Zajicek (work)
1678bc0746 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.
2020-11-24 03:42:23 +01:00
Ondrej Zajicek (work)
c9ae81656f Some minor sl_allocz() cleanups 2020-11-24 03:21:44 +01:00
Ondrej Zajicek (work)
b962967e20 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.
2020-11-15 16:01:19 +01:00
Ondrej Zajicek (work)
3b56bf8849 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.
2020-11-12 04:02:38 +01:00
Ondrej Zajicek (work)
9d3fc3062b 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).
2020-11-08 15:33:22 +01:00
Ondrej Zajicek (work)
c0e1f534c9 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.
2020-07-16 15:02:10 +02:00
Ondrej Zajicek (work)
c26c6bc2d7 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.
2020-06-28 15:38:47 +02:00
Ondrej Zajicek (work)
1ca7665fa4 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.
2020-05-19 02:50:47 +02:00
Ondrej Zajicek (work)
ec430a7fee Nest: Implement BGP path mask loop operator
Implement regex-like '+' operator in BGP path masks to match previous
path mask item multiple times. This is useful as ASNs may appear
multiple times in paths due to path prepending for traffic engineering
purposes.
2020-05-18 16:25:08 +02:00
Ondrej Zajicek (work)
b8bbbbaf56 Nest: Fix neighbor handling for colliding ranges
Resolve neighbors using longest prefix match. Although interface ranges
should not generally collide, it may happen for unnumbered links.

Thanks to Kenth Eriksson for the bugreport.
2020-05-11 04:29:36 +02:00
Maria Matejka
b12442c985 Fixed a harmless warning in production build 2020-05-01 15:41:42 +02:00
Maria Matejka
3bb10b4d31 Uninitialized list nodes fixes 2020-05-01 15:19:12 +02:00
Maria Matejka
258be56539 Nest: Added const to ea_show just to declare that this shouldn't really change anything 2020-05-01 15:19:12 +02:00
Maria Matejka
0fa8bf91cd Nest: Several assumptions to tame the static analyzer 2020-05-01 15:19:12 +02:00
Maria Matejka
bbe49ae569 Nest: Assumption in rt-show for not-so-intuitive invariant. 2020-05-01 15:19:12 +02:00