Tobias Brunner
608af0a445
Avoid a race condition that could lead to a segmentation fault.
...
Let's assume the callback function of a callback job returns
JOB_REQUEUE_FAIR in one call and JOB_REQUEUE_NONE in the next. Before
this fix, the thread executing the callback job would requeue the job
before unregistering itself. If there was a context switch right after
the job got requeued, and if the thread that requeued the job never got
resumed until a second thread executed the job and, due to the return
value of JOB_REQUEUE_NONE, destroyed it, then when the first thread
eventually got resumed and tried to lock the mutex to unregister itself
the pointer wouldn't be valid anymore, thus resulting in a segmentation fault.
2010-02-25 09:26:16 +01:00
Tobias Brunner
41faec0791
Some whitespace and code cleanups concerning the mediation extension.
2010-02-02 15:53:22 +01:00
Martin Willi
aa9eeb5deb
Support for closing CHILD/IKE_SA if a CHILD_SA is inactive.
2010-01-12 10:23:42 +01:00
Tobias Brunner
47e98cda5f
Join worker threads when destroying the processor.
2009-12-23 17:03:41 +01:00
Tobias Brunner
b97cc0ab3f
Callback job refactored and fixed.
2009-12-23 17:03:41 +01:00
Tobias Brunner
4a5a5dd290
Using the thread wrapper in charon, libstrongswan and their plugins.
2009-12-23 17:03:41 +01:00
Tobias Brunner
eba64cef41
Separated the public interfaces of the threading primitives.
2009-12-23 17:01:53 +01:00
Tobias Brunner
14f7091280
Moved mutex.c to a separate folder in order to cleanly wrap other threading primitives (and utils/mutex.h is now threading.h).
2009-12-23 17:00:58 +01:00
Andreas Steffen
1125a0be81
moved traffic_selectors from charon to libstrongswan
2009-12-20 14:57:38 +01:00
Martin Willi
cd51437e43
Do not execute the callback job if it has been cancelled since registration
2009-12-03 08:00:43 +01:00
Tobias Brunner
0755e98e5c
Cleaned up some code of the mediation extension.
2009-09-04 15:48:30 +02:00
Martin Willi
7b3814f75d
remove spaces before tabs at the beginning of lines (^( )+\t)
2009-09-04 15:02:11 +02:00
Martin Willi
b9b8a98f47
remove spaces within tabs (\t( )+\t)
2009-09-04 15:00:19 +02:00
Martin Willi
323f9f990f
replaces four spaces by tabs, where appropriate
2009-09-04 14:50:23 +02:00
Martin Willi
7daf5226b7
removed trailing spaces ([[:space:]]+$)
2009-09-04 13:46:09 +02:00
Tobias Brunner
484a06bce7
Fixed some typos; whitespace cleanup.
2009-09-02 17:30:46 +02:00
Martin Willi
de5784452b
use time_monotonic() instead of gettimeofday() for time difference calculations
2009-08-31 15:25:03 +02:00
Martin Willi
3d5818ec38
use monotonic time source in convar->timed_wait, and in the scheduler using it
2009-08-31 15:13:48 +02:00
Tobias Brunner
3901937d14
OpenSolaris defines MUTEX_DEFAULT therefore we rename the members of the enums mutex/condvar/rwlock_type_t.
2009-08-14 13:30:59 +02:00
Tobias Brunner
68173e1fea
typo
2009-05-18 13:04:18 +02:00
Tobias Brunner
28154e35be
documented the idea behind the current implementation of the scheduler
2009-05-15 14:43:15 +02:00
Martin Willi
8c99451ae1
make use of the new trap-manager
2009-05-08 10:03:58 +02:00
Tobias Brunner
8c5d72cd0b
removing svn keyword $Id$ from all files
2009-04-30 13:19:35 +00:00
Tobias Brunner
d24a74c5b4
merging changes from portability branch back to trunk
...
important change for developers: %Y replaces %D to print identities!
2009-04-30 11:37:54 +00:00
Martin Willi
6554b5e412
schedule_job uses seconds to support time values larger than 49 days
...
added schedule_job_ms for ms resolution events
2009-04-21 15:16:56 +00:00
Martin Willi
a44bb9345f
merged multi-auth branch back into trunk
2009-04-14 10:34:24 +00:00
Martin Willi
1490ff4d9b
updated Doxyfile
...
properly close all doxygen groups
fixed remaining doxygen warnings
2009-03-24 17:43:01 +00:00
Martin Willi
50901d2550
do not respawn cancelled threads if we are shutting down
2008-12-12 15:57:12 +00:00
Martin Willi
3993b91334
execute events if difference is 0, prevents a busywait
2008-12-12 09:16:31 +00:00
Martin Willi
dd6b7af3f7
do not delete passive IKE_SAs
2008-11-28 15:44:25 +00:00
Tobias Brunner
999072ea02
optimized the scheduler for performance by replacing the linked list with a heap.
2008-11-25 19:56:05 +00:00
Tobias Brunner
6df2731e78
replacing the pthread_mutex in scheduler_t with the wrapped implementation.
...
added a method to condvar_t which allows to wait for an absolute timeout.
2008-11-25 19:30:02 +00:00
Martin Willi
3aaf7908d1
refactored and cleaned up child_sa interface
...
replaced add/update calls by a install() call
allocating SPIs always externally
support installation of non-allocated CHILD_SAs
some other cleanups
2008-11-19 15:31:27 +00:00
Andreas Steffen
7a915d627d
completed migration of MIPv6 connections
2008-11-16 21:19:58 +00:00
Tobias Brunner
f967db312d
fixing mediation extension
2008-11-11 13:12:05 +00:00
Andreas Steffen
d487b4b727
preliminary support of Mobile IPv6
2008-11-11 06:37:37 +00:00
Martin Willi
3ac5a0db8c
replaced most pthread_mutex/cond_t by wrapped mutex/condvar_t variant
2008-11-05 11:29:56 +00:00
Martin Willi
e13389a7f7
got rid of deprecated create_iterator_locked()
2008-11-05 08:32:38 +00:00
Andreas Steffen
bab075b166
added support for xfrm remote kmaddress
2008-11-03 23:29:34 +00:00
Andreas Steffen
9c33987471
migrate job creates a new IKE_SA
2008-11-03 07:08:59 +00:00
Andreas Steffen
ef6d339c09
migrate_job() finds a matching child_cfg
2008-11-03 02:05:41 +00:00
Andreas Steffen
e526d22818
parse xfrm and pf_key acquire messages and subscribe to migrate messages
2008-10-31 01:43:23 +00:00
Martin Willi
a985db3ff3
reintegrated bus-refactoring branch
2008-10-14 08:52:13 +00:00
Martin Willi
aa9a300677
userland support to process notifies for new NAT mappings detected in UDP encapsulation
2008-10-07 07:55:28 +00:00
Martin Willi
a4a3e0c7dc
introduced an additional bus->signal parameter for signal specific data
...
added SIG_IKE/SIG_CHD macros for signal emitting
2008-07-18 15:51:40 +00:00
Martin Willi
a593db5d35
ike_sa_manager enumerable, not iterable
2008-04-14 11:37:46 +00:00
Martin Willi
96926b006d
using dpd actions to enforce connection state
...
dpd actions a per child-, not peer ike-sa
2008-04-11 08:14:48 +00:00
Tobias Brunner
4a6474c2c3
enabling acquire for mediated connections
2008-04-10 12:51:04 +00:00
Tobias Brunner
471f923071
fixed two other memory leaks
2008-04-03 15:13:25 +00:00
Tobias Brunner
8e91a36314
thread locking for sender and processor optimized
2008-04-03 09:19:12 +00:00