summaryrefslogtreecommitdiff
path: root/conf
AgeCommit message (Collapse)Author
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
2022-07-10Merge version 2.0.10 into backportMaria Matejka
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 soft scopesOndrej Zajicek (work)
Soft scopes are anonymous scopes that most likely do not contain any symbol, so allocating regular scope is postponed when it is really needed.
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.
2022-06-04Nest: Improve GC strategy for rtablesOndrej Zajicek
Use timer (configurable as 'gc period') to schedule routing table GC/pruning to ensure that prune is done on time but not too often. Randomize GC timers to avoid concentration of GC events from different tables in one loop cycle. Fix a bug that caused minimum inter-GC interval be 5 us instead of 5 s. Make default 'gc period' adaptive based on number of routing tables, from 10 s for small setups to 600 s for large ones. In marge multi-table RS setup, the patch improved time of flushing a downed peer from 20-30 min to <2 min and removed 40s latencies.
2022-03-02Merge commit '2c13759136951ef0e70a3e3c2b2d3c9a387f7ed9' into haugesundMaria Matejka
2022-01-05Conf: Fix parsing full-length IPv6 addressesOndrej Zajicek (work)
Lexer expression for bytestring was too loose, accepting also full-length IPv6 addresses. It should be restricted such that colon is used between every byte or never. Fix the regex and also add some test cases for it. Thanks to Alexander Zubkov for the bugreport
2021-10-20Conf: Fix crash during shutdownOndrej Zajicek (work)
BIRD implements shutdown by reconfiguring to fake empty configuration. Such fake config structure is created from the last running config and shares some data, including symbol table. This allows access to (removed) routing tables and causes crash when 'show route' command is used during shutdown. Clean up symbol table, table list and links to default tables, so removed routing tables cannot be accessed during shutdown.
2021-09-10Reducing filter stack size to allow for lesser thread stack sizeMaria Matejka
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.
2021-06-06sysdep: Add wrapper to get random bytes - updateOndrej Zajicek (work)
Simplify the code and fix an issue with getentropy() return value.
2021-06-06sysdep: Add wrapper to get random bytesToke Høiland-Jørgensen
Add a wrapper function in sysdep to get random bytes, and required checks in configure.ac to select how to do it. The configure script tries, in order, getrandom(), getentropy() and reading from /dev/urandom.
2021-05-18Flowspec: Label field should use numeric operator and not bitmask operatorOndrej Zajicek (work)
2021-02-10BGP: Add support for BGP hostname capabilityVincent Bernat
This is an implementation of draft-walton-bgp-hostname-capability-02. It is implemented since quite some time for FRR and in datacenter, this gives a nice output to avoid using IP addresses. It is disabled by default. The hostname is retrieved from uname(2) and can be overriden with "hostname" option. The domain name is never set nor displayed. Minor changes by committer.
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-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-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-05-01Lexer: strtoul shall never set endptr to NULL; it should be an errorMaria Matejka
2020-04-09Configuration strings are constant.Maria Matejka
This is merely a const propagation. There was no problem in there.
2020-02-04Conf: Better error message when reading iproute2 configMaria Matejka
Reported by: Martin Weinelt <martin@darmstadt.freifunk.net>
2019-11-03Support for address family constantsOndrej Zajicek (work)
We already had them defined on BGP level, but they are more general.
2019-07-30Conf: Fixed symbol redefinitionMaria Matejka
2019-07-03Merge branch 'master' into mq-filter-stackMaria Matejka
2019-07-03Filter: Split printing and dyingMaria Matejka
2019-07-02Filter: Pre-evaluation of constant expressionsMaria 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-06-25Conf/Filters: Moved argument count to conf scopeMaria Matejka
2019-06-13String: bstrtoul macro expanded to bstrtoul10 and 16Maria Matejka
2019-06-12Add CLI command to test reconfiguration statusOndrej Zajicek (work)
Based on patch from Kenth Eriksson <kenth.eriksson@infinera.com>.
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-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-03-18Merge branch 'master' into HEADMaria Matejka
2019-03-18Build: Automatic dependency tracking for generated filesMaria Matejka
2019-02-26Filters: comparison of functions and filters cachingMaria Matejka
2019-02-25Custom number parser to speed up config parsingMaria Matejka
The glibc's generic parser is slow due to its versatility. Specialized parsers for base-10 and base-16 are much faster and we don't use other bases.
2019-02-25Conf: Lexer parses quoted strings in a more descriptive wayMaria Matejka
2019-02-22Conf: Switch for faster (and slightly bigger) lexerMaria Matejka
2019-02-22Conf: Switch for faster (and slightly bigger) lexerMaria Matejka