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

1204 Commits

Author SHA1 Message Date
Maria Matejka
0491657518 fixup! added a long commentary on how the roa autoreload works 2023-11-02 12:08:57 +01:00
Maria Matejka
9a6e29c171 added a long commentary on how the roa autoreload works 2023-11-02 11:45:23 +01:00
Katerina Kubecova
0403f0608b fixup! fixup! fixup! fixup! fixup! partial import seems working 2023-11-02 10:04:35 +01:00
Katerina Kubecova
723092115f fixup! fixup! fixup! fixup! partial import seems working 2023-11-01 17:28:08 +01:00
Katerina Kubecova
283ea03419 fixup! fixup! fixup! partial import seems working 2023-10-25 14:55:46 +02:00
Katerina Kubecova
95c3ac5d8b fixup! fixup! partial import seems working 2023-10-25 13:41:23 +02:00
Katerina Kubecova
1eaf7213b6 partial import seems working 2023-10-25 12:18:19 +02:00
Katerina Kubecova
455e7e49c6 not working 2023-10-25 11:08:13 +02:00
Katerina Kubecova
292af59e06 fixup! partial reload for RPKI - not working 2023-10-24 12:00:03 +02:00
Katerina Kubecova
90f70e0009 partial reload for RPKI - not working 2023-10-24 09:52:09 +02:00
Katerina Kubecova
5acdd8ec43 fixup! fixup! Partial import reload looks working 2023-10-17 15:28:31 +02:00
Katerina Kubecova
06954bbabf fixup! Partial import reload looks working 2023-10-17 15:17:53 +02:00
Katerina Kubecova
f9e46a8e31 Partial import reload looks working 2023-10-13 09:44:16 +02:00
Katerina Kubecova
21e7d9c5c3 Partial import reload looks working for cli 2023-10-12 15:18:42 +02:00
Katerina Kubecova
10bf227de7 Partial import reload 2023-10-12 13:16:54 +02:00
Maria Matejka
479911ee78 fixup! Partial reloads of channels 2023-10-05 14:22:16 +02:00
Maria Matejka
468833b24f Channel reload: don't reload if export is down 2023-10-05 12:09:16 +02:00
Katerina Kubecova
b3e33da83d Partial reloads of channels
Now it's possible to reload only part of routes, e.g. when ROA has
changed.
2023-10-05 12:08:32 +02:00
Maria Matejka
898cc7ee9b Prefiltering routes by net and custom hook for partial reloads 2023-10-05 12:08:15 +02:00
Maria Matejka
45e8629f53 Channel feeding request respects the subnet tries 2023-10-04 10:39:46 +02:00
Maria Matejka
5e733a764d Channel feeding request has a done-hook 2023-10-04 10:02:43 +02:00
Maria Matejka
198fb23a3a Merge commit '93509af4' into HEAD 2023-10-03 11:26:46 +02:00
katerina.kubecova
93509af4c1 Table preexport net-filter refactoring
Also added a possibility for filtering by trie.
2023-10-03 11:08:28 +02:00
katerina.kubecova
216abcb12e ROA notifications store the affected nets into trie 2023-10-03 11:07:46 +02:00
Maria Matejka
8d1215dba6 Channel: Refeeding by an auxiliary request if needed.
If the protocol supports route refresh on export, we keep the stop-start
method of route refeed. This applies for BGP with ERR or with export
table on, for OSPF, Babel, RIP or Pipe.

For BGP without ERR or for future selective ROA reloads, we're adding an
auxiliary export request, doing the refeed while the main export request
is running, somehow resembling the original method of BIRD 2 refeed.

There is also a refeed request queue to keep track of different refeed
requests.
2023-10-03 09:54:39 +02:00
Maria Matejka
e65a5257b2 Protocols have now assigned startup phases
For now, there are 4 phases: Necessary (device), Connector (kernel, pipe), Generator (static, rpki) and Regular.
Started and reconfigured are from Necessary to Regular, shutdown backwards.

This way, kernel can flush routes before actually being shutdown.
2023-09-24 23:23:08 +02:00
Maria Matejka
5ab182d8d1 Iface: trace log messages cleanup 2023-09-24 22:20:01 +02:00
Maria Matejka
c92b5ad218 Table: Added some journal and export tracing 2023-09-24 20:43:04 +02:00
Maria Matejka
32bb548c11 Table: Fixed feed race condition
The problem happened like this:

