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

857 Commits

Author SHA1 Message Date
Maria Matejka
42132be5a8 Route attributes async free 2020-04-30 17:38:30 +02:00
Maria Matejka
60267ddeca Garbage collector for parallel execution 2020-04-30 17:38:30 +02:00
Maria Matejka
a861727d98 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.
2020-04-30 17:38:30 +02:00
Maria Matejka
0c0253a3a9 Preexport: No route modification, no linpool needed 2020-04-30 16:16:35 +02:00
Maria Matejka
1967fe4fa6 Route: moved rte_src pointer from rta to rte
It is an auxiliary key in the routing table, not a route attribute.
2020-04-30 16:15:59 +02:00
Maria Matejka
9d4b30a6b8 Route export: Inlined do_rt_notify() as the split was arbitrary. 2020-04-30 16:15:59 +02:00
Maria Matejka
63f4ccc8c5 Export: More elegant export dispatcher.
The previous version was a little bit spooky.
2020-04-30 16:15:59 +02:00
Maria Matejka
52b6e35251 Route export: Common export function.
Also:
* Feeding request by net.
* Passing only net_addr in export structure.
* Cleanup of krt_replace_rte() call.
2020-04-30 16:15:59 +02:00
Maria Matejka
e64fd37675 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.
2020-04-30 16:15:12 +02:00
Maria Matejka
f2e9c7b285 Route export: dropped tail-execution of do_rt_notify() 2020-04-30 16:15:12 +02:00
Maria Matejka
1f5a3605cf Route export: passing the export state in a dedicated structure 2020-04-30 16:14:26 +02:00
Maria Matejka
eb5298f3e1 Internal API change: passing all the rt_notify() data as a single structure. 2020-04-30 16:14:26 +02:00
Maria Matejka
a267d569ee 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.
2020-04-30 16:14:26 +02:00
Maria Matejka
87fcc2d735 Cleaning up also the rte_same hook which is never set 2020-04-30 16:14:26 +02:00
Maria Matejka
4e7cc6c638 Dropping rte-local dumper entries 2020-04-30 16:14:26 +02:00
Maria Matejka
1eae8266e0 Dropping the tmp_attrs mechanism as obsolete
There are no protocol-specific fields in rte now.
2020-04-30 16:14:26 +02:00
Maria Matejka
d4f632da07 Kernel: Convert the rte-local attributes to extended attributes and flags to pflags 2020-04-30 16:14:26 +02:00
Maria Matejka
93c5a314da Dropping the RTS_DUMMY temporary route storage.
Kernel route sync is done by other ways now and this code is not used
currently.
2020-04-30 16:14:26 +02:00
Maria Matejka
adebcd5e0a Babel: Convert the rte-local attributes to extended attributes 2020-04-30 16:14:26 +02:00
Maria Matejka
083e0dbb36 OSPF: Convert the rte-local attributes to extended attributes 2020-04-30 16:14:26 +02:00
Maria Matejka
0bb56d9b1b RIP: Convert the rte-local attributes to extended attributes 2020-04-30 16:14:26 +02:00
Maria Matejka
7c3a91cfab Allow a generic pointer in route extended attributes 2020-04-30 16:14:26 +02:00
Maria Matejka
6942e20d97 BGP: Moved the suppressed and stale flags to pflags 2020-04-30 16:14:26 +02:00
Maria Matejka
1fd32f9562 Preference moved to RTA and set explicitly in protocols 2020-04-30 16:14:26 +02:00
Maria Matejka
86dbe0980c Route import API redefinition.
Hidden rte_get_temp() into rte_update().
Split rte_update() / rte_withdraw().
2020-04-30 16:14:25 +02:00
Maria Matejka
0227ccd159 Uninitialized list nodes fixes 2020-04-28 16:25:14 +02:00
Maria Matejka
684caacd4f Nest: Added const to ea_show just to declare that this shouldn't really change anything 2020-04-28 16:25:14 +02:00
Maria Matejka
aaf2ae5613 Nest: Several assumptions to tame the static analyzer 2020-04-28 16:25:14 +02:00
Maria Matejka
2efc73a9a0 Nest: Assumption in rt-show for not-so-intuitive invariant. 2020-04-28 16:25:14 +02:00
Nasato Goto
a6548d5b5b BGP: Fix handling of 16bit-only ASN translation
The bug generated invalid AGGREGATOR attribute during translation of
32bit ASN to 16bit-only BGP peer. The patch fixes that.
2020-04-15 03:46:53 +02:00
Maria Matejka
fd9f0c0640 Configuration strings are constant.
This is merely a const propagation. There was no problem in there.
2020-04-09 15:37:14 +02:00
Ondrej Zajicek (work)
2755002890 Filter: Optimize IPv4 prefix sets
Use separate IPv4 and IPv6 implementation of prefix sets. Just this
change makes IPv4 prefix sets 60% smaller and 50% faster.
2020-03-26 03:57:48 +01:00
Ondrej Zajicek (work)
22c3cf955d RIP: Demand circuit support (RFC 2091) 2020-02-21 02:35:50 +01:00
Maria Matejka
4bbc10614f Added missing extern
Thanks to Robert Scheck <bird@robert-scheck.de> who reported it
and Toke Høiland-Jørgensen <toke@toke.dk> who suggested this patch.
2020-02-04 10:11:16 +01:00
Ondrej Zajicek (work)
7d767c5a3d KRT: Improve syncer code to avoid using temporary data in rtable
The old code stored route verdicts and temporary routes directly in
rtable. The new code do not store received routes (it immediately
compares them with exported routes and resolves conflicts) and uses
internal bitmap to keep track of which routes were received and which
needs to be reinstalled.

