Tobias Brunner
3bcfb271a3
Make Android.mk depend on configure.in, so it gets rebuilt if the version number got changed.
2010-03-05 14:59:29 +01:00
Tobias Brunner
d6731a0f26
parser.l includes y.tab.h, so it must be built first
2010-03-05 14:59:22 +01:00
Tobias Brunner
73f5940b1c
Ignore the generated y.output.
2010-03-05 14:47:08 +01:00
Tobias Brunner
551b02029e
Do not hardcode the path to the strongSwan sources.
2010-03-05 14:47:08 +01:00
Tobias Brunner
de64e2166d
Ignore the generated Android.mk
2010-03-05 14:47:08 +01:00
Tobias Brunner
807c12ce66
Generate the main Android.mk, so the version number is not hardcoded.
...
We include the generated file in the distribution, so users won't
have run configure if they are building for Android.
2010-03-05 14:46:59 +01:00
Tobias Brunner
0ace35282c
Build libstrongswan before building any plugins during the non-monolithic build (as it was before).
2010-03-05 11:05:32 +01:00
Tobias Brunner
f9622e8cbb
Disabling warnings about arithmethic with void* on Android.
2010-03-03 17:37:20 +01:00
Tobias Brunner
ea2f2c4b90
Fixing a bug on platforms where size_t is unsigned.
2010-03-03 17:35:19 +01:00
Tobias Brunner
465ccdc8cf
The parsed timeval is unsigned.
2010-03-03 17:34:49 +01:00
Tobias Brunner
fc1afcc89e
The return value of snprintf is int not size_t.
2010-03-03 17:34:06 +01:00
Tobias Brunner
1be3298807
Adding Android.mk files to build charon and libstrongswan with the Android build system.
2010-03-03 10:18:46 +01:00
Tobias Brunner
afb364fff9
Reverting eba28948a5 which was only necessary when cross-compiling the plugins for Android 2.0.
...
With the coming monolithic build using Android.mk files this won't be
necessary anymore.
2010-03-02 12:03:44 +01:00
Tobias Brunner
4e657051f7
Streamlined the source file list formatting in plugin makefiles.
2010-03-02 10:40:50 +01:00
Tobias Brunner
fac3bfa5cd
Fixing some includes by replacing <> with "".
...
I changed only the includes needed to fix the build on Android, which has an utils.h system header file, but we should probably change all the local includes in libstrongswan to "" and relative paths.
2010-03-02 10:38:58 +01:00
Tobias Brunner
6ec60bb92b
Link all enabled libstrongswan plugins into the library, link all enabled charon plugins into libcharon.
2010-03-02 10:38:52 +01:00
Tobias Brunner
3724668b3d
Enabling the plugin loader to be able to load plugins without explicitly loading a shared object file first.
2010-03-02 09:10:32 +01:00
Tobias Brunner
3372ad144b
Adding an option to build libstrongswan and charon monolithically.
2010-03-02 09:10:32 +01:00
Tobias Brunner
9ce567f895
Changed plugin constructors from plugin_create to plugin_name_plugin_create.
2010-03-02 09:10:26 +01:00
Tobias Brunner
6cc13cd9c5
Removing the plugin constructor declarations from the header files.
2010-03-02 09:10:19 +01:00
Tobias Brunner
c711687c00
Force libdl if the android plugin is enabled. AC_SEARCH_LIBS thinks it's not required, but on Android 2.0 it is.
2010-02-25 13:51:05 +01:00
Tobias Brunner
eba28948a5
Link all plugins to libstrongswan.
2010-02-25 13:51:05 +01:00
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
38da64fe12
Detect windows hosts to add specific workarounds.
2010-02-12 10:57:39 +01:00
Tobias Brunner
71baf5a8f0
Adding support for AES GMAC (RFC4543).
2010-02-12 10:57:39 +01:00
Tobias Brunner
3cc0cc4332
Increased the buffer for netlink responses.
...
If an error occurs while manipulating policies in the kernel, the
original netlink request gets attached to the response.
Prior to Linux 2.6.32 the size in the netlink header of the response was
wrong.
2010-02-05 20:10:54 +01:00
Tobias Brunner
41faec0791
Some whitespace and code cleanups concerning the mediation extension.
2010-02-02 15:53:22 +01:00
Tobias Brunner
dc5969242f
Join pluto's fetching thread instead of detaching it in order to avoid that the leak-detective reports a memleak.
2010-02-02 15:23:39 +01:00
Tobias Brunner
776f59f7be
Block the signals before the call to sigwait.
2010-01-12 11:52:03 +01:00
Tobias Brunner
e9a1852aac
Pluto's fetcher thread is now created via libstrongswan.
2009-12-26 15:50:34 +01:00
Tobias Brunner
ff4d4aa99a
Adapted the load_tester kernel-interface to the changes introduced in 6ec949e02.
2009-12-23 17:15:28 +01:00
Tobias Brunner
cb186f9922
Added some IPv6 tweaks for Android.
...
Android 1.6 does not yet support the Advanced Sockets API for IPv6 as defined in
RFC 3542. Also, in6addr_any is missing.
2009-12-23 17:03:42 +01:00
Tobias Brunner
a37cf4580a
Semicolon removed.
2009-12-23 17:03:42 +01:00
Tobias Brunner
3f490ff978
According to the man page (and the header files in Android) prctl takes a total of 5 arguments.
2009-12-23 17:03:42 +01:00
Tobias Brunner
85202e8795
Added a workaround for the missing pthread_cancel on Android.
2009-12-23 17:03:42 +01:00
Tobias Brunner
b2944d71ca
Use pthread_cond_timedwait_monotonic on Android.
2009-12-23 17:03:41 +01:00
Tobias Brunner
01e606546c
Cache queue locking in credential manager corrected.
2009-12-23 17:03:41 +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
89ec5bef08
Whitespace cleanup.
2009-12-23 17:03:41 +01:00
Tobias Brunner
4ec2c94b5d
Readding changes that got lost during refactoring/rebasing.
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
c48eea9203
Adding an object-oriented wrapper for thread-specific values.
2009-12-23 17:02:26 +01:00
Tobias Brunner
0d5c6a28d5
Adding an object-oriented wrapper for threads.
2009-12-23 17:02:26 +01:00
Tobias Brunner
070ac5b0b7
Check if libpthread is required or not.
2009-12-23 17:02:26 +01:00
Tobias Brunner
866dc0134a
Check for pthread_condattr_init added to configure script.
2009-12-23 17:02:25 +01:00
Tobias Brunner
c33d4f29bc
Generating the apidoc in an out-of-tree build fixed.
2009-12-23 17:02:25 +01:00
Tobias Brunner
5fe538504e
Moved implementation of condvar_t to mutex.c because it requires access to private_mutex_t.
2009-12-23 17:02:25 +01:00
Tobias Brunner
eba64cef41
Separated the public interfaces of the threading primitives.
2009-12-23 17:01:53 +01:00
Tobias Brunner
f36143b0ba
Implemented a read-write lock using only mutex_t and condvar_t (in case the pthread_rwlock_* group of functions is not available).
2009-12-23 17:01:30 +01:00
Tobias Brunner
b1f35d0695
Threading primitives separated.
2009-12-23 17:01:30 +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
Tobias Brunner
268911a5cc
The attribute manager was moved from daemon_t to libstrongswan.
2009-12-07 16:00:27 +01:00
Tobias Brunner
6e6975395e
Using the correct type for ME_ENDPOINT payloads in connectivity checks.
2009-09-24 11:29:34 +02:00
Tobias Brunner
0755e98e5c
Cleaned up some code of the mediation extension.
2009-09-04 15:48:30 +02:00
Tobias Brunner
f4b975a65d
Moved set_state after the DBG0 statement, so that the message gets logged also for mediation connections without CHILD_SA.
2009-09-04 15:13:12 +02:00
Tobias Brunner
a20e98749a
Simplified the search for ME_CONNECTID notifies.
2009-09-02 17:30:47 +02:00
Tobias Brunner
484a06bce7
Fixed some typos; whitespace cleanup.
2009-09-02 17:30:46 +02:00
Tobias Brunner
5293b02945
Missing commas added.
2009-09-02 17:29:44 +02:00
Tobias Brunner
deddfde91b
Description of new lifetime limits added to manpage.
2009-09-01 12:54:33 +02:00
Tobias Brunner
686aba2589
Added lifetime/margintime keywords as alias for keylife/rekeymargin.
2009-09-01 12:54:33 +02:00
Tobias Brunner
e75f423753
Refactored the lifetime_cfg_t struct to be simpler and more expressive. Initialization is now static.
2009-09-01 12:54:33 +02:00
Tobias Brunner
abff49a7ff
Handling of new lifetime limits added to stroke.
2009-09-01 12:53:44 +02:00
Tobias Brunner
ca41aa0602
Added keywords for the new lifetime limits to starter.
2009-09-01 12:53:44 +02:00
Tobias Brunner
9c7faa8618
Added parser for unsigned long long ints to starter.
2009-09-01 12:53:44 +02:00
Tobias Brunner
f40c115531
If no inbound CHILD_SA is found, try to find an outbound SA.
...
Due to the new lifetime limits in- and outbound SAs may expire
individually.
2009-09-01 12:53:44 +02:00
Tobias Brunner
1087b9cebb
Set the packet and byte limits in the netlink and pfkey kernel interfaces.
2009-09-01 12:53:44 +02:00
Tobias Brunner
e3c7e72973
Terminology and return value of get_lifetime of child_sa_t corrected.
2009-09-01 12:53:44 +02:00
Tobias Brunner
cb123493d1
child_sa_t adapted to the new lifetime configuration.
2009-09-01 12:53:43 +02:00
Tobias Brunner
888af96343
Adapted the kernel interfaces to the new lifetime configuration.
2009-09-01 12:53:13 +02:00
Tobias Brunner
e0a8a8c3ec
Adapted the config backends to the new lifetime configuration.
2009-09-01 12:50:50 +02:00
Tobias Brunner
caf87c7dcb
child_cfg_t now takes a lifetime_cfg_t to configure the lifetime limits. Also adjusted the jitter calculation, so it works for values > RAND_MAX.
2009-09-01 12:50:50 +02:00
Tobias Brunner
86e4728550
lifetime_cfg_t added to configure lifetime limits of a CHILD_SA.
2009-09-01 12:50:50 +02:00
Tobias Brunner
e822fc576a
Added side effect free min and max macros.
2009-09-01 12:50:50 +02:00
Tobias Brunner
333b461aa6
Fixing address resolution via getaddrinfo in libfreeswan.
2009-08-18 12:30:11 +02:00
Tobias Brunner
f1777dff59
Replacing gethostbyname, gethostbyname2 and their _r variants with getaddrinfo to increase portability.
2009-08-14 16:14:32 +02:00
Tobias Brunner
26965b4ef3
OpenSolaris needs libsocket and libnsl for socket().
2009-08-14 14:50:53 +02:00
Tobias Brunner
932fdc38de
Enable CMSG headers and macros on OpenSolaris.
2009-08-14 14:50:52 +02:00
Tobias Brunner
8c3627c5ae
Added define to get sigwait with two parameters on OpenSolaris.
2009-08-14 14:50:51 +02:00
Tobias Brunner
e580e0a9a2
sockio.h is required on OpenSolaris for SIOCGIFADDR.
2009-08-14 14:50:50 +02:00
Tobias Brunner
647bd246e4
Replaced the strange definitions of IN6ADDR_ANY_INIT and IN6ADDR_LOOPBACK_INIT on OpenSolaris.
2009-08-14 14:50:49 +02:00
Tobias Brunner
cc396286e8
Defined some missing fixed-width int types on OpenSolaris.
2009-08-14 14:50:22 +02:00
Tobias Brunner
a3ccf95f3f
LOG_AUTHPRIV is not defined on OpenSolaris.
2009-08-14 13:37:07 +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
8b6a5ce5ba
We need to include alloca.h on OpenSolaris.
2009-08-14 13:25:22 +02:00
Tobias Brunner
3974b2fb07
FreeBSD's libc does not support backtrace(), but libexecinfo optionally replicates this function (and the other defined in execinfo.h).
2009-08-07 18:46:25 +02:00
Tobias Brunner
79ff614144
Use LONG_MAX instead of a hard-coded value.
2009-08-06 18:22:01 +02:00
Tobias Brunner
bfca7aa5ed
FreeBSD returns the current policy use time only after specifying a hard lifetime when installing the policy.
2009-08-06 18:14:44 +02:00
Tobias Brunner
c3a78360a8
Fixed a race condition when querying stats of a child_sa in different order.
2009-08-06 16:47:32 +02:00
Tobias Brunner
dd83c6d490
Don't query the policy usetime if there was no traffic on the SA.
...
This helps in cases where a policy is assigned to more than one SA. That
is, SAs now should have different usetimes even if they use the same policy.
2009-08-06 15:14:54 +02:00
Tobias Brunner
b3f8ea8346
Reverted the interface changes introduced in 3f720dc7.
2009-08-06 13:31:54 +02:00
Tobias Brunner
1e7b4b0028
Reversed the check for udp.h, fixes compilation on Linux.
2009-08-06 10:01:59 +02:00
Tobias Brunner
7da1f4a0ff
Enabling UDP encapsulation via setsockopt fails on Mac OS X (it is also not required as this is done using sysctl).
2009-08-05 12:31:10 +02:00
Tobias Brunner
524f9ac470
FreeBSD only reports a policy's usetime if a lifetime has been specified when the policy was added (we only specify a lifetime on the SA, not on the policy).
2009-08-04 11:08:58 +02:00
Tobias Brunner
56ee8fcc96
FreeBSD and Mac OS X both set the sequence number of an SADB_X_SPDGET response to zero, we accept that for now.
2009-08-04 11:08:58 +02:00
Tobias Brunner
e8c3cdb25b
Missing check for udp.h added.
2009-08-04 11:08:57 +02:00
Tobias Brunner
eab05274f4
Handling of unsupported policy directions (FWD) fixed.
2009-07-30 14:06:26 +02:00
Tobias Brunner
e20bd8b6ea
Enabling NAT-T on Mac OS X using the private SADB_X_EXT_NATT flag and sadb_sa_2 struct.
2009-07-30 14:06:26 +02:00
Tobias Brunner
789ba17024
Configure the NAT-T port via sysctl on Mac OS X to enable handling of incoming UDP encapsulated ESP packets in the kernel.
2009-07-30 14:06:26 +02:00
Tobias Brunner
b2117eee20
Make accept(2) and recvfrom(2) cancellation points on Mac OS X.
2009-07-30 14:06:26 +02:00