summaryrefslogtreecommitdiff
path: root/sysdep
AgeCommit message (Collapse)Author
2023-01-23Merge commit '7fb23041a52d01754c53ba963e2282e524813364' into thread-nextMaria Matejka
2023-01-22Merge commit '2b7643e1f8ecb0bd4cf9af4183b4fd53b655d19c' into thread-nextMaria Matejka
2023-01-21Merge commit '1e47b9f203aaaad0fb658d40a1670f1d0437f1f8' into thread-nextMaria Matejka
2023-01-21Merge commit 'a80cd4707464cedb526eb72e7704b097af20beb7' into thread-nextMaria Matejka
2023-01-21Adding forgotten pthread.h #include in io-loop.h (breaks at openbsd 7.1)Maria Matejka
2023-01-20Fixed various build problems on FreeBSD and/or CLangMaria Matejka
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.
2023-01-19CLI closing fix when its action is run asynchronously.Maria Matejka
Some CLI actions, notably "show route", are run by queuing an event somewhere else. If the user closes the socket, in case such an action is being executed, the CLI must free the socket immediately from the error hook but the pool must remain until the asynchronous event finishes and cleans everything up.
2023-01-13BSD: Add support for kernel route metricOndrej Zajicek
Add support for kernel route metric/priority, exported as krt_metric attribute, like in Linux. This should also fix issues with overwriting or removing system routes.
2023-01-12Log message before abortingMike Crute
Log message before aborting due to watchdog timeout. We have to use async-safe write to debug log, as it is done in signal handler. Minor changes from committer.
2022-12-18BSD: Use ip_mreqn on FreeBSD 12.1+ and OpenBSD 6.9+Ondrej Zajicek
2022-12-16FreeBSD: use interface index instead of IP address when specifying multicast ↵Alexander Chernikov
interface Minor changes from committer.
2022-12-16Netlink: move OS-specific headers and defines to sysdepAlexander Chernikov
Minor changes from committer.
2022-12-16BSD: Add missing makefile for bsd-netlink targetOndrej Zajicek
Use symlinks to linux/netlink* to avoid limitations of our buildsystem.
2022-12-11NEWS and version updatev2.0.11Ondrej Zajicek
2022-12-11BSD: Workaround for direct routes on FreeBSD 13.0Ondrej Zajicek
FreeBSD 13.0 added some safechecks for syscalls, rejecting sockaddrs that are too small, later versions loosen up the check.
2022-12-10CLI: Fix for long-lived sessions during high loadsOndrej Zajicek
When there is a continuos stream of CLI commands, cli_get_command() always returns 1 (there is a new command). Anyway, the socket receive buffer was reset only when there was no command at all, leading to a strange behavior: after a while, the CLI receive buffer came to its end, then read() was called with zero size buffer, it returned 0 which was interpreted as EOF. The patch fixes that by resetting the buffer position after each command and moving remaining data at the beginning of buffer. Thanks to Maria Matejka for examining the bug and for the original bugfix.
2022-12-09Netlink on FreeBSD supportAlexander V. Chernikov
Netlink support was added to FreeBSD recently. It is not as full-featured as its Linux counterpart yet, however the added subset is enough to make a routing daemon work. Specifically, it supports multiple tables, multipath, nexthops and nexthops groups. No MPLS support yet. The attached change adds 'bsd-netlink’ sysconf target, allowing to build both netlink & rtsock versions on FreeBSD.
2022-11-30BSD: Fix krt socket code w.r.t. rte/rta changesOndrej Zajicek
2022-11-09Conf: Make 'configure check' command restrictedOndrej Zajicek
While it does not directly change BIRD state, it can trigger reading arbitrary files and eating significant memory.
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 remote-tracking branch 'origin/master' into thread-nextMaria Matejka
2022-11-07Merge commit '32425297' into thread-nextMaria Matejka
2022-11-07Merge commit '0f2be469' into thread-nextMaria Matejka
2022-11-03Page allocator: Fixed minor bugs and added commentaryMaria Matejka
2022-11-02Memory pages are not munmapped, instead we just madvise()Maria Matejka
Memory unmapping causes slow address space fragmentation, leading in extreme cases to failing to allocate pages at all. Removing this problem by keeping all the pages allocated to us, yet calling madvise() to let kernel dispose of them. This adds a little complexity and overhead as we have to keep the pointers to the free pages, therefore to hold e.g. 1 GB of 4K pages with 8B pointers, we have to store 2 MB of data.
2022-10-12Netlink: Parse onlink flag even on direct routesOndrej Zajicek
While onlink flag is meaningful only with explicit next hops, it can be defined also on direct routes. Parse it also in this case to avoid periodic updates of the same route. Thanks to Marcin Saklak for the bugreport.
2022-10-12Fixed SSH known hosts checking with older versions of libsshMaria Matejka
2022-10-05Poll errors must also drop a corefile. And we shouldn't run sockets when ↵Maria Matejka
sockets have changed
2022-10-05Fixed previously untested paths in RPKIMaria Matejka
2022-10-04Merge commit '67256d50' into HEADMaria Matejka
2022-10-04Merge commit 'fb7fb674' into HEADMaria Matejka
2022-10-04Merge commit 'e9e6baae' into HEADMaria Matejka
2022-10-04Merge commit 'a32cee78' into HEADMaria Matejka
2022-10-04Merge commit '71b434a9' into HEADMaria Matejka
2022-10-04Merge commit '0072d11f' into tmp-learnMaria Matejka
2022-09-29Merge branch 'tmp-bad-learn' into thread-nextMaria Matejka
2022-09-29Merge commit '9efaf6ba' into tmp-bad-learnMaria Matejka
Also fixed forgotten best route selection among alien routes.
2022-09-27Merge commit '4364ee' into tmp-bad-learnMaria Matejka
2022-09-27Merge commit 'cae5979871ee7aa341334f8b1af6bafc60ee9692' into tmp-bad-learnMaria Matejka
2022-09-27KRT: Fix route learningMaria Matejka
This is a reimplementation of commit 0f2be469f897b6d9f925563bbf522438c83522ea by Alexander Zubkov. In the master branch, changes in commit eb937358 broke setting of channel preference for alien routes learned during scan. The preference was set only for async routes. The original solution is extended here to accomodate for v3 specifics.
2022-09-27KRT: Fix setting default preferenceAlexander Zubkov
Changes in commit eb937358 broke setting of channel preference for alien routes learned during scan. The preference was set only for async routes. Move common attribute processing part of functions krt_learn_async() and krt_learn_async() to a separate function to have only one place for such changes.
2022-09-21Local page allocationMaria Matejka
2022-09-20Pipe kick-and-drain packed into a neat structure and functions.Maria Matejka
2022-09-20Fixed display of standby memoryMaria Matejka
2022-09-18Loop flags: a simple idempotent event announcement mechanismMaria Matejka
2022-09-18Cancelling all timers when loop stopsMaria Matejka
2022-09-18Memory pages allocator is now a global simple lockless structureMaria Matejka
2022-09-09Merge commit 'd2c1036a42881d413ec97203ede92a69f8cd218f' into thread-nextMaria Matejka