5e72359e9a
Completely document fastd.h
2014-05-25 04:59:35 +02:00
f34e51a1c3
Make a few struct fields that are not supposed to be changed defines instead
2014-05-25 00:20:05 +02:00
1b21919d54
fastd.h: more documentation
2014-05-25 00:04:20 +02:00
52017c3919
shell: ensure the signal mask is restored if shell_command_do_exec fails
2014-05-23 03:03:37 +02:00
d899fca425
Implement a different fix for the waitpid race condition not needing a reaper thread for each child
2014-05-23 02:59:46 +02:00
47a34ece26
Revert "Fix waitpid race condition"
...
This reverts commit 47d84679d6
.
2014-05-23 02:37:02 +02:00
6b72d65ebb
More documentation
2014-05-23 02:36:57 +02:00
789495e5a2
More documentation
2014-05-22 05:10:59 +02:00
f885449c5b
Move fastd_peer_group{,_config} definitions to peer.h
2014-05-22 04:01:43 +02:00
6427c80b3e
verify: use default tristate constants
2014-05-22 03:45:05 +02:00
fa486bd8ec
Document types.h
2014-05-22 03:40:18 +02:00
1c8d382fac
Move fastd_loglevel_t to log.h
2014-05-22 03:34:59 +02:00
0e3407d9aa
Move fastd_peer_state_t to peer.h
2014-05-22 03:31:22 +02:00
2693cfc6e5
Remove PACKET_TYPE_LEN define
2014-05-22 03:14:16 +02:00
1fe3425c97
Add Doxygen support
2014-05-22 02:48:59 +02:00
2a64611f72
Clean up fastd.c includes
2014-05-22 02:22:01 +02:00
09f525417c
Move fastd_handle_receive() to receive.c
2014-05-22 02:16:44 +02:00
47d84679d6
Fix waitpid race condition
...
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-22 02:02:39 +02:00
956e414d7b
Use unescaped instance name in systemd unit
2014-05-20 14:23:11 +02:00
56c72080ac
Make systemd support optional again
2014-05-05 04:23:34 +02:00
1c71bf873a
systemd: use syslog/journald by default
2014-05-01 16:30:40 +02:00
8ccba8ebfa
Remove support for log files
...
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-05-01 16:26:39 +02:00
8e589f3a3a
Fix CMake errors on some config combinations
2014-04-30 03:40:15 +02:00
0d0a857c69
Use SOCK_NONBLOCK where available
2014-04-30 03:32:36 +02:00
4f082c7df3
Remove now unneeded FD_CLOEXEC flag config
2014-04-30 02:56:02 +02:00
36f9d70182
shell: close all fds > 2 after forking
...
socket/fcntl to set FD_CLOEXEC isn't thread-safe with async verify handlers,
and SOCK_CLOEXEC isn't portable.
2014-04-30 02:45:01 +02:00
9a86ce6ea9
Fold fastd_open_pipe into fastd_async_init, simpify fastd_setfl and fastd_setfd and move to fastd.h
2014-04-29 16:17:58 +02:00
639ebc2ff9
More daemonize cleanup
2014-04-28 21:00:18 +02:00
dd11507cdf
Fix socketpair error message
2014-04-28 20:48:57 +02:00
8dda55956d
Simpilify daemonize
2014-04-28 20:48:18 +02:00
5871d08a3a
Make on-verify support optional
2014-04-26 23:22:24 +02:00
36690c7203
Implement async verify
2014-04-26 22:46:05 +02:00
64ce1c0f51
pthread_create returns an error instead of setting errno
2014-04-26 22:20:27 +02:00
4020ee614c
Revise shell command API
2014-04-26 20:37:47 +02:00
1ea5ef8944
epoll: update time *after* waiting...
2014-04-25 21:50:29 +02:00
6785e06f2b
handshake: simplify fastd_handshake_new_reply
...
This will hopefully lead to an async verify implementation...
2014-04-25 03:39:56 +02:00
8c193693d7
Move around some code
2014-04-25 03:23:13 +02:00
1723e18b1d
Reduce minimum vector allocation
2014-04-25 02:28:32 +02:00
7fbaedb117
Replace a few more O(n) peer operations with O(log n) using binary search
2014-04-25 02:16:48 +02:00
5adfca9b65
Remove ref-counting on remotes
...
Now that peers have a peer id we can use that to specify a peer in a resolve
return. As the remote list of a peer doesn't change without the peer id
changing, instead of taking a remote ref we can just use the peer id and remote
index.
2014-04-25 01:51:36 +02:00
482ddc46a6
fastd_peer_claim_address: add parameter to allow claiming addresses of established peers
2014-04-25 00:56:07 +02:00
1bb1eb5a33
fastd_peer_claim_address: allow claiming addresses from other peers when they aren't configured statically
2014-04-25 00:49:44 +02:00
53b74ddf2c
vector: add VECTOR_BSEARCH macro and use where appropriate
2014-04-25 00:13:44 +02:00
4ea57586f5
Add a sequential number to identify peers
2014-04-24 22:25:41 +02:00
e4e4f007e8
config: remove support for deprecated float syntax
2014-04-24 04:12:16 +02:00
ea609fe8c2
Convert few more counters to size_t, just for the sake of consistency...
2014-04-24 03:36:36 +02:00
e8296fbc9f
ec25519-fhmqvc: use PUBLICKEYBYTES and SECRETKEYBYTES defines more
2014-04-24 03:33:09 +02:00
4872dd03e7
Always use size_t for counters
2014-04-24 03:17:46 +02:00
baf9b2fd60
Make async handle buffer aligned
2014-04-24 01:04:03 +02:00
d3eb3ac888
Use socketpair instead of pipe for internal message pipes
...
While pipe2 recently got O_DIRECT on Linux, we'll just use SOCK_DGRAM to stay
portable, and get proper handling of full queues.
2014-04-23 17:36:59 +02:00