Maria Matejka [Thu, 2 May 2024 09:39:34 +0000 (11:39 +0200)]
Real almost-lockless feeds and more pull-like exports
Introducing a new omnipotent internal API to just pass route updates
from whatever point wherever we want.
From now on, all the exports should be processed by RT_WALK_EXPORTS
macro, and you can also issue a separate feed-only request to just get a
feed and finish.
The exporters can now also stop and the readers must expect that to
happen and recover. Main tables don't stop, though.
Maria Matejka [Fri, 10 May 2024 14:22:16 +0000 (16:22 +0200)]
Dropping obsolete protocol Perf
We have now better methods how to measure overall performance
and this obsolete protocol has basically rotten away. If anybody
needs its features, feel free to revive it in future.
Maria Matejka [Tue, 23 Apr 2024 16:28:34 +0000 (18:28 +0200)]
Using ea_lookup_tmp() for temporarily keeping attribute references
To avoid needs for keeping local temporary references for attributes,
now one can use ea_lookup_tmp() to ensure that the attributes are
valid and stored until the task ends. After that, the attributes are
automatically unref'd and also deallocated if needed.
Maria Matejka [Thu, 16 May 2024 08:22:19 +0000 (10:22 +0200)]
Avoiding RCU synchronization deadlock when locking in critical section
Explicitly marking domains eligible for RCU synchronization. It's then
forbidden to lock these domains in RCU critical section to avoid
possible deadlock.
Maria Matejka [Wed, 3 Apr 2024 12:47:15 +0000 (14:47 +0200)]
Table feeds are now lockless
This commit makes the route chains in the tables atomic. This allows not
only standard exports but also feeds and bulk exports to be processed
without ever locking the table.
Design note: the overall data structures are quite brittle. We're using
RCU read-locks to keep track about readers, and we're indicating ongoing
work on the data structures by prepending a REF_OBSOLETE sentinel node
to make every reader go waiting.
All the operations are intended to stay inside nest/rt-table.c and it
may be even best to further refactor the code to hide the routing table
internal structure inside there. Nobody shall definitely write any
routines manipulating live routes in tables from outside.
Maria Matejka [Fri, 17 May 2024 21:21:38 +0000 (23:21 +0200)]
Loop run waits until pingers finish
This ensures that if somebody passes an event to a loop which
has just started executing, then the event gets picked up. Otherwise
there is a race condition causing stray events pending in queue
but without the ping (because the run actually finishes too fast
to pickup the later events).
Maria Matejka [Wed, 10 Apr 2024 14:14:40 +0000 (16:14 +0200)]
BGP: Fixed corking of RX
If cork occurred after some incoming data had been already processed,
BGP incorrectly processed them again after uncorking because it forgot
to store the actual socket state.
Now storing the socket state (done at the end of bgp_rx()) and
therefore the bug is fixed.
Ondrej Zajicek [Thu, 21 Mar 2024 23:40:06 +0000 (00:40 +0100)]
Static: Fix invalid combination of nexthop options
BFD requires defined local IP, but for nexthop with onlink there might
not be such address. So we reject this combination of nexthop options.
This prevent crash where such combination of options is used.
Ondrej Zajicek [Tue, 5 Mar 2024 15:38:24 +0000 (16:38 +0100)]
Filter: Add route attribute gw_mpls_stack
Add route attribute gw_mpls_stack to make MPLS stack of route nexthop
accessible from filters. Its type is T_CLIST, which is really not correct
(as it is a list, while T_CLIST is a set). Therefore, we keep this
attribute *undocumented* and it will be *changed* without further notice.
Based on a patch from Trisha Biswas <tbiswas@fastly.com>, thanks!
Job Snijders [Thu, 22 Feb 2024 13:58:29 +0000 (14:58 +0100)]
RPKI: Add 'local address' configuration option
Allow to explicitly configure the source IP address for RPKI-To-Router
sessions. Predictable source addresses are useful for minimizing the
holes to be poked in ACLs.
Changed from 'source address' to 'local address' by committer.
Ondrej Zajicek [Tue, 20 Feb 2024 16:39:05 +0000 (17:39 +0100)]
BGP: Maintain valid route attribute flags even in local tables
BGP route attributes have flags (Optional, Transitive) that are validated
on decode and set to valid value on export. But if such attribute is
modified by filter or set internally by BGP during import, then its flags
would be zero in local tables. That usually does not matter, as they are
not used locally and they were fixed on export, but invalid flags leaked
in BMP and MRT dumps.
Keep route attribute flags set to valid values even when set by filters
or modified by BGP.