summaryrefslogtreecommitdiff
path: root/nest/proto.c
AgeCommit message (Collapse)Author
2021-03-30Routing table is now a resource allocated from its own poolMaria Matejka
This also fixes memory leaks from import/export tables being never cleaned up and freed.
2021-03-17Minor fixes for restricted buildsOndrej Zajicek (work)
2021-03-16Pipe: Propagate debug flags from protocol to channelsOndrej Zajicek (work)
Pipe channels are kind-of implicit, so setting protocol debug flags should also set pipe debug flags.
2021-03-12Rate-limit scheduling of work-eventsOndrej Zajicek (work)
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-09Nest: No automatic ROA reload on non-reloadable channelsOndrej Zajicek (work)
2021-02-12Nest: Add option to control automatic RPKI reloadOndrej Zajicek (work)
Also, no automatic reload for BGP channels without import/export table.
2021-02-10Nest: Automatic channel reloads based on RPKI changesOndrej Zajicek (work)
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-07Filter: Recursive filter iteration codeOndrej Zajicek (work)
Add macros for recursive filter iteration that allows to examine all instructions reachable from a filter.
2021-01-06Nest: remove last_tx_filter_changeOndrej Zajicek (work)
No longer needed after redesign of export handling.
2020-12-07Nest: Per-channel debug flagsOndrej Zajicek (work)
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-11-24Fix some failed asserts due to add_tail()Ondrej Zajicek (work)
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-06-28Show info from multiple protocols when protocol is not specifiedOndrej Zajicek (work)
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-04-09Configuration strings are constant.Maria Matejka
This is merely a const propagation. There was no problem in there.
2019-12-10Nest: Fix bitmap cleanupOndrej Zajicek (work)
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-11-26Nest: Use bitmaps to keep track of exported routesOndrej Zajicek (work)
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-08-14Nest: Fix crash in route reload when some channels are not up.Ondrej Zajicek (work)
Only channels that are up can be reloaded.
2019-08-14BGP: implement Adj-RIB-OutOndrej Zajicek (work)
The patch implements optional internal export table to a channel and hooks it to BGP so it can be used as Adj-RIB-Out. When enabled, all exported (post-filtered) routes are stored there. An export table can be examined using e.g. 'show route export table bgp1.ipv4'.
2019-08-06BGP: Improve reconfigurationOndrej Zajicek (work)
Several BGP channel options (including 'next hop self') could be reconfigured without session reset, with just route refeed/refresh. The patch improves reconfiguration code to do it that way.
2019-07-24Merge remote-tracking branch 'origin/mq-filter-stack'Ondrej Zajicek (work)
2019-07-24Nest: VRF of protocol can be explicitly specified as 'default'Ondrej Zajicek (work)
Protocol can have specified VRF, in such case it is restricted to a set of ifaces associated with the VRF, otherwise it can use all interfaces. The patch allows to specify VRF as 'default', in which case it is restricted to a set of iface not associated with any VRF.
2019-07-03Merge branch 'master' into mq-filter-stackMaria Matejka
2019-06-30Nest: Add command to request graceful restartOndrej Zajicek (work)
When 'graceful down' command is entered, protocols are shut down with regard to graceful restart. Namely Kernel protocol does not remove routes and BGP protocol does not send notification, just closes the connection.
2019-04-30BGP: Dynamic BGPOndrej Zajicek (work)
Support for dynamically spawning BGP protocols for incoming connections. Use 'neighbor range' to specify range of valid neighbor addresses, then incoming connections from these addresses spawn new BGP instances.
2019-02-20Conf: Symbol implementation converted from void pointers to unionMaria Matejka
... and consted some declarations.
2019-02-05Nest: Report preferred counters also when 'import keep filtered' is enabledOndrej Zajicek (work)
Thanks to Michal Nowak for reporting the issue.
2019-02-02Nest: Reestablish preferred countersOndrej Zajicek (work)
2018-12-18Perf: Protocol to measure BIRD performance internallyMaria Matějka
This protocol is highly experimental and nobody should use it in production. Anyway it may help you getting some insight into what eats so much time in filter processing.
2018-12-16Nest: fix bug in previous patches related to channel reconfigurationOndrej Zajicek (work)
The patch d506263d... blocked adding channel during reconfiguration, that broke protocols which use the same functiona also during init. This patch fixes that.
2018-12-12BGP: implement Adj-RIB-InOndrej Zajicek (work)
The patch implements optional internal import table to a channel and hooks it to BGP so it can be used as Adj-RIB-In. When enabled, all received (pre-filtered) routes are stored there and import filters can be re-evaluated without explicit route refresh. An import table can be examined using e.g. 'show route import table bgp1.ipv4'.
2018-12-11Nest: Forbid adding channels during reconfigurationOndrej Zajicek (work)
When a new channel is found during reconfiguration, do force restart of the protocol, like with any other un-reconfigurable change. The old behavior was that the new channel was added but remained in down state, even if the protocol was up, so a manual protocol restart was often necessary. In the future this should be improved such that a reconfigurable channel addition (e.g. direct) is accepted and channel is started, while an un-reconfigurable addition forces protocol restart.
2018-11-20The MRT protocolOndrej Zajicek (work)
The new MRT protocol is responsible for periodic RIB table dumps in the MRT format (RFC 6396). Also the existing code for BGP4MP MRT dumps is refactored and splitted between BGP to MRT protocols, will be more integrated into MRT in the future. Example: protocol mrt { table "*"; filename "%N_%F_%T.mrt"; period 60; } It is partially based on the old MRT code from Pavel Tvrdik.
2018-10-01Lib: Add and use ev_new_init()Ondrej Zajicek (work)
2018-07-03Nest: Fix race condition during reconfigurationOndrej Zajicek (work)
If export filter is changed during reconfiguration and a route disappears between reconfiguration and refeed (e.g., if the route is a static route also removed during the reconfiguration), the route is not withdrawn. The patch fixes that by adding tx reconfiguration timestamp.
2018-05-29Protocol: Introducing an enum protocol_classJan Maria Matejka
This supersedes the EAP_* constants.
2018-01-10Use non-fatal asserts even for regular buildOndrej Zajicek (work)
2018-01-09Nest: Allow modification of channels inherited from templatesOndrej Zajicek (work)
Multiple definitions of same channels are forbidden, but inherited channel can be redefined. In such case channel options are merged.
2018-01-09Nest: Fix filter reconfigurationOndrej Zajicek (work)
Function filter_same() must be called with arguments in proper order, otherwise it breaks the new filter, causing crash during route processing.
2017-12-08Nest: Minor formatting changesOndrej Zajicek (work)
2017-12-07Merge commit '1e8721e2aeccfbc3f533e8b8abc07582cee77e9a' into int-newOndrej Zajicek (work)
2017-12-07Merge commit '7b2c5f3d2826e3175bf31b1c36056c9efc587a2b' into int-newOndrej Zajicek (work)
2017-12-07Timers: Revert temporary names and remove old timer.hOndrej Zajicek (work)
2017-12-07Timers: Fix TBF and some last remainsOndrej Zajicek (work)
2017-12-07Nest: Update to new timersOndrej Zajicek (work)
2017-12-07Timers: Show sub-second times in some protocol outputsOndrej Zajicek (work)
2017-12-07Timers: Parse and format functions for microsecond timesOndrej Zajicek (work)
Date/time output (e.g. in logs, show commands) can use %f to specify subsecond time. By default, millisecond precision is used in output.
2017-12-07Timers: Replace old timers with microsecond timersOndrej Zajicek (work)
The old timer interface is still kept, but implemented by new timers. The plan is to switch from the old inteface to the new interface, then clean it up.
2017-09-19BGP: Shutdown communication (RFC 8203)Ondrej Zajicek (work)
The patch implements BGP Administrative Shutdown Communication (RFC 8203) allowing BGP operators to pass messages related to BGP session administrative shutdown/restart. It handles both transmit and receive of shutdown messages. Messages are logged and may be displayed by show protocol all command. Thanks to Job Snijders for the basic patch.
2017-09-06Basic VRF supportOndrej Zajicek (work)
Add basic VRF (virtual routing and forwarding) support. Protocols can be associated with VRFs, such protocols will be restricted to interfaces assigned to the VRF (as reported by Linux kernel) and will use sockets bound to the VRF. E.g., different multihop BGP instances can use diffent kernel routing tables to handle BGP TCP connections. The VRF support is preliminary, currently there are several limitations: - Recent Linux kernels (4.11) do not handle correctly sockets bound to interaces that are part of VRF, so most protocols other than multihop BGP do not work. This will be fixed by future kernel versions. - Neighbor cache ignores VRFs. Breaks config with the same prefix on local interfaces in different VRFs. Not much problem as single hop protocols do not work anyways. - Olock code ignores VRFs. Breaks config with multiple BGP peers with the same IP address in different VRFs. - Incoming BGP connections are not dispatched according to VRFs. Breaks config with multiple BGP peers with the same IP address in different VRFs. Perhaps we would need some kernel API to read VRF of incoming connection? Or probably use multiple listening sockets in int-new branch. - We should handle master VRF interface up/down events and perhaps disable associated protocols when VRF goes down. Or at least disable associated interfaces. - Also we should check if the master iface is really VRF iface and not some other kind of master iface. - BFD session request dispatch should be aware of VRFs. - Perhaps kernel protocol should read default kernel table ID from VRF iface so it is not necessary to configure it. - Perhaps we should have per-VRF default table.
2017-05-23Minor cleanups and fixesOndrej Zajicek (work)
2017-04-25Nest: Update of show route cmdOndrej Zajicek (work)
Some code cleanup, multiple bugfixes, allows to specify also channel for 'show route export'. Interesting how such apparenty simple thing like show route cmd has plenty of ugly corner cases.