summaryrefslogtreecommitdiff
path: root/conf
AgeCommit message (Collapse)Author
2023-11-25Merge commit 'abae806e' into wireguard-next-tmp7-1Mikael Magnusson
2023-11-25Merge commit '8e9e013b' into wireguard-next-tmp7-1Mikael Magnusson
2023-11-25Merge commit '333ddd4f' into wireguard-next-tmp7-1Mikael Magnusson
2023-11-25Merge commit '977b82fb' into wireguard-next-tmp7-1Mikael Magnusson
2023-11-25Merge commit 'bb8e2824' into wireguard-next-tmp7-1Mikael Magnusson
2023-11-25Merge commit '9ffea830' into wireguard-next-tmp7-1Mikael Magnusson
2023-11-25Merge commit 'fc4398b4' into wireguard-next-tmp7-1Mikael Magnusson
2023-11-25Merge commit 'cc1099a0' into wireguard-next-tmp7-1Mikael Magnusson
2023-11-25Merge commit 'c0231b09' into wireguard-next-tmp7-1Mikael Magnusson
2023-11-25Merge commit 'fc9d471b' into wireguard-next-tmp7-1Mikael Magnusson
2023-11-25Merge commit '6f798683a34aa87f5e4f590be4c90253a1135e08' into ↵Mikael Magnusson
wireguard-next-tmp7-1
2023-11-25Merge commit 'f86c86b7913f55c1221d8c5e1ff27700aa663a6e' into ↵Mikael Magnusson
wireguard-next-tmp7-1
2023-11-25Merge commit '6b95353ebdaa724252492f941ebe75f80e9e545a' into ↵Mikael Magnusson
wireguard-next-tmp7-1
2023-11-25Merge commit '51f2e7afaf069508685281e8c1b8bb1ceda79d8f' into ↵Mikael Magnusson
wireguard-next-tmp7-1
2023-11-25Merge commit '58efa94460381309c754a3162df257ae043c2cbd' into ↵Mikael Magnusson
wireguard-next-tmp7-1
2023-11-25Merge commit '8e177cf35b582ec973c1abce4709c80847adb711' into ↵Mikael Magnusson
wireguard-next-tmp7-1
2023-10-04Conf: Fix 'show symbols'Ondrej Zajicek
Seems like the root scope was not marked as active.
2023-10-04MPLS: Add command 'show mpls ranges'Ondrej Zajicek
Add command to show MPLS label ranges and their stats.
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-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-20Structures bytestring and adata merged into adata.katerina.kubecova
2023-09-14Conf: Move definition of struct keyword to conf.hOndrej Zajicek
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-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: 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-12Conf: config warnings show the file positionMaria Matejka
2023-09-12Filter/Conf: Method names have their own keyword hashMaria Matejka
To allow for future dynamic method definition, parsing method names is done via a dedicated keyword hash/scope.
2023-09-12Conf: Allowing conf scope to be explicitly read onlyMaria Matejka
2023-09-12Conf: Symbol manipulation gets its context explicitlyMaria Matejka
2023-09-12Conf: Keywords have their default symbolsMaria Matejka
This avoids unnecessary collapsed soft scopes caused by keyword symbol multiallocation.
2023-09-12Conf: Symbol hashes for all scopesMaria Matejka
This is a backport cherry-pick of commits 165156beeb2926472bbceca3c103aacc3f81a8cc cce974e8ea992d0e6d2f649eca7880b436d91d71 from the v3.0 branch as we need symbol hashes directly inside their scopes for more general usage than before.
2023-08-28Bytestring: implement bytestring literals and constantsMikael Magnusson
Implement byte string literals on the format b"xxx" and b64"xxx" which can be used as literals and in constants. The format b"xxx" supports character data and octal and hexadecimal data using C escapes (\n, \nn, \nnn, \xn and \xnn). The format b64"xxx" supports base64 encoded strings (RFC1341).
2023-08-25Conf: Allow keywords to be redefined by user symbolsOndrej Zajicek
Most syntactic constructs in BIRD configuration (e.g. protocol options) are defined as keywords, which are distinct from symbols (user-defined names for protocols, variables, ...). That may cause backwards compatibility issue when a new feature is added, as it may collide with existing user names. We can allow keywords to be shadowed by symbols in almost all cases to avoid this issue. This replaces the previous mechanism, where shadowable symbols have to be explictly added to kw_syms.
2023-08-25RPKI: Fix conflict in config grammarOndrej Zajicek
2023-08-24Conf: Use nonterminal bytestring instead of BYTETEXTOndrej Zajicek
Nonterminal bytestring allows to provide expressions to be evaluated in places where BYTETEXT is used now: passwords, radv custom option. Based on the patch from Alexander Zubkov <green@qrator.net>, thanks!
2023-08-24Filter: Use more generic approach for intra-config expressionsAlexander Zubkov
Replace f_eval_int() function with a type-generic variant: cf_eval(). Implement similar fuction: cf_eval_int() via inline call to cf_eval().
2023-08-24Filter: Add bytestring typeAlexander Zubkov
- Rename BYTESTRING lexem to BYTETEXT, not to collide with 'bytestring' type name - Add bytestring type with id T_BYTESTRING (0x2c) - Add from_hex() filter function to create bytestring from hex string - Add filter test cases for bytestring type Minor changes by committer.
2023-08-24Lib: Add functions for reading and writing of bytestringsOndrej Zajicek
Based on patch from Alexander Zubkov, thanks!
2023-08-22Use more proper pointers to constant bytestringsAlexander Zubkov
2023-06-23Add hex:XYZ syntax for short hex stringsAlexander Zubkov
Hexadecimal bytestring literals have minimal length to not collide with IP addresses or regular (hexadecimal) number literals. Allow to use shorter literals with explicit hex: prefix.
2023-04-27Conf: Improve handling of keywordsOndrej Zajicek
For whatever reason, parser allocated a symbol for every parsed keyword in each scope. That wasted time and memory. The effect is worsened with recent changes allowing local scopes, so keywords often promote soft scopes (with no symbols) to real scopes. Do not allocate a symbol for a keyword. Take care of keywords that could be promoted to symbols (kw_sym) and do it explicitly.
2023-04-27Conf: Fix symbol lookupOndrej Zajicek
The symbol table used just symbol name as a key, and used a trick with active flag to find symbols in active scopes with one hash table lookup. The disadvantage is that it can degenerate to O(n) for negative queries in situations where are many symbols with the same name in different scopes. Thanks to Yanko Kaneti for the bugreport.
2023-02-19Conf: Fix too early free of old configurationOndrej Zajicek
The change 371eb49043d225d2bab8149187b813a14b4b86d2 introduced early free of old_config. Unfortunately, it did not properly check whether it is not still in use (blocked by obstacle during reconfiguration). Fix that. It also means that we still could have a short peak when three configs are in use (when a new reconfig is requeste while the previous one is still active).
2023-01-03BGP: Allow role specific keywords to be used as symbolsOndrej Zajicek
Some of these new BGP role keywords use generic names that collides with user-defined symbols. Allow them to be redefined. Also remove duplicit keyword definition for 'prefer'.
2022-11-09Conf: Free stored old config before parsing new oneOndrej Zajicek
BIRD keeps a previous (old) configuration for the purpose of undo. The existing code frees it after a new configuration is successfully parsed during reconfiguration. That causes memory usage spikes as there are temporarily three configurations (old, current, and new). The patch changes it to free the old one before parsing the new one (as user already requested a new config). The disadvantage is that undo is not available after failed reconfiguration.
2022-11-01Moved config-related allocations to config_pool and showing its size in ↵Maria Matejka
memory usage
2022-10-18Filter: Fix handling of variables in anonymous filtersOndrej Zajicek
Define scope for anonymous filters, and also explicitly distinguish block scopes and function/filter scopes instead of using anonymous / named distinction. Anonymous filters forgot to push scope, so variables for them were in fact defined in the top scope and therefore they shared a frame. This got broken after rework of variables, which assumed that there is a named scope for every function/filter.
2022-09-16Revert "Reducing filter stack size to allow for lesser thread stack size"Maria Matejka
This reverts commit 2c13759136951ef0e70a3e3c2b2d3c9a387f7ed9.
2022-07-11Merge remote-tracking branch 'origin/master' into backportMaria Matejka