Tobias Brunner
146fa8b2d3
charon-xpc: Use correct namespace when setting default settings
2013-07-22 17:44:37 +02:00
Tobias Brunner
a14d907e33
tnc-pdp: Fix reading port setting from strongswan.conf
2013-07-22 17:43:54 +02:00
Andreas Steffen
2b1ac51c9c
fixed typo
2013-07-19 20:07:32 +02:00
Andreas Steffen
645e9291f0
updated some TNC scenarios
2013-07-19 19:36:07 +02:00
Martin Willi
dcd5129c25
processor: force synchronous execute_job() if set_threads(0) has been called
...
During daemon shutdown, some idle threads might be lingering around even if
set_threads(0) already has been called. To avoid any races, we enforce
synchronous execution of the job.
2013-07-19 15:30:22 +02:00
Martin Willi
2fa92ad256
proposal: correctly enumerate registered AEADs to build default IKE proposal
...
AEADs are not returned (anymore) with the encryption enumerator.
2013-07-19 15:05:17 +02:00
Andreas Steffen
3cd01df785
Version bump to 5.1.0rc1
2013-07-19 10:40:53 +02:00
Tobias Brunner
82b1a38601
tkm: Properly refer to includes now that AM_CPPFLAGS is used
2013-07-19 09:02:04 +02:00
Tobias Brunner
8f1b44b40c
keychain: Use AM_CPPFLAGS instead of INCLUDES
2013-07-19 09:01:39 +02:00
Tobias Brunner
0ceb288815
Fix various API doc issues and typos
...
Partially based on an old patch by Adrian-Ken Rueegsegger.
2013-07-18 18:30:36 +02:00
Martin Willi
cb6c4e0430
identification: parse identities having a "@@" prefix as ID_RFC822_ADDR
...
Original patch by Gerald Richter.
2013-07-18 16:45:10 +02:00
Martin Willi
c3b8335cfb
NEWS: mention watcher and stream services
2013-07-18 16:10:48 +02:00
Martin Willi
666dff70eb
Merge branch 'ipc-service'
...
Adds network transparency and TCP support to the IPC interfaces of different
plugins using the new stream and stream service classes. A central watcher
thread can watch multiple file descriptors to handle connection requests
for these and other services using only a single thread.
2013-07-18 16:03:14 +02:00
Martin Willi
b4b3959b22
stream-service: move CAP_CHOWN check from plugins to service constructor
...
A plugin service can be a TCP socket now, so it does not make much sense
to strictly check for CAP_CHOWN.
2013-07-18 16:00:31 +02:00
Martin Willi
1897dd730f
processor: remove the now unused get_threads() method again
2013-07-18 16:00:31 +02:00
Martin Willi
ea009869e9
watcher: use processors new execute_job() to notify FDs
...
Just queueing is problematic, as all threads might be busy waiting for events
that the queued (but never executed) job delivers.
2013-07-18 16:00:31 +02:00
Martin Willi
6653e6c13e
processor: add an execute_job() method to directly execute an important job
...
If all worker threads are busy and waiting for an event, we must ensure that
a job delivering that event gets executed. This new method has this property
for CRITICAL jobs, using a worker if we have one, but executing the job directly
if not.
2013-07-18 16:00:31 +02:00
Martin Willi
55240835b0
watcher: properly support multiple watch callback types for the same FD
2013-07-18 16:00:31 +02:00
Martin Willi
d0c25a3f23
watcher: read multiple notifications if available
...
Use non-blocking I/O on the read end of the notify pipe. This also makes sure
the read does not block should select() signal data while there is none.
2013-07-18 16:00:31 +02:00
Martin Willi
8fc89db7b6
certexpire: add an option to enforce exporting trustchains having a private key
2013-07-18 16:00:31 +02:00
Martin Willi
868abd0626
error-notify: catch and forward some alerts related to certificate validation
2013-07-18 16:00:30 +02:00
Martin Willi
58750670cf
bus: raise certificate validation alerts using credential manager hook
2013-07-18 16:00:30 +02:00
Martin Willi
4d7a762871
credmgr: introduce a hook function to catch trust chain validation errors
2013-07-18 16:00:30 +02:00
Martin Willi
f7cff7fac4
lookip: double size of id field in message
2013-07-18 16:00:30 +02:00
Martin Willi
f33d1d503f
error-notify: increase size of string/identity fields in messages
2013-07-18 16:00:30 +02:00
Martin Willi
0a35ae781d
whitelist: use a read-copy when listing entries
...
While this requires a little more overhead, we can free the lock should the
stream block, allowing other threads to add/remove entries.
2013-07-18 16:00:30 +02:00
Martin Willi
0ccc5bb216
whitelist: fix error handling when creating the socket fails
2013-07-18 16:00:30 +02:00
Martin Willi
d3278c1f73
lookip: fix error handling when creating the socket fails
2013-07-18 16:00:30 +02:00
Martin Willi
cfdb5f4855
error-notify: fix error handling when creating the socket fails
2013-07-18 16:00:30 +02:00
Martin Willi
46666dd3c1
kernel-pfroute: use watcher to receive kernel events
2013-07-18 16:00:30 +02:00
Martin Willi
7f698daef9
kernel-pfkey: use watcher to receive networking events
2013-07-18 16:00:30 +02:00
Martin Willi
f4f77d7467
kernel-netlink: use watcher to receive kernel events for net/ipsec
2013-07-18 16:00:30 +02:00
Martin Willi
5f755cef46
eap-radius: use watcher instead of receiver thread on DAE socket
2013-07-18 16:00:30 +02:00
Martin Willi
c0db5d3845
dhcp: use watcher instead of dedicated receiver thread
2013-07-18 16:00:30 +02:00
Martin Willi
17028e29c2
farp: use watcher instead of dedicated receiver thread
2013-07-18 16:00:29 +02:00
Martin Willi
73da4ed849
load-tester: use a stream service to dispatch control connections
2013-07-18 16:00:29 +02:00
Martin Willi
e11c02c8f1
whitelist: use a stream service to accept client connections
...
Use SOCK_STREAM, as we don't have SOCK_SEQPACKET on TCP. To have network
transparency, the message now uses network byte order.
2013-07-18 16:00:29 +02:00
Martin Willi
091d0afa21
lookip: use stream service with async I/O dispatching
...
Now uses SOCK_STREAM, as SOCK_SEQPACKET is not available over TCP. To have
network transparency, the message now uses network byte order.
2013-07-18 16:00:29 +02:00
Martin Willi
c2a6fdf286
error-notify: use a stream service to accept client connections
...
As TCP does not have SOCK_SEQPACKET, we now use SOCK_STREAM for the error-notify
socket. To have network transparency, the message now uses network byte order.
2013-07-18 16:00:29 +02:00
Martin Willi
83faec5abe
duplicheck: use a stream service to accept client connections
...
As we can't use SOCK_SEQPACKET over TCP, we now have to provide message
boundaries ourselves. We do this by appending a 16-bit length header to each
sent duplicate identity.
2013-07-18 16:00:29 +02:00
Martin Willi
065907b99d
stroke: use a stream service to handle stroke requests
2013-07-18 16:00:29 +02:00
Martin Willi
4701929266
stream: allow async read/write callback to destroy the stream explicitly
2013-07-18 16:00:29 +02:00
Martin Willi
c9d1742b5d
stream: don't close underlying socket when creating a stream from it
2013-07-18 16:00:29 +02:00
Martin Willi
58d0dadddc
watcher: add some debugging statements
2013-07-18 16:00:29 +02:00
Martin Willi
91a2ae644c
watcher: if the processor has no threads, execute the job with watcher thread
...
This is important during shutdown, where we might need to signal some FDs while
all idle threads are gone already.
2013-07-18 16:00:29 +02:00
Martin Willi
50720d7ce9
processor: add a getter for the threads passed to set_threads()
2013-07-18 16:00:29 +02:00
Martin Willi
a0e3a7363f
watcher: unregister a watcher FD if its thread gets cancelled
2013-07-18 16:00:29 +02:00
Martin Willi
a558ba16f3
watcher: release threads waiting in remove() when watcher thread gets cancelled
...
During daemon shutdown, users might call remove() after processor.set_threads(0)
has been called. This gets problematic, as a watch event might be unable
to signal completion when no threads are available anymore. Work around this
issue by cancelling waiters once processor.cancel() has been called.
2013-07-18 16:00:29 +02:00
Martin Willi
e6e8a2b2e0
stream: support keeping the service alive outside of service callback
2013-07-18 16:00:28 +02:00
Martin Willi
d57b9e7c82
stream: add read/write_all() methods to stream
2013-07-18 16:00:28 +02:00