summaryrefslogtreecommitdiff
path: root/conf/confbase.Y
AgeCommit message (Collapse)Author
2023-10-25Nest: Minor fixes in MPLSOndrej Zajicek
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-12Filter: Better syntax for function return typesOndrej Zajicek
The C-style syntax does not really fit into rest of our syntax.
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-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: Symbol manipulation gets its context explicitlyMaria Matejka
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-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-22Use more proper pointers to constant bytestringsAlexander Zubkov
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.
2022-06-27Filter: Improve handling of stack frames in filter bytecodeOndrej Zajicek (work)
When f_line is done, we have to pop the stack frame. The old code just removed nominal number of args/vars. Change it to use stored ventry value modified by number of returned values. This allows to allocate variables on a stack frame during execution of f_lines instead of just at start. But we need to know the number of returned values for a f_line. It is 1 for term, 0 for cmd. Store that to f_line during linearization.
2022-06-27Filter: Implement type checks for function callsOndrej Zajicek (work)
Keep list of function parameters in f_line and use it to verify types of arguments for function calls. Only static type checks are implemented.
2022-06-07IPv4 flowspec literals should reject IPv6 prefices in a well-behaved wayMaria Matejka
When writing flow4 { dst 2001:db8::dead:beef/128; }, BIRD crashed on an not-well-debuggable segfault as it tried to copy the whole 128-bit prefix into an IPv4-sized memory.
2021-06-06Nest: Allow specifying security keys as hex bytes as well as stringsToke Høiland-Jørgensen
Add support for specifying a password in hexadecimal format, The result is the same whether a password is specified as a quoted string or a hex-encoded byte string, this just makes it more convenient to input high-entropy byte strings as MAC keys.
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-24Minor cleanups with cfg_allocz()Ondrej Zajicek (work)
Also fixes some more failed asserts due to add_tail().
2020-11-12BFD: Better handling of BFD options in BGP configsOndrej Zajicek (work)
Merge multiple BFD option blocks in BGP configs instead of using the last one. That is necessary for proper handling of templates when BFD options are used both in a BGP template and in a BGP protocol derived from that template.
2020-11-08BFD: Allow per-request session optionsOndrej Zajicek (work)
BFD session options are configured per interface in BFD protocol. This patch allows to specify them also per-request in protocols requesting sessions (currently limited to BGP).
2020-04-09Configuration strings are constant.Maria Matejka
This is merely a const propagation. There was no problem in there.
2019-07-30Conf: Fixed symbol redefinitionMaria Matejka
2019-07-03Filter: Split printing and dyingMaria Matejka
2019-05-22Filter: Some people can't pronounce "postfixify" correctly. Let's try ↵Jan Maria Matejka
"linearize" instead. This is just a naming change.
2019-05-21Filter: Store variables and function arguments on stackJan Maria Matejka
2019-05-17Lexer now returns known sym / unknown sym / keywordMaria Matejka
2019-02-20Filter: Fixed bugs in FI_CALL and FI_SWITCHMaria Matejka
2019-02-20Conf: Symbol implementation converted from void pointers to unionMaria Matejka
... and consted some declarations.
2019-02-20Filter + Config: Fix bugs, tests and split symbols by typeMaria Matejka
2019-02-20Filter: refactoring of instruction constructorsMaria Matejka
2019-02-20Filter refactoring: dropped the recursion from the interpreterMaria Matejka
This is a major change of how the filters are interpreted. If everything works how it should, it should not affect you unless you are hacking the filters themselves. Anyway, this change should make a huge improvement in the filter performance as previous benchmarks showed that our major problem lies in the recursion itself. There are also some changes in nest and protocols, related mostly to spreading const declarations throughout the whole BIRD and also to refactored dynamic attribute definitions. The need of these came up during the whole work and it is too difficult to split out these not-so-related changes.
2019-02-20Filter refactoring: Passing the resulting struct f_val as a pointer.Jan Maria Matejka
This also drops the multiplexing of errors with the f_val itself together with the T_RETURN f_val type flag.
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-06-26Config: Dropping CF_ADDTO.Jan Maria Matejka
2018-03-13Merge branch 'master' into int-newJan Maria Matejka
2018-03-13Filter: Instruction codes named as enumMaria Jan Matejka
The two-letter instructions were quite messy but they could be easily read from memory dumps. Now GDB (since 2012) supports pretty printing enum values and GCC checks the switch construction for missing enum values so we are converting the nice two-byte values to enums. Anyway, the enum still keeps the old two-byte values to be able to read the instruction codes even without GDB from plain memory dump.
2018-03-08Config: Dropped the ipv4:netmask4 syntax for IPv4 prefixes.Jan Maria Matejka
2018-03-07Babel: Fix build with restricted protocol setOndrej Zajicek (work)
All keywords used in Babel config have to be declared locally. Thanks to Leo Vandewoestijne for the bugreport.
2018-02-13Add support for source-specific IPv6 routes to BIRD coreOndrej Zajicek (work)
This patch adds support for source-specific IPv6 routes to BIRD core. This is based on Dean Luga's original patch, with the review comments addressed. SADR support is added to network address parsing in confbase.Y and to the kernel protocol on Linux. Currently there is no way to mix source-specific and non-source-specific routes (i.e., SADR tables cannot be connected to non-SADR tables). Thanks to Toke Hoiland-Jorgensen for the original patch. Minor changes by Ondrej Santiago Zajicek.
2017-12-12Revive FIB and kernel MPLS codeOndrej Zajicek (work)
2017-12-07Timers: Add typecast to unit-converting macrosOndrej 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-05-23Change parser to handle numbers as unsignedOndrej Zajicek (work)
Lexer always parsed numbers as unsigned, but parser handled them as signed and grammar contained many unnecessary checks for negativity.
2017-05-23Add a hint for an invalid IP prefixPavel Tvrdik
bird> eval 200.210.220.0/16 Invalid IPv4 prefix 200.210.220.0/16, maybe you wanted 200.210.0.0/16 bird> eval 1000:2000::/8 Invalid IPv6 prefix 1000:2000::/8, maybe you wanted 1000::/8