aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Conf: Allow expression in MPLS label stackky/attach-mlsKazuki Yamaguchi2023-10-111-3/+3
|
* Filter: Allow manually setting MPLS labelKazuki Yamaguchi2023-10-114-0/+35
| | | | Heh
* Nest: Statically allocate space for MPLS labelsKazuki Yamaguchi2023-10-112-31/+12
|
* NEWS and version updatev2.14Ondrej Zajicek2023-10-063-2/+32
|
* Doc: Minor fixesOndrej Zajicek2023-10-061-6/+12
|
* Conf: Bytestrings with hex: should use the same general format as ones without.Ondrej Zajicek2023-10-063-16/+12
| | | | | Either hex:01234567, or hex:01:23:45:67. No confusing formats like hex:0123:4567:ab:cdef, which looks like there is an implicit zero byte.
* KRT: Allow to learn routes with RTPROT_KERNELPavel Ĺ orejs2023-10-065-10/+28
| | | | | | | | | | | The Kernel protocol, even with the option 'learn' enabled, ignores direct routes created by the OS kernel (on Linux these are routes with rtm_protocol == RTPROT_KERNEL). Implement optional behavior where both OS kernel and third-party routes are learned, it can be enabled by 'learn all' option. Minor changes by committer.
* BGP: Improve custom BGP attributesOndrej Zajicek2023-10-055-9/+32
| | | | | | | - Implement EA_GET for custom BGP attributes - Forbid EA_SET on existing opaque attributes - Forbid redefining existing attributes - Document possible compatibility problems
* MPLS: Handle compatibility with old configsOndrej Zajicek2023-10-053-2/+10
| | | | | | | | | Old configs do not define MPLS domains and may use a static protocol to define static MPLS routes. When MPLS channel is the only channel of static protocol, handle it as a main channel. Also, define implicit MPLS domain if needed and none is defined.
* Filter: Fix scope handling in for loopsOndrej Zajicek2023-10-052-1/+61
| | | | | Changes in scope implementation broke scope handling in for loops. The term in for loops is supposed to be parsed in the parent scope.
* Conf: Fix 'show symbols'Ondrej Zajicek2023-10-041-0/+1
| | | | Seems like the root scope was not marked as active.
* BGP: Custom attribute definitions should use cfg_alloc(), not malloc()Ondrej Zajicek2023-10-041-2/+2
| | | | Otherwise we would get memory leaks.
* Filter: explicitly forbidden for-loop with pre-defined variableMaria Matejka2023-10-041-1/+1
|
* IO: Fix race condition in event processingOndrej Zajicek2023-10-041-3/+3
| | | | | | | When regular event was added from work event, we did remember that regular event list was empty and therefore we did not use zero time in poll(). This leads to ~3 s latency in route reload during reconfiguration.
* Doc: Fix syntax errors in SGMLOndrej Zajicek2023-10-041-7/+9
|
* MPLS: Update to support and use 64bit source idOndrej Zajicek2023-10-043-15/+10
|
* Doc: L3VPN documentationOndrej Zajicek2023-10-041-3/+135
|
* Doc: MPLS documentationOndrej Zajicek2023-10-041-9/+221
|
* L3VPN: Import/export target reconfigurationOndrej Zajicek2023-10-041-18/+33
|
* BGP, L3VPN: Fix MPLS channel reloadOndrej Zajicek2023-10-042-1/+12
| | | | | | When a MPLS channel is reloaded, it should reload all regular MPLS-aware channels. This causes re-evaluation of routes in FEC map and possibly reannouncement of MPLS routes.
* MPLS: Implement FEC map reconfigurationOndrej Zajicek2023-10-043-28/+147
| | | | This allows changing label policy or label range without restart.
* MPLS: Handle label allocation failuresOndrej Zajicek2023-10-043-18/+63
|
* L3VPN: Fix bug in reconfigurationOndrej Zajicek2023-10-041-0/+4
| | | | | Fields import_target / export_target link to config structures, must be updated during reconfiguration.
* MPLS: Improve handling of static label allocationsOndrej Zajicek2023-10-042-16/+24
| | | | | | | | Use mpls_new_label() / mpls_free_label() also for static labels, to keep track of allocated labels and to enforce label ranges. Static label allocations always use static label range, regardless of configured label range.
* Static: Add syntax for static MPLS labelsOndrej Zajicek2023-10-044-10/+46
| | | | | | | Instead of just using route attributes, static routes with static MPLS labels can be defined just by e.g.: route 10.1.1.0/24 mpls 100 via 10.1.2.1 mpls 200;
* MPLS: Label range non-intersection checkOndrej Zajicek2023-10-042-2/+48
|
* MPLS: Improve label range reconfigurationOndrej Zajicek2023-10-041-4/+6
| | | | Allow to shorten label range over unused area.
* MPLS: Add command 'show mpls ranges'Ondrej Zajicek2023-10-045-1/+115
| | | | Add command to show MPLS label ranges and their stats.
* Nest: Fix missing RTS_* values in filtersOndrej Zajicek2023-10-041-1/+2
|
* Lib: Extend MPLS label allocator bitmapOndrej Zajicek2023-10-043-0/+88
| | | | | Add function lmap_last_one_in_range() for finding the last active label in a label range.
* L3VPN: BGP/MPLS VPNs using MPLS backboneOndrej Zajicek2023-10-0410-5/+636
| | | | | | | | | The L3VPN protocol implements RFC 4364 BGP/MPLS VPNs using MPLS backbone. It works similarly to pipe. It connects IP table (one per VRF) with (global) VPN table. Routes passed from VPN table to IP table are stripped of RD and filtered by import targets, routes passed in the other direction are extended with RD, MPLS labels and export targets in extended communities. A separate MPLS channel is used to announce MPLS routes for the labels.
* MPLS: Add support for per-VRF labeling policyOndrej Zajicek2023-10-044-6/+53
| | | | | | | The new labeling policy MPLS_POLICY_VRF assigns one label to all routes (from the same FEC map associated with one VRF), while replaces their next hops with a lookup to a VRF table. This is useful for L3VPN protocol.
* BGP: Add MPLS supportOndrej Zajicek2023-10-044-5/+27
| | | | | | | When MPLS is active, received routes on MPLS-aware SAFIs (ipvX-mpls, vpnX-mpls) are automatically labeled according to active label policy and corresponding MPLS routes are automatically generated. Also routes sent on MPLS-aware SAFIs announce local labels when it should be done.
* Static: Add MPLS supportOndrej Zajicek2023-10-042-1/+28
| | | | | | When MPLS is active, static IP/VPN routes are automatically labeled according to active label policy and corresponding MPLS routes are automatically generated.
* MPLS subsystemOndrej Zajicek2023-10-0421-18/+1487
| | | | | | | | | | | | | | | | | | | | | | | The MPLS subsystem manages MPLS labels and handles their allocation to MPLS-aware routing protocols. These labels are then attached to IP or VPN routes representing label switched paths -- LSPs. There was already a preliminary MPLS support consisting of MPLS label net_addr, MPLS routing tables with static MPLS routes, remote labels in next hops, and kernel protocol support. This patch adds the MPLS domain as a basic structure representing local label space with dynamic label allocator and configurable label ranges. To represent LSPs, allocated local labels can be attached as route attributes to IP or VPN routes with local labels as attributes. There are several steps for handling LSP routes in routing protocols -- deciding to which forwarding equivalence class (FEC) the LSP route belongs, allocating labels for new FECs, announcing MPLS routes for new FECs, attaching labels to LSP routes. The FEC map structure implements basic code for managing FECs in routing protocols, therefore existing protocols can be made MPLS-aware by adding FEC map and delegating most work related to local label management to it.
* Lib: Indirect bitmap for MPLS label allocatorOndrej Zajicek (work)2023-10-044-0/+301
|
* Nest: Expand rte_src.private_id to u64Ondrej Zajicek2023-10-025-5/+5
| | | | | | | | In general, private_id is sparse and protocols may want to map some internal values directly into it. For example, L3VPN needs to map VPN route discriminators to private_id. OTOH, u32 is enough for global_id, as these identifiers are dense.
* BGP config: Splitting Route Refresh and Enhanced Route RefreshMaria Matejka2023-09-274-8/+18
| | | | | Both toggles are on by default but if some implementation needs one or another to be switched off separately, then it's possible now.
* Aggregator: brief documentationMaria Matejka2023-09-261-0/+64
|
* Aggregator: Forbidden dangerous filter computationsMaria Matejka2023-09-261-4/+22
|
* Aggregator: Fixed hashing of adataMaria Matejka2023-09-262-9/+72
|
* Basic route aggregationIgor Putovny2023-09-2623-39/+1257
| | | | | | | | | | | | | | | | | | Add a new protocol offering route aggregation. User can specify list of route attributes in the configuration file and run route aggregation on the export side of the pipe protocol. Routes are sorted and for every group of equivalent routes new route is created and exported to the routing table. It is also possible to specify filter which will run for every route before aggregation. Furthermore, it will be possible to set attributes of new routes according to attributes of the aggregated routes. This is a work in progress. Original work by Igor Putovny, subsequent cleanups and finalization by Maria Matejka.
* Simple testing of reconfiguration to a slightly different oneMaria Matejka2023-09-242-3/+8
|
* BGP: Setting and unsetting unknown attributeskaterina.kubecova2023-09-205-2/+34
| | | | | | | All these must be declared as bytestring. Allows operators to delete unwanted attributes breaking the Internet: https://blog.benjojo.co.uk/post/bgp-path-attributes-grave-error-handling
* Attributes declared in config can be bytestringskaterina.kubecova2023-09-202-4/+4
|
* Filter: Function unset() accepts attributes declared in configkaterina.kubecova2023-09-201-0/+9
|
* Structures bytestring and adata merged into adata.katerina.kubecova2023-09-208-13/+9
|
* Conf: Move definition of struct keyword to conf.hOndrej Zajicek2023-09-142-5/+5
|
* Filter: Use common initializer for undefined variables and eattrs.Ondrej Zajicek2023-09-133-51/+28
| | | | | | Undefined paths and clists should use typed f_val with empty adata instead of just void f_val. Use common initializer to handle both variables and eattrs.
* Filter: Minor updates to methodsOndrej Zajicek2023-09-123-19/+11
| | | | | | | Remove warning when function-like syntax is used for calling add/remove/... methods. Fix argument offset in error messages for function-like syntax.