summaryrefslogtreecommitdiff
path: root/src/irmd
Commit message (Collapse)AuthorAgeFilesLines
...
* ipcpd: Add threadpool manager to DHTdimitri staessens2017-09-241-49/+55
| | | | | | | | | | | This adds a threadpool manager to the DHT. This was needed because the detached thread could cause a data race on shutdown. The threadpool manager is revised to allow multiple instances in a single program. The irmd and ipcp now store commands in a buffer (list) instead of a single buffer before passing it to handler threads.
* irmd: Init libgcrypt before using itdimitri staessens2017-09-202-0/+18
|
* lib: Provide RIB API to export internals via fusedimitri staessens2017-09-182-1/+16
| | | | | | | This adds a virtual RIB that is accessible as a filesystem that is accessed through a fuse mountpoint (configurable , default is /tmp/ouroboros). Currently, each IPCP will export its link state database.
* irmd: Add specific timeout for IPCP connectSander Vrijders2017-08-303-0/+7
| | | | | | This adds a specific timeout for IPCP connect, since it may take a lot longer than the regular socket timeout due to flow allocations in the IPCP.
* Merged in sandervrijders/ouroboros/be-corrupt (pull request #581)Sander Vrijders2017-08-291-1/+1
|\ | | | | | | Be corrupt
| * irmd: Fix deleting corrupt shm fileSander Vrijders2017-08-291-1/+1
| | | | | | | | | | This will delete the rdrbuff also when it has been corrupted before. Otherwise the irmd won't start, as experienced on my desktop.
* | irmd: Remove temporary debugging logsdimitri staessens2017-08-291-4/+1
|/
* ipcpd: Fix state in dht lookup at lookup_waitdimitri staessens2017-08-291-24/+48
| | | | | | | | | | | The correct state was returned but not set internally in the lookup_struct, causing lookup_wait to return a lookup in LU_PENDING if the wait timedout. This also unlocks the IRMd during register calls and fixes some cleanup if lookup_wait gets interrupted. Fixes #48
* lib, ipcpd, irmd: Fix bugs reported by static analysisSander Vrijders2017-08-292-19/+42
| | | | This fixes several bugs as reported by the clang static analyzer.
* tools: Add tool to connect IPCP componentsdimitri staessens2017-08-283-0/+151
| | | | | | | | | | | | This enables user-written tools to instruct IPCPs to establish and tear down connections (a.k.a. adjacencies) between its internal components (Management and Data Transfer). For more info, do "irm ipcp connect" or "irm ipcp disconnect" on the command line. This commit exposes a deletion bug in the RIB where FSO's fail to unpack/parse. This will be fixed when the RIB is deprecated.
* irmd: Don't warn on failed write to terminated IPCPdimitri staessens2017-08-251-1/+2
|
* lib, ipcpd, irmd: Fix several memleaksSander Vrijders2017-08-231-4/+2
| | | | | This fixes several memleaks as reported by valgrind. It also fixes some calls to close() with -1.
* Merge branch 'testing' into beSander Vrijders2017-08-231-3/+5
|\
| * irmd: Fix potential data race in irmdSander Vrijders2017-08-231-3/+5
| | | | | | | | | | If the IPCP was not created, the printing of the log may use a variable that was already freed.
* | lib, irmd: Use static buffer for messagesdimitri staessens2017-08-221-17/+9
| |
* | Merged in dstaesse/ouroboros/be-build (pull request #557)dimitri staessens2017-08-219-8/+92
|\ \ | |/ |/| | | build: Revise the build system
| * build: Revise the build systemdimitri staessens2017-08-219-8/+92
| | | | | | | | | | | | | | | | | | | | This revises the build system to have configuration per system component. System settings can now be set using cmake. The standard compliance defines were removed from configuration header and are set in the sources where needed. Also some small code refactors, such as moving the data for shims out of the ipcp structure to the respective shims were performed.
* | ipcpd, irmd: Fix data racesdimitri staessens2017-08-191-16/+32
|/ | | | | | Fixes a data race in the IRMd when IPCPs bail immediately after being created (e.g. due to an error). Fixes a race between the acceptor threads and the threads managed by threadpool manager upon shutdown.
* irmd: Handle IPCP creation fails gracefullydimitri staessens2017-08-172-35/+52
|
* irmd, ipcpd: Signal acceptor onlydimitri staessens2017-08-161-3/+13
| | | | | This adds an extra condvar so the mainloops can signal the acceptor thread without waking up all mainloops.
* 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: loic.vervaeke@ugent.be Tested by: loic.vervaeke@ugent.be
* 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
|