summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-01-24Merge v2.0.12 into thread-nextMaria Matejka
2023-01-24Merge commit '3186ffe79714a48542d5ad61a94c81216b522fd0' into thread-nextMaria Matejka
2023-01-24Merge commit '6bb992cb04926895be57dc97e7d569ea15a07db1' into thread-nextMaria Matejka
2023-01-24Merge commit '9dc9124c' into thread-nextMaria Matejka
2023-01-24Revert "Filter: Allow setting the 'onlink' route attribute in filters"Maria Matejka
This reverts commit 7144c9ca46f092da33a4e051bbce8f973a3bd8c4. The onlink attribute implementation collides with the nexthop attribute behavior in v3; keeping it aside until finding out how to reimplement it correctly.
2023-01-23Merge commit '928a1cb034e6f9e8edcdd1dc07264cd703e00827' into thread-nextMaria Matejka
2023-01-23Merge commit '7fb23041a52d01754c53ba963e2282e524813364' into thread-nextMaria Matejka
2023-01-23Merge commit 'd1cd5e5a63b2256eb71661f7438537e4ded7b01a' into thread-nextMaria Matejka
2023-01-23Merge commit 'b28431e557c4f63923476094a919a0630001275e' into thread-nextMaria Matejka
2023-01-23Merge commit 'd3f50ede127df338f575e188566035b2a46cf6c6' into thread-nextMaria Matejka
2023-01-23Merge commit '6d1ae197d189d50e60279796441c6e74272ddc54' into thread-nextMaria Matejka
2023-01-23Merge commit '8b06a4d8af46511f0f8dbb8905afa88590a831b6' into thread-nextMaria Matejka
2023-01-23NEWS and version updatev2.0.12Ondrej Zajicek
2023-01-22BFD: Improve incoming packet matchingOndrej Zajicek
For active sessions, ignore received packets with zero local id and mismatched remote id. That forces a session timeout instead of an immediate session restart. It makes BFD sessions more resilient to packet spoofing. Thanks to André Grüneberg for the suggestion.
2023-01-22VRF: Fix issues with reconfigurationOndrej Zajicek
Protocols receive if_notify() announcements that are filtered according to their VRF setting, but during reconfiguration, they access iface_list directly and forgot to check VRF setting here, which leads to all interfaces be addedd. Fix this issue for Babel, OSPF, RAdv and RIP protocols. Thanks to Marcel Menzel for the bugreport.
2023-01-22Merge commit '2b7643e1f8ecb0bd4cf9af4183b4fd53b655d19c' into thread-nextMaria Matejka
2023-01-22Added test case for switch bug fixed in e20bef69ccc4a85ef62359ee539c9db2dbe09127Maria Matejka
2023-01-21Merge commit '1e47b9f203aaaad0fb658d40a1670f1d0437f1f8' into thread-nextMaria Matejka
2023-01-21Merge commit 'e48f898fdaf06b61754ae520410729a9984ab65b' into thread-nextMaria Matejka
2023-01-21Merge commit 'a80cd4707464cedb526eb72e7704b097af20beb7' into thread-nextMaria Matejka
2023-01-21Merge commit '3859e4efc1597368df647323c5a3cc1771cb64ca' into thread-nextMaria Matejka
2023-01-21Merge commit 'e80156d9363a594ff23524f56d59f0eee160859d' into thread-nextMaria Matejka
2023-01-21Adding forgotten pthread.h #include in io-loop.h (breaks at openbsd 7.1)Maria Matejka
2023-01-21Merge commit 'a50d2fa65f3350ee55f5106b87a884d1b98e7761' into thread-nextMaria Matejka
2023-01-21Merge commit '543c8ba0971e91da3fe507dbfc1e1f9b556642b1' into thread-nextMaria Matejka
2023-01-20Fixed various build problems on FreeBSD and/or CLangMaria Matejka
2023-01-20BGP: Add received role value to role mismatch log messageOndrej Zajicek
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-19Table prune routine doesn't walk over lists unless needed.Maria Matejka
If no channel is flushing, table prune doesn't walk over routes in nets and also doesn't walk over importing channel lists. This helps to alleviate the memory caching burdens a lot.
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-19Removed config reparsing from unrelated testsMaria Matejka
2023-01-18Alloc: Minor cleanupsOndrej Zajicek
- Fix THP disable on old systems - Failed syscalls should use die() instead of bug() - Our printf uses %ld for s64 instead of long
2023-01-18Merge branch 'master' of https://gitlab.nic.cz/labs/birdMaria Matejka
2023-01-18Fix memory pre-allocationMaria Matejka
When BIRD has no free memory mapped, it allocates several pages in advance just to be sure that there is some memory available if needed. This hysteresis tactics works quite well to reduce memory ping-ping with kernel. Yet it had a subtle bug: this pre-allocation didn't take a memory coldlist into account, therefore requesting new pages from kernel even in cases when there were other pages available. This led to slow memory bloating. To demonstrate this behavior fast enough to be seen well, you may: * temporarily set the values in sysdep/unix/alloc.c as follows to exacerbate the issue: #define KEEP_PAGES_MAIN_MAX 4096 #define KEEP_PAGES_MAIN_MIN 1000 #define CLEANUP_PAGES_BULK 4096 * create a config file with several millions of static routes * periodically disable all static protocols and then reload config * log memory consumption This should give you a steady growth rate of about 16kB per cycle. If you don't set the values this high, the issue happens much more slowly, yet after 14 days of running, you are going to see an OOM kill. After this fix, pre-allocation uses the memory coldlist to get some hot pages and the same test as described here gets you a perfectly stable constant memory consumption (after some initial wobbling). Thanks to NIX-CZ for reporting and helping to investigate this issue. Thanks to Santiago for finding the cause in the code.
2023-01-17Filter: Allow setting the 'onlink' route attribute in filtersRadu Carpa
Add static route attribute to set onlink flag for route next hop. Can be used to build a dynamically routed IP-in-IP overlay network. Usage: ifname = "tunl0"; onlink = true; gw = bgp_next_hop;
2023-01-17Alloc: Disable transparent huge pagesOndrej Zajicek
The usage pattern implemented in allocator seems to be incompatible with transparent huge pages, as memory released using madvise(MADV_DONTNEED) with regular page size and alignment does not seem to trigger demotion of huge pages back to regular pages, even when significant number of pages is released. Even if demotion is triggered when system memory is low, it still breaks memory accounting.
2023-01-13Build: Fix cleanup of nest/proto-build.cOndrej Zajicek
2023-01-13Minor cleanupsOndrej Zajicek
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.
2023-01-07Filter: Change linearization of branches in switch instructionOndrej Zajicek
Most branching instructions (FI_CONDITION, FI_AND, FI_OR) linearize its branches in a recursive way, while FI_SWITCH branches are linearized from parser even before the switch instruction is allocated. Change linearization of FI_SWITCH branches to make it similar to other branching instructions. This also fixes an issue with constant switch evaluation, where linearized branch is mistaken for non-linearized during switch construction. Thanks to Jiten Kumar Pathy for the bugreport.
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'.
2023-01-03Configure: Expensive check option was broken, never workedOndrej Zajicek
2023-01-03Nest: Fix leaking internal attributes in RIP and BabelOndrej Zajicek
During backporting attribute changes from 3.0-branch, some internal attributes (RIP iface and Babel seqno) leaked to 'show route all' output. Allow protocols to hide specific attributes with GA_HIDDEN value. Thanks to Nigel Kukard for the bugreport.
2023-01-02Add compile-time option to enable 4-way tries instead of 16-way onesOndrej Zajicek
In some cases 16-way tries are too memory-heavy, while 4-way are almost as efficient as the original 2-way ones.
2023-01-01Nest: Fix several issues with pflagsOndrej Zajicek
There were some confusion about validity and usage of pflags, which caused incorrect usage after some flags from (now removed) protocol- specific area were moved to pflags. We state that pflags: - Are secondary data used by protocol-specific hooks - Can be changed on an existing route (in contrast to copy-on-write for primary data) - Are irrelevant for propagation (not propagated when changed) - Are specific to a routing table (not propagated by pipe) The patch did these fixes: - Do not compare pflags in rte_same(), as they may keep cached values like BGP_REF_STALE, causing spurious propagation. - Initialize pflags to zero in rte_get_temp(), avoid initialization in protocol code, fixing at least two forgotten initializations (krt and one case in babel). - Improve documentation about pflags
2022-12-24Babel: Rework seqno request handlingToke Høiland-Jørgensen
The seqno request retransmission handling was tracking the destination that a forwarded request was being sent to and always retransmitting to that same destination. This is unnecessary because we only need to retransmit requests we originate ourselves, not those we forward on behalf of others; in fact retransmitting on behalf of others can lead to exponential multiplication of requests, which would be bad. So rework the seqno request tracking so that instead of storing the destination of a request, we just track whether it was a request that we forwarded on behalf of another node, or if it was a request we originated ourselves. Forwarded requests are not retransmitted, they are only used for duplicate suppression, and for triggering an update when satisfied. If we end up originating a request that we previously forwarded, we "upgrade" the old request and restart the retransmit counter. One complication with this is that requests sent in response to unfeasible updates (section 3.8.2.2 of the RFC) have to be sent as unicast to a particular peer. However, we don't really need to retransmit those as there's no starvation when sending such a request; so we just change such requests to be one-off unicast requests that are not subject to retransmission or duplicate suppression. This is the same behaviour as babeld has for such requests. 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.