summaryrefslogtreecommitdiff
path: root/conf
AgeCommit message (Collapse)Author
2023-04-04Conf: 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-19Merge commit '140c534fb81d0e165b7d674e869c646455ed19d1' into thread-nextMaria Matejka
2023-01-19Decoupling loops from threads to allow fixed thread countMaria Matejka
On large configurations, too many threads would spawn with one thread per loop. Therefore, threads may now run multiple loops at once. The thread count is configurable and may be changed during run. All threads are spawned on startup. This change helps with memory bloating. BIRD filters need large temporary memory blocks to store their stack and also memory management keeps its hot page storage per-thread. Known bugs: * Thread autobalancing is not yet implemented. * Low latency loops are executed together with standard loops.
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-07Merge commit '37b64441' into thread-nextMaria Matejka
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-09-09Created a dedicated settle timer structureMaria Matejka
2022-09-01Default tables are not created unless actually used.Maria Matejka
This allows for setting default table values at the beginning of config file before "master4" and "master6" tables are initialized.
2022-07-15Merge commit 'c70b3198' into thread-next [lots of conflicts]Maria Matejka
There were more conflicts that I'd like to see, most notably in route export. If a bisect identifies this commit with something related, it may be simply true that this commit introduces that bug. Let's hope it doesn't happen.
2022-07-13Merge commit '2e5bfeb73ac25e236a24b6c1a88d0f2221ca303f' into thread-nextMaria Matejka
2022-07-13Merge commit '7e9cede1fd1878fb4c00e793bccd0ca6c18ad452' into thread-nextMaria Matejka
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-26Fixed forgotten preference handling in filtersMaria Matejka
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-05-30Merge commit 'f2e725a76882ba6b75c3ce4fb3c760bd83462410' into haugesundMaria Matejka
2022-05-30Merge commit '702c04fbef222e802ca4dfac645dc75ede522db6' into haugesundMaria Matejka
2022-05-30Merge commit '17f91f9e6e70f7e3f29502e854823c0d48571eaa' into haugesundMaria Matejka
2022-05-30Merge commit '165156beeb2926472bbceca3c103aacc3f81a8cc' into haugesundMaria Matejka
2022-05-30Merge commit 'f2f3163f6c3fba7f9ef03640d7b2f6323873d2cc' into haugesundMaria Matejka
2022-05-30Merge commit 'ef6a903e6f44b467f9606018446095521ad01ef1' into haugesundMaria Matejka
2022-05-30Merge commit '80272d4b64a38ee6f04a1c4e8566cac3a2293176' into haugesundMaria Matejka
2022-05-05All outstanding MPLS label stacks are stored as adataMaria Matejka
2022-05-04Conf: Allowing keyword redefinitionMaria Matejka
Some tokens are both keywords and symbols. For now, we allow only specific keywords to be redefined; in future, more of the keywords may be added to this category. The redefinable keywords must be specified in any .Y file as follows: toksym: THE_KEYWORD ; See proto/bgp/config.Y for an example. Also dropped a lot of unused terminals.
2022-05-04Explicit definition structures of route attributesMaria Matejka
Changes in internal API: * Every route attribute must be defined as struct ea_class somewhere. * Registration of route attributes known at startup must be done by ea_register_init() from protocol build functions. * Every attribute has now its symbol registered in a global symbol table defined as SYM_ATTRIBUTE * All attribute ID's are dynamically allocated. * Attribute value custom formatting hook is defined in the ea_class. * Attribute names are the same for display and filters, always prefixed by protocol name. Also added some unit testing code for filters with route attributes.
2022-05-04Conf: Symbols are properly scopedMaria Matejka
Now there is a persistent root symbol scope and all scopes have their symbol hashes to store local symbols and not leak any symbol out.
2022-05-04Filters always allocate from tmp_linpoolMaria Matejka
2022-05-04Splitting route data structures out to libMaria Matejka
2022-05-04Filter operations: bitwise AND and ORMaria Matejka
2022-03-09Merge commit '56c8f2f0' into haugesundMaria Matejka
Conflicts: nest/route.h nest/rt-table.c
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-11-22Route export is now asynchronous.Maria Matejka
To allow for multithreaded execution, we need to break the import-export chain and buffer the exports before actually processing them.
2021-11-09Nest: Route generations and explicit tracking route propagion through pipesMaria Matejka
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.