1. Single route for the given net in table
2. A feed is started
3. The route is deleted (from another thread)
4. The feed finds an empty net, exports nothing, ignores journal (here is bug)
5. The route is added
6. The export transitions from FEEDING to READY
7. While processing the journal, the route deletion and addition combines into noop.

This way routes mysteriously disappeared in specific cases of link instability.

Problem fixed by explicitly marking the empty-net journal entries as processed in step 4.
2023-09-24 20:43:04 +02:00
Maria Matejka
c262c728eb Export: More strict export state checking on change 2023-09-24 20:43:04 +02:00
Maria Matejka
a920b5111c Properly consted routes inside table 2023-09-24 20:43:04 +02:00
Maria Matejka
206b33fd0b Filter iterator accepts lines instead of filter 2023-09-24 20:43:04 +02:00
Vojtech Vilimek
b43580d77d Renamed channel class pointers
The channel class pointers were strangely named , not .
2023-09-24 20:43:04 +02:00
Maria Matejka
32009cb6eb Logging: Abolished stdio in favor of write() to make the logging faster. 2023-09-24 20:40:06 +02:00
Maria Matejka
88307c31c5 CLI: Dropping the mechanism of echoing log messages
This is better done by running tail -f on a logfile.
2023-09-14 14:45:01 +02:00
Maria Matejka
0faf3bb630 Enhanced tracing of route refresh state 2023-09-14 14:40:33 +02:00
Maria Matejka
510b1046e1 Hostentry application locking
Due to a race condition between rta_apply_hostentry() and rt_update_hostentry(),
happening when a new route is inserted to a table, this commit makes it mandatory
to lock the next hop resolution table while resolving the next hop.

This may be slow, we'll fix it better in some future release
2023-08-29 10:24:54 +02:00
Maria Matejka
fcbf22d1f6 Properly protecting the route src global index by RCU read lock and atomic operations
There was a bug occuring when one thread sought for a src by its global id
and another one was allocating another src with such an ID that it caused
route src global index reallocation. This brief moment of inconsistency
led to a rare use-after-free of the old global index block.
2023-05-11 11:41:01 +02:00
Maria Matejka
a818a3011e Channel: configurable feed block size 2023-05-11 11:41:01 +02:00
Maria Matejka
318ac8720f OLocks in BGP must be freed early 2023-05-09 10:33:23 +02:00
Maria Matejka
ed91d884d3 Hostentry: fix pool locking 2023-05-06 10:50:31 +02:00
Maria Matejka
7d8e541057 Linpool state save and restore refactoring 2023-05-06 10:50:31 +02:00
Maria Matejka
91471531a1 Fixed race condition in hostentry allocation 2023-05-03 21:30:29 +02:00
Maria Matejka
ce7495b49a Refactoring of domains connected to pools 2023-04-25 09:52:28 +02:00
Maria Matejka
22f54eaee6 Resource pools are now bound with domains.
Memory allocation is a fragile part of BIRD and we need checking that
everybody is using the resource pools in an appropriate way. To assure
this, all the resource pools are associated with locking domains and
every resource manipulation is thoroughly checked whether the
appropriate locking domain is locked.

With transitive resource manipulation like resource dumping or mass free
operations, domains are locked and unlocked on the go, thus we require
pool domains to have higher order than their parent to allow for this
transitive operations.

Adding pool locking revealed some cases of insecure memory manipulation
and this commit fixes that as well.
2023-04-24 10:33:28 +02:00
Maria Matejka
6230d87c74 Protocols and tables now use the birdloop pools as primary 2023-04-22 21:20:19 +02:00
Maria Matejka
1141ce4e2d Resource pool closing has its dedicated function 2023-04-22 20:49:58 +02:00
Maria Matejka
b3f805ce29 Socket closing has its dedicated function 2023-04-22 20:48:42 +02:00
Maria Matejka
074739e0e9 Global protocol list is typed to avoid typecast confusion 2023-04-22 20:48:42 +02:00
Maria Matejka
787fb56da3 IO: added a specific loop pickup group for BFD; to be done better in future 2023-04-17 13:30:14 +02:00