By not putting 'invalid' temporary routes to rtable, we keep rtable
in consistent state, therefore scan no longer needs to be atomic
operation and could be splitted to multiple events.
2020-01-07 18:35:03 +01:00
Ondrej Zajicek (work)
cc75b3e1dc KRT: Remove KRF_SYNC_ERROR flag
This info is now stored in an internal bmap. Unfortunately, net.flags
is still needed for temporary kernel data.
2019-12-19 16:34:35 +01:00
Ondrej Zajicek (work)
c132acae36 KRT: Remove KRF_INSTALLED flag
The same information is stored in export_map of kernel protocol.
2019-12-16 02:42:24 +01:00
Ondrej Zajicek (work)
4ab54f1aef Nest: Fix bitmap cleanup
Channel currently does not have independent pool and uses protocol pool,
which is freed when protocol changes state to down, while channel is
still in flushing. Move some some cleanup code to channel_do_flush()
so it is done before freeing of protocol pool.
2019-12-10 18:18:02 +01:00
Ondrej Zajicek (work)
5ea39eaa96 Nest: Use bitmaps to keep track of exported routes
Use a hierarchical bitmap in a routing table to assign ids to routes, and
then use bitmaps (indexed by route id) in channels to keep track whether
routes were exported. This avoids unreliable and inefficient re-evaluation
of filters for old routes in order to determine whether they were exported.
2019-11-26 18:39:25 +01:00
Ondrej Zajicek (work)
d033e6327d CLI: Fix continuation lines after final one
Continuation lines may use short form (with space instead of message
number), but this should not be done when previous line is final.

Thanks to Kenth Eriksson for the bugreport and analysis.
2019-11-26 16:43:09 +01:00
Ondrej Zajicek (work)
a52476c9be BGP: Add option to reject AS_SETs
There is a pending draft to make them obsolete
2019-11-04 22:09:35 +01:00
Ondrej Zajicek (work)
0edf0c8cd9 Support for address family constants
We already had them defined on BGP level, but they are more general.
2019-11-03 22:25:44 +01:00
Ondrej Zajicek (work)
08c4c9a30b Nest: Fix bug in export table
For regular channels do not compare src in export table, as we want to
keep here only the best (exported) route per network.
2019-11-03 20:25:42 +01:00
Ondrej Zajicek (work)
498d8145c0 Nest: Fix primary flag in show route
The route is changed by rte_make_tmp_attrs(), so we need to compare
net->routes to the original one.

Thanks to Kenth Eriksson for the bugreport.
2019-10-25 13:28:51 +02:00
Fabrice Fontaine
f9eb9b4cab Nest: Fix build without protocols
(CHECK keyword added by commiter)
2019-10-19 12:50:27 +02:00
Ondrej Zajicek (work)
843b10c8b0 Nest: Handle non-MPLS on MPLS case in recursive route update
When non-MPLS recursive route resolves to MPLS underlying route,
then it should get MPLS labels from the the underlying route.
2019-10-10 15:25:36 +02:00
Ondrej Zajicek (work)
9eace84342 Nest: Handle PtP links in recursive route update
Underlying (IGP) route may lead to PtP link, in this case it does not
need gateway. Which is different than direct route without gateway.

When recursive (BGP) route uses PtP route, it should not use recursive
next hop as immediate next hop, while for direct routes it should.
2019-10-10 15:06:32 +02:00
Ondrej Zajicek (work)
cb2b6e0494 Nest: Fix recursive route update
Missing cleanup can lead to dangling pointer to old next hops.
2019-10-10 14:01:16 +02:00
Ondrej Zajicek (work)
09ee846d92 BGP: AIGP metric support (RFC 7311) 2019-10-09 17:53:23 +02:00
Ondrej Zajicek (work)
ca2dacfcee Nest: Fix bug in export table
Exported route may be in modified state, we need to get cached one for
rte_same() and rta_clone() to work properly.
2019-09-24 17:17:37 +02:00