summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-10-04BGP, L3VPN: Fix MPLS channel reloadOndrej Zajicek
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.
2023-10-04Doc: MPLS documentationOndrej Zajicek
2023-10-04MPLS: Implement FEC map reconfigurationOndrej Zajicek
This allows changing label policy or label range without restart.
2023-10-04MPLS: Handle label allocation failuresOndrej Zajicek
2023-10-04L3VPN: Fix bug in reconfigurationOndrej Zajicek
Fields import_target / export_target link to config structures, must be updated during reconfiguration.
2023-10-04MPLS: Improve handling of static label allocationsOndrej Zajicek
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.
2023-10-04Static: Add syntax for static MPLS labelsOndrej Zajicek
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;
2023-10-04MPLS: Label range non-intersection checkOndrej Zajicek
2023-10-04MPLS: Improve label range reconfigurationOndrej Zajicek
Allow to shorten label range over unused area.
2023-10-04MPLS: Add command 'show mpls ranges'Ondrej Zajicek
Add command to show MPLS label ranges and their stats.
2023-10-04Nest: Fix missing RTS_* values in filtersOndrej Zajicek
2023-10-04Lib: Extend MPLS label allocator bitmapOndrej Zajicek
Add function lmap_last_one_in_range() for finding the last active label in a label range.
2023-10-04L3VPN: BGP/MPLS VPNs using MPLS backboneOndrej Zajicek
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.
2023-10-04MPLS: Add support for per-VRF labeling policyOndrej Zajicek
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.
2023-10-04BGP: Add MPLS supportOndrej Zajicek
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.
2023-10-04Static: Add MPLS supportOndrej Zajicek
When MPLS is active, static IP/VPN routes are automatically labeled according to active label policy and corresponding MPLS routes are automatically generated.
2023-10-04MPLS subsystemOndrej Zajicek
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.
2023-10-04Lib: Indirect bitmap for MPLS label allocatorOndrej Zajicek (work)
2023-10-02Nest: Expand rte_src.private_id to u64Ondrej Zajicek
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.
2023-09-27BGP config: Splitting Route Refresh and Enhanced Route RefreshMaria Matejka
Both toggles are on by default but if some implementation needs one or another to be switched off separately, then it's possible now.
2023-09-26Aggregator: brief documentationMaria Matejka
2023-09-26Aggregator: Forbidden dangerous filter computationsMaria Matejka
2023-09-26Aggregator: Fixed hashing of adataMaria Matejka
2023-09-26Basic route aggregationIgor Putovny
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.
2023-09-24Simple testing of reconfiguration to a slightly different oneMaria Matejka
2023-09-20BGP: Setting and unsetting unknown attributeskaterina.kubecova
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
2023-09-20Attributes declared in config can be bytestringskaterina.kubecova
2023-09-20Filter: Function unset() accepts attributes declared in configkaterina.kubecova
2023-09-20Structures bytestring and adata merged into adata.katerina.kubecova
2023-09-14Conf: Move definition of struct keyword to conf.hOndrej Zajicek
2023-09-13Filter: Use common initializer for undefined variables and eattrs.Ondrej Zajicek
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.
2023-09-12Filter: Minor updates to methodsOndrej Zajicek
Remove warning when function-like syntax is used for calling add/remove/... methods. Fix argument offset in error messages for function-like syntax.
2023-09-12Filter: Split clist add/delete operations to multiple methodsOndrej Zajicek
2023-09-12Filter: Implement constant promotion for multiple dispatch methodsOndrej Zajicek
2023-09-12Filter: Print proper error response in multiple method dispatchOndrej Zajicek
When no matching method is found, print an error response containing position and type of infringing argument and a set of expected types.
2023-09-12Filter: Move argument list reversal from function_call to var_listOndrej Zajicek
List of arguments for function calls is constructed in reverse and then reverted. This was done in function_call grammar rule. Do the reverse directly in var_list grammar rule. This fixes reverse order of arguments in method calls.
2023-09-12Filter: Better syntax for function return typesOndrej Zajicek
The C-style syntax does not really fit into rest of our syntax.
2023-09-12Filter: Implement multiple dispatch for methodsOndrej Zajicek
- Extend method descriptors with type signature - Daisy chain method descriptors for the same symbol - Dispatch methods for same symbol based on type signature - Split add/delete/filter operations to multiple methods - Replace ad-hoc dispatch of old-style syntax with scope-based dispatch - Also change method->arg_num to count initial arg It still needs some improvements, like better handling of untyped expressions and better error reporting when no dispatch can be done. The multiple dispatch could also be extended to dispatch regular function-like expressions in a uniform way.
2023-09-12Filter: Make f_method_call_*() usage symmetricOndrej Zajicek
2023-09-12Filter: Convert more methods to use METHOD_R()Ondrej Zajicek
2023-09-12Filter: Remove number of args from METHOD_R()Ondrej Zajicek
Macro METHOD_R() is used for simplest methods, there is no place to define argument types, so let's force it to be 0.
2023-09-12Conf: Remove toksym from symbol_knownOndrej Zajicek
No need to have toksym in symbol_known, as defined symbols are preferred (by scope) to keywords anyway. Adding it just creates grammar conflicts.
2023-09-12Filter: Print instructions take only one value (simplification)Maria Matejka
2023-09-12Filter: Shortened method declarationsMaria Matejka
2023-09-12Filter: The for loop uses the method system for type dispatchMaria Matejka
2023-09-12Removing unused terminals from filter configMaria Matejka
2023-09-12Filter: Methods reworkMaria Matejka
Methods can now be called as x.m(y), as long as x can have its type inferred in config time. If used as a command, it modifies the object, if used as a value, it keeps the original object intact. Also functions add(x,y), delete(x,y), filter(x,y) and prepend(x,y) now spit a warning and are considered deprecated. It's also possible to call a method on a constant, see filter/test.conf for examples like bgp_path = +empty+.prepend(1). Inside instruction definitions (filter/f-inst.c), a METHOD_CONSTRUCTOR() call is added, which registers the instruction as a method for the type of its first argument. Each type has its own method symbol table and filter parser switches between them based on the inferred type of the object calling the method. Also FI_CLIST_(ADD|DELETE|FILTER) instructions have been split to allow for this method dispatch. With type inference, it's now possible.
2023-09-12Uninitialized filter variables of path/[el]?clist types are now explicitly emptyMaria Matejka
2023-09-12Conf: config warnings show the file positionMaria Matejka
2023-09-12Filter: functions can and should have typed return valuesMaria Matejka