summaryrefslogtreecommitdiff
path: root/proto
AgeCommit message (Collapse)Author
2022-02-04Merge commit 'a9646efd40569f3a1d749bc1bd13219876b33a00' into sark-bgp-rebasedMaria Matejka
2022-02-04Merge commit '75aceadaf746f8ed0acce0424f89903283dacf16' into sark-bgp-rebasedMaria Matejka
2022-02-03Protocol limit restart/down must be callable from protocol contextMaria Matejka
2022-02-03BFD: direct notifications to protocol loopsMaria Matejka
2022-02-03BGP now runs in its own threadMaria Matejka
2022-02-03BGP: Static global linpools replaced by private linpoolsMaria Matejka
2022-02-03Asynchronous neighbor notifications fixesMaria Matejka
2022-02-03Explicitly storing and checking loop information in socketsMaria Matejka
2022-02-03Neighbors: Locking and asynchronous notificationsMaria Matejka
2022-02-03Global interface list renamed to not clash with local listsMaria Matejka
2022-02-03Babel: fixed interface pool removalMaria Matejka
2022-01-09BGP: Add option 'free bind'Ondrej Zajicek (work)
The BGP 'free bind' option applies the IP_FREEBIND/IPV6_FREEBIND socket option for the BGP listening socket. Thanks to Alexander Zubkov for the idea.
2021-12-18RPKI: Add contextual out-of-bound checks in RTR Prefix PDU handlerJob Snijders
RFC 6810 and RFC 8210 specify that the "Max Length" value MUST NOT be less than the Prefix Length element (underflow). On the other side, overflow of the Max Length element also is possible, it being an 8-bit unsigned integer allows for values larger than 32 or 128. This also implicitly ensures there is no overflow of "Length" value. When a PDU is received where the Max Length field is corrputed, the RTR client (BIRD) should immediately terminate the session, flush all data learned from that cache, and log an error for the operator. Minor changes done by commiter.
2021-11-30For safer memory allocations, resources are bound to loops.Maria Matejka
Also all loops have their basic resource pool for allocations which are auto-freed when the loop is stopping.
2021-11-23Fixed pipe reload/refeedMaria Matejka
2021-11-22BGP: End route refresh before another startsMaria Matejka
2021-11-22RPKI has its own loopMaria Matejka
2021-11-22RPKI: Use the route refresh mechanism also for the first loadMaria Matejka
2021-11-22More information on RPKI errorsMaria Matejka
2021-11-22VRF setting reduced to one argument, using default dummy iface for default vrfMaria Matejka
2021-11-22Pipe runs in parallel.Maria Matejka
2021-11-22Routing tables now have their own loops.Maria Matejka
This basically means that: * there are some more levels of indirection and asynchronicity, mostly in cleanup procedures, requiring correct lock ordering * all the internal table operations (prune, next hop update) are done without blocking the other parts of BIRD * the protocols may get their own loops very soon
2021-11-22Global table update pool removedMaria Matejka
2021-11-22Route sources have an explicit ownerMaria Matejka
This commit prevents use-after-free of routes belonging to protocols which have been already destroyed, delaying also all the protocols' shutdown until all of their routes have been finally propagated through all the pipes down to the appropriate exports. The use-after-free was somehow hypothetic yet theoretically possible in rare conditions, when one BGP protocol authors a lot of routes and the user deletes that protocol by reconfiguring in the same time as next hop update is requested, causing rte_better() to be called on a not-yet-pruned network prefix while the owner protocol has been already freed. In parallel execution environments, this would happen an inter-thread use-after-free, causing possible heisenbugs or other nasty problems.
2021-11-22Table cork: Stop creating updates when there are too many pending.Maria Matejka
The corked procedure gets a callback when uncorked. Supported by table maintenance routines and also BGP.
2021-11-22Converting the former BFD loop to a universal IO loop and protocol loop.Maria Matejka
There is a simple universal IO loop, taking care of events, timers and sockets. Primarily, one instance of a protocol should use exactly one IO loop to do all its work, as is now done in BFD. Contrary to previous versions, the loop is now launched and cleaned by the nest/proto.c code, allowing for a protocol to just request its own loop by setting the loop's lock order in config higher than the_bird. It is not supported nor checked if any protocol changed the requested lock order in reconfigure. No protocol should do it at all.
2021-11-22Moved BFD IO loop out of BFD as we want to use it as socket-io coroutineMaria Matejka
2021-11-22Unified time for whole BIRDMaria Matejka
In previous versions, every thread used its own time structures, effectively leading to different time in every thread and strange logging messages. The time processing code now uses global atomic variables to keep current time available for fast concurrent reading and safe updates.
2021-11-22Dropping the POSIX thread-local variables in favor of much easier-to-use C11 ↵Maria Matejka
thread-local variables
2021-11-22Special table hooks rectified.Maria Matejka
* internal tables are now more standalone, having their own import and export hooks * route refresh/reload uses stale counter instead of stale flag, allowing to drop walking the table at the beginning * route modify (by BGP LLGR) is now done by a special refeed hook, reimporting the modified routes directly without filters
2021-11-22Table import and export are now explicit hooks.Maria Matejka
Channels have now included rt_import_req and rt_export_req to hook into the table instead of just one list node. This will (in future) allow for: * channel import and export bound to different tables * more efficient pipe code (dropping most of the channel code) * conversion of 'show route' to a special kind of export * temporary static routes from CLI The import / export states are also updated to the new algorithms.
2021-11-09Limit containmentMaria Matejka
2021-11-09RPKI: Do nothing when protocol is stoppingMaria Matejka
2021-11-09RPKI shouldn't process more packets when being stoppedMaria Matejka
2021-11-09Protocol stats split to import and exportMaria Matejka
2021-11-09Nest: Route generations and explicit tracking route propagion through pipesMaria Matejka
2021-11-09Refeed is done from export table when appropriateMaria Matejka
2021-11-09Suppressed MRT unused static function warningMaria Matejka
2021-11-09Split route data structure to storage (ro) / manipulation (rw) structures.Maria Matejka
Routes are now allocated only when they are just to be inserted to the table. Updating a route needs a locally allocated route structure. Ownership of the attributes is also now not transfered from protocols to tables and vice versa but just borrowed which should be easier to handle in a multithreaded environment.
2021-10-13RIP fixup + dropping the tmp_attrs mechanism as obsoleteMaria Matejka
2021-10-13BGP: Moved the suppressed and stale flags to pflagsMaria Matejka
2021-10-13Dropping the RTS_DUMMY temporary route storage.Maria Matejka
Kernel route sync is done by other ways now and this code is not used currently.
2021-10-13Babel: Convert the rte-local attributes to extended attributesMaria Matejka
2021-10-13OSPF: Convert the rte-local attributes to extended attributesMaria Matejka
2021-10-13RIP: convert the rte-local attributes to extended attributesMaria Matejka
2021-10-13IGP metric getter refactoring to protocol callbackMaria Matejka
Direct protocol hooks for IGP metric inside nest/rt-table.c make the protocol API unnecessarily complex. Instead, we use a proper callback.
2021-10-13Route: moved rte_src pointer from rta to rteMaria Matejka
It is an auxiliary key in the routing table, not a route attribute.
2021-10-13Preference moved to RTA and set explicitly in protocolsMaria Matejka
2021-10-13Preexport: No route modification, no linpool neededMaria Matejka
2021-10-13OSPF: explicitly stop the periodic tick on shutdown to avoid recalculation racesMaria Matejka