summaryrefslogtreecommitdiff
path: root/src/irmd
Commit message (Collapse)AuthorAgeFilesLines
* irmd, ipcpd: Listen on a dedicated accept() threaddimitri staessens2017-08-161-70/+177
| | | | | | | | | | | The IRMd and IPCPs will now call accept on their command sockets from a single thread that will dispatch work to the other threads. This solves a problem on OS X and FreeBSD where accept() doesn't time out when setting SO_RCVTIMEO on the socket. Calling kqueue or select() on that socket to wait for events before calling accept() didn't solve it since select() or kqueue() might wake up multiple threads, with the non-working threads again blocked on the accept() on shutdown.
* build: Replace fsf snail mail with contact URLdimitri staessens2017-08-1313-13/+13
|
* irmd: Fix mainloop timeout on OS Xdimitri staessens2017-08-111-2/+2
|
* build, lib, ipcpd, irmd: Add support for libgcryptdimitri staessens2017-08-093-25/+27
| | | | | | | | | | | | | | | | This adds support for libgcrypt. If at least version 1.7.0 of libgcrypt is present, it may be used for secure random number generation and is used for hashing in the irmd/ipcp. The hash definitions are moved to the internal hash.h header, and defined independently of the hashes that are defined as part of the directory policy for the normal IPCP. The translation is moved from the IRMd to ipcpd/ipcp.h. The bootstrap call from the IRMd expects the IPCP to return the correct hash algorithm with a dif_info struct, which is in line with the behavior of the enroll call. This also improves how some platform checks in the build system are handled.
* irmd: Don't self-query an IPCPDimitri Staessens2017-08-051-4/+5
| | | | | | Upon flow_allocation, the IRMd queries IPCPs for the destination name. After this commit, when an IPCP allocates a flow, the IRMd won't query that IPCP.
* irmd: Don't call ipcp_flow_dealloc under lockDimitri Staessens2017-08-051-3/+13
| | | | | | | | | | When a process was killed, ipcp_flow_dealloc was called under a lock, causing a deadlock in the IRMd because handling the IPCP response also needs to take the same lock (the IPCP calls flow_dealloc to finalize this). This deadlock also resulted in the IPCP always reporting that it failed to send a reply message as the deadlock effectively blocks the IRMd until its socket timeout expired and thus the IPCP was always responding to an already closed socket.
* irmd: Specify timeout per commandDimitri Staessens2017-08-051-22/+44
| | | | | | | The commands towards the IPCPs have different time requirements, but the irmd had only a single timeout value to wait for a response. This commit allows setting different timeouts for the IRMd based on the command, configurable globally.
* Merge branch 'testing' into beSander Vrijders2017-08-041-8/+16
|\
| * irmd: Release lock before ipcp_querydimitri staessens2017-08-041-8/+16
| | | | | | | | | | | | The blocking ipcp_query call was called under reg_lock, causing flow_allocs over the shim-eth-llc to block the irmd for prolonged timespans.
* | lib: Add threadpool managerdimitri staessens2017-07-261-183/+26
| | | | | | | | | | | | | | | | This adds a threadpool manager component in the library that is used in the IRMd and IPCPs. The threadpool manager now doesn't detach threads but does a join when they exit. This solves a data race in the previous implementation where some threads were not completely finished upon release of some resources.
* | irmd: Fix order of IPCPsSander Vrijders2017-07-181-1/+1
|/ | | | | This fixes the order of the IPCPs in the IRMd, so that the right type is queried first on flow allocation.
* ipcpd, lib, irmd: Hardcode shim hash algorithmsSander Vrijders2017-07-121-2/+16
| | | | | | | This will hardcode the shim hash algorithms as they don't have an enrollment phase. Fixes #44
* irmd: Shutdown sanitizer without cancellationdimitri staessens2017-07-121-6/+3
|
* lib, ipcpd, irmd: Add full-fledged QoSSander Vrijders2017-06-214-3/+5
| | | | | | | This adds more Quality of Service support to Ouroboros. One part is the network specific characteristics such as bandwidth, delay, ... The other part is end-to-end QoS like reliability, window based flow control, ...
* Merged in dstaesse/ouroboros/be-macro (pull request #514)dimitri staessens2017-06-051-1/+1
|\ | | | | | | include: Fix macro for printing hash
| * include: Fix macro for printing hashdimitri staessens2017-06-041-1/+1
| |
* | lib, irmd: Handle case fallthrough in gcc 7dimitri staessens2017-06-041-0/+1
|/
* ipcpd: Allow specifying fixed syntaxdimitri staessens2017-05-152-7/+7
| | | | | | This commits adds the functions and messages to specify a fixed protocol syntax during CACEP. It also revises the messages for specifying the DT protocol syntax from the irm tool.
* irmd: Fix unbinding AP and AP-Is from a namedimitri staessens2017-05-093-4/+16
| | | | | | | APs and AP-Is were not removed from the registry entry for that name. Reported by: [email protected] Tested by: [email protected]
* irmd: Remove some debug logsdimitri staessens2017-04-281-6/+0
|
* ipcpd: Add capability reportingdimitri staessens2017-04-273-36/+61
| | | | | | | | The IPCP will now report the DIF name and the hash value to the IRMd as a dif_info struct. This can later be extended to add further capability reporting. Some bugfixes in normal. Fixes #24
* Merged in dstaesse/ouroboros/be-hashing (pull request #484)dimitri staessens2017-04-164-22/+28
|\ | | | | | | Be hashing
| * ipcpd: Allow specifying the hash algorithm to usedimitri staessens2017-04-164-22/+28
| | | | | | | | Currently CRC32, MD5, and SHA3 (224, 256, 384 and 512 bit) are supported.
* | irmd, ipcpd: Include socket in select() for FreeBSDdimitri staessens2017-04-161-1/+1
|/ | | | Fixes #41
* include, lib: Rename ap_init/ap_finidimitri staessens2017-04-131-1/+1
| | | | Fixes #35
* Merged in dstaesse/ouroboros/be-hashes (pull request #479)dimitri staessens2017-04-136-171/+253
|\ | | | | | | lib, ipcpd, irmd: Register hash instead of name
| * lib, ipcpd, irmd: Register hash instead of namedimitri staessens2017-04-136-171/+253
| | | | | | | | | | | | | | | | | | All information passed over the IRMd/IPCP boundary for using IPC services (flow allocation, registration) is now hashed. This effectively fixes the shared namespace between DIFs and the IRMDs. This PR also fixes some API issues (adding const identifiers), shuffles the include headers a bit and some small bugs.
* | irmd: Fix mixed declarationdimitri staessens2017-04-111-2/+2
|/
* irmd: Remove unnecessary state locksdimitri staessens2017-04-061-207/+36
|
* irmd: Prevent impatient user deadlock on shutdowndimitri staessens2017-04-061-0/+18
|
* lib, irmd: Implement flow allocation timeoutdimitri staessens2017-04-066-112/+213
| | | | | | Setting the timeouts on flow_alloc and flow_accept will now work. This makes some changes to the UNIX sockets used for management communication between the APs, IRMd and IPCPs.
* irmd: Initialize in stack memorydimitri staessens2017-04-041-482/+485
|
* ipcpd, irmd: Fix cleanup of thread resourcesdimitri staessens2017-04-041-23/+17
|
* lib, irmd, ipcpd: Stabilize flow allocationdimitri staessens2017-04-044-48/+86
|
* irmd: Fix dealloc of pending flowdimitri staessens2017-04-021-2/+5
|
* irmd: Fix thread creation orderdimitri staessens2017-04-021-1/+1
|
* irmd: Add dynamic threadpooldimitri staessens2017-04-011-31/+196
| | | | | | | | | | | This makes the IRMd add/remove worker threads dynamically. IRMD_TPM_TIMEOUT sets a timer in the threadpool manager for checking idle threads. Each time this timer expires, it will reduce the threadpool by one. IRMD_MIN_AV_THREADS is the minimum number of available worker threads. If the number of active threads goes under this threshold, the threadpool manager will create threads to get the number of threads to IRMD_MAX_AV_THREADS, unless IRMD_MAX_THREADS is reached.
* irmd: Keep track of qos in irm_flowdimitri staessens2017-03-315-19/+17
| | | | This fixes the bug in handling multiple concurrent flow allocations.
* irmd: Fix assignment bugdimitri staessens2017-03-311-2/+2
|
* lib: Revise flow allocation APIdimitri staessens2017-03-313-154/+68
| | | | | | The flow_alloc_res and flow_alloc_resp calls have been removed. The flow_alloc and flow_accept calls are now both blocking and take an additional timeout argument.
* irmd: Fix shutdown with active acceptdimitri staessens2017-03-291-0/+1
|
* irmd: Exit blocking threads from irm_sanitizerdimitri staessens2017-03-291-21/+25
| | | | | | Some blocking calls caused mainloops to never exit. The irm_sanitizer will now clean up those structs before exiting. This will speed up regular exit and avoids non-cancelling threads.
* irmd: Set failed flows to FLOW_NULL before destroydimitri staessens2017-03-292-1/+1
|
* Merged in dstaesse/ouroboros/be-irmd (pull request #410)dimitri staessens2017-03-221-0/+3
|\ | | | | | | irmd: Fix some missing locks
| * irmd: Fix some missing locksdimitri staessens2017-03-221-0/+3
| |
* | irmd: Fix clock used for timedwaitdimitri staessens2017-03-221-1/+1
| |
* | ipcpd: normal: Several bugfixesSander Vrijders2017-03-211-2/+3
|/ | | | These solve several bugfixes in the normal.
* Merge branch 'be' of bitbucket.org:ouroboros-rina/ouroboros into beSander Vrijders2017-03-2114-45/+43
|\
| * Change email addresses to ugent.beSander Vrijders2017-03-0313-15/+27
| | | | | | | | | | | | | | Our mailserver was migrated from intec.ugent.be to the central ugent.be emailserver. This PR updates the header files to reflect this change as well. Some header files were also homogenized if the parameters within the functions were badly aligned.
| * build: Format CMakeLists.txt filesSander Vrijders2017-03-031-11/+11
| | | | | | | | The CMakeLists files are now properly indented.