| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| | |
The removal of the mutex and signal in 198b709 was a mistake.
|
| |
| |
| |
| |
| | |
shm_flow_set_wait was called with a timeout even though
flow_event_wait was called with timeout NULL.
|
| |
| |
| |
| | |
frct_clear was called in ouroboros_fini instead of ouroboros_init.
|
| |
| |
| |
| |
| |
| | |
This adds the CRC check by default on outgoing SDUs. It fixes some
errors in the serialization and deserialization of the SDU. frct_clear
was added to avoid bad initialization of the array of FRCT instances.
|
|\ \
| | |
| | |
| | | |
Be tw
|
| | |
| | |
| | |
| | |
| | |
| | | |
This turns the timerwheel into a passive component since it is used by
application using the library. The user of the timerwheel now has to
call timerwheel_move to advance the timerwheel.
|
| | |
| | |
| | |
| | |
| | | |
There was an else clause matched with the wrong if statement,
resulting in robust mutexes being enabled even in glibc 2.25.
|
| | | |
|
|/ / |
|
|\ \
| | |
| | |
| | | |
build: Revise the build system
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
|\ \ \
| |/ /
|/| /
| |/ |
|
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
|
|
|
|
|
| |
This adds the basic FRCT mechanisms to the library. Upon flow alloc or
accept an FRCT instance is now created and used when reading or
writing to the flow. The timerwheel has been refactored to allow
recharging timers and removing them and is now part of the
library. The first SDU sent over the connection has the DRF set and
this initializes the connection. Sender and receiver inactivity timers
are added.
|
| |
|
|
|
|
|
| |
This adds support reading Ethernet frames using the Berkeley Packet
Filter (BPF). Ouroboros now fully runs on OS X Sierra.
|
|
|
|
| |
The build failed on OS X if an old version of libgrypt is installed.
|
|
|
|
|
| |
This adds an extra condvar so the mainloops can signal the acceptor
thread without waking up all mainloops.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
This locks the process when allocating and destroying flow_sets. The
flows_lock has been renamed to lock. Refactors and fixes a memleak in
ouroboros_init.
|
| |
|
|\
| |
| |
| | |
lib: Fix instability in threadpool manager
|
| |
| |
| |
| |
| |
| | |
The DHT failed when receiving multiple responses in a short
timeframe. The lookup struct now keeps track of the number of
outstanding requests.
|
| |
| |
| |
| |
| |
| | |
The threadpool manager now tracks threads to prevent cyclic behaviour
where too many threads shut down and the TPM responds with creating
additional threads.
|
| | |
|
|/ |
|
|
|
|
| |
This fixes several assignments to the wrong enum type.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
| |
The DHT lookup would stop if a node returned no new useful information
(i.e. the value for the key or unknown nodes closer to the key)
without waiting for other pending requests that could still return
useful information. Now it correctly tracks the number of outstanding
requests or returns if it doesn't get a response for KAD_T_RESP
seconds. This fixes multi-hop flow allocation over the normal.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|\ |
|
| | |
|
| |
| |
| |
| |
| |
| | |
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.
|
|\| |
|
| |
| |
| |
| |
| |
| | |
This fixes pthread_condtimedwaits in the flow allocator of all IPCPs
that had bad deadlines set (the interval instead of the actual
absolute time).
|
| |
| |
| |
| |
| |
| | |
This adds a check for robust mutexes. The constant HAVE_ROBUST_MUTEX
is set accordingly in config.h. It also adds some other fixes to make
the prototype compile on the Hurd.
|
| |
| |
| |
| |
| | |
This refactors dev.c to have a common function called init_flow that
is called whenever a flow is allocated in dev.c
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
The scheduler in the normal IPCP is now multithreaded. While useful in
itself for scalability, it currently solves thread starvation in case
of executing post_sdu operations that may require a response. This
could be further revised in the future to split the SDU handling
threads from the component tasks.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
Fixes a memory leak when the DHT is destroyed during a send_msg. Fixes
a deadlock when destroying the DHT with a pending lookup. Removes some
debug logs that clutter output due to expected redundant FIND_VALUE
responses.
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|