summaryrefslogtreecommitdiffstats
path: root/src/fastd.c
AgeCommit message (Collapse)Author
2014-09-15status: add uptime and established timesMatthias Schiffer
2014-09-06Fix async command waitpid error handling (again...)Matthias Schiffer
2014-09-05Add status socket to get the current status as JSONMatthias Schiffer
2014-09-04Support dynamic binds with extra options (interface binds, specific ↵Matthias Schiffer
addresses...)
2014-09-01Remove old state dump featureMatthias Schiffer
It will be replaced by a nicer version.
2014-08-24Coding style: always add a space between a pointer's type and the *Matthias Schiffer
2014-08-24Use simple int64_t timestamps in ms instead of timespecsMatthias Schiffer
2014-08-24Fix waitpid EINTR error on SIGCHLDMatthias Schiffer
waitpid may fail with EINTR for SIGCHLD even when all signals are blocked.
2014-08-24Merge peer config into peer structureMatthias Schiffer
With this refactoring, the structure fastd_peer_config_t is merged into fastd_peer_t, and fastd_remote_config_t into fastd_remote_t. This also means we now create peers directly when reading their configurations, which significantly simplifies the whole reload process, and prepares for some future optimizations like a key hash table. Note: This commit is too big, but I couldn't come up with a nice way to split it into smaller pieces...
2014-08-22Remove VECTOR_ALLOCMatthias Schiffer
It is done automatically now if the VECTOR is zeroed before.
2014-08-19Create peer structures for disabled peers as wellMatthias Schiffer
We have a 1:1 association between peers and peer configs now.
2014-08-18Unify enabled and dynamic flags into a config_state flagMatthias Schiffer
2014-08-18Rename WITH_VERIFY CMake option to WITH_DYNAMIC_PEERSMatthias Schiffer
2014-08-18peer: add a flag `dynamic' instead of checking the config field for NULLMatthias Schiffer
2014-08-18Rename "temporary peers" to "dynamic peers"Matthias Schiffer
2014-08-09Move fastd_config_t.peers to fastd_context_t.peer_configsMatthias Schiffer
2014-08-02Encapsulate semaphore handlingMatthias Schiffer
2014-08-02Introduce and use alloc helpersMatthias Schiffer
These new helpers will terminate fastd on allocation failures and add some additional convenience (allow strdup with NULL; typesafe new(type) macros).
2014-08-01Use srandom/random instead of rand_rMatthias Schiffer
There's no need to keep our own seed.
2014-06-14Limit the number of concurrent on-verify runsMatthias Schiffer
2014-06-05Simplify systemd notify socket handlingMatthias Schiffer
2014-06-03Create threads in detached stateMatthias Schiffer
2014-05-31dump_state(): used unsigned instead of size_t to ensure correct variadic ↵Matthias Schiffer
function call
2014-05-31Fix dump_state()Matthias Schiffer
2014-05-31Fix poll race condition on *BSDMatthias Schiffer
2014-05-31More signal handling fixesMatthias Schiffer
2014-05-31Fix blocking signals...Matthias Schiffer
2014-05-31Remove EINTR handling where signals are blocked anywaysMatthias Schiffer
2014-05-31Unblock signals only during poll/epoll waitMatthias Schiffer
If signals are normally blocked, we can avoid a lot of EINTR handling.
2014-05-31Make log levels verbose and info more usefulMatthias Schiffer
2014-05-31Split main functionMatthias Schiffer
init() is still a bit long, but much better than before.
2014-05-31Fix signal handling racesMatthias Schiffer
2014-05-29Document *everything*Matthias Schiffer
2014-05-29Simplify configuration of cipher and MAC implementationsMatthias Schiffer
Let the cipher and MAC handlers just store the chosen implementations themselves instead of relying on the global configuration.
2014-05-25Unify fastd_peer_group_t and fastd_peer_group_config_t into a single structureMatthias Schiffer
2014-05-25Completely document fastd.hMatthias Schiffer
2014-05-25Make a few struct fields that are not supposed to be changed defines insteadMatthias Schiffer
2014-05-23Implement a different fix for the waitpid race condition not needing a ↵Matthias Schiffer
reaper thread for each child
2014-05-23Revert "Fix waitpid race condition"Matthias Schiffer
This reverts commit 47d84679d6fe71f56d3a013578007dff92ff72db.
2014-05-22Clean up fastd.c includesMatthias Schiffer
2014-05-22Move fastd_handle_receive() to receive.cMatthias Schiffer
2014-05-22Fix waitpid race conditionMatthias Schiffer
Doing a waitpid for all processes in the SIGCHLD handler could sometimes steal a signal from a fastd_shell_command_exec_sync call. To fix this, don't reap the children in the SIGCHLD handler anymore, but create a reaper thread for each asynchronous shell command.
2014-05-05Make systemd support optional againMatthias Schiffer
2014-05-01Remove support for log filesMatthias Schiffer
syslog/journald do a much better job at organizing logs, with the additional advantage of proper log rotation. If someone really wants to have a log file for fastd, they can just redirect stderr.
2014-04-30Remove now unneeded FD_CLOEXEC flag configMatthias Schiffer
2014-04-30shell: close all fds > 2 after forkingMatthias Schiffer
socket/fcntl to set FD_CLOEXEC isn't thread-safe with async verify handlers, and SOCK_CLOEXEC isn't portable.
2014-04-29Fold fastd_open_pipe into fastd_async_init, simpify fastd_setfl and ↵Matthias Schiffer
fastd_setfd and move to fastd.h
2014-04-28More daemonize cleanupMatthias Schiffer
2014-04-28Fix socketpair error messageMatthias Schiffer
2014-04-28Simpilify daemonizeMatthias Schiffer