Commit Graph

13377 Commits

Author SHA1 Message Date
Martin Willi b2f76c514d systemd: Check if ./configure detected a systemd system unit directory 2014-09-22 14:19:38 +02:00
Martin Willi db8ae75bf6 systemd: Discover and check systemd libraries with pkg-config during configure 2014-09-22 14:19:38 +02:00
Martin Willi e2d9f27c19 systemd: Add a native systemd journal logger 2014-09-22 14:19:37 +02:00
Martin Willi 5421092b75 plugin-loader: Support a reload() callback for static features 2014-09-22 13:55:12 +02:00
Martin Willi 73ed38e74f systemd: Provide a charon-systemd daemon targeting full systemd integration 2014-09-22 13:55:11 +02:00
Martin Willi d9a2f1330a swanctl: Complete --load-creds command summary 2014-09-22 13:55:11 +02:00
Martin Willi 71d85b33d9 swanctl: Fix description of load-pools command summary 2014-09-22 13:55:11 +02:00
Martin Willi 67402e67af swanctl: Add a --load-all command, performing --load-{creds,pools,conns} 2014-09-22 13:55:11 +02:00
Martin Willi 214a859cd6 swanctl: Add a --reload-settings command 2014-09-22 13:55:11 +02:00
Martin Willi 455e213cb0 vici: Add a command to reload strongswan.conf 2014-09-22 13:44:27 +02:00
Martin Willi 2dee0a85a6 encoding: Accept all exchange types for non IKEv1/IKEv2 major versions 2014-09-22 13:42:11 +02:00
Martin Willi d8ad0fc351 settings: Make loading a NULL or empty pattern a (nop-)success 2014-09-22 13:40:39 +02:00
Martin Willi 68da3bad57 settings: Use strongswan.conf used during library initialization for reload
Since 4b670a20 we require an explicit strongswan.conf to re-load configurations.
However, the define was missing in the build, breaking SIGHUP based config
reloading.

Fixes #651.
2014-09-22 13:40:39 +02:00
Martin Willi 9e783f6e89 library: Store the used root strongswan.conf configuration 2014-09-22 13:40:39 +02:00
Tobias Brunner 0bf2abf182 testing: Use multiple jobs to install strongSwan 2014-09-19 13:37:59 +02:00
Tobias Brunner 82136aa2cf testing: Add a script to build the current (or an arbitrary) source tree
This allows to (relatively) quickly (re-)build and install the current
or an arbitrary strongSwan source tree within the root image.

bindfs is used to bind mount the source directory using the regular user
and group (only works if sudo is used to run the script) so that newly
created files are not owned by root.

As with building the root image in general the guests must not be
running while executing this script.  The guest images are automatically
rebuilt after the root image has been updated so configuration files and
other modifications in guests will be lost.
2014-09-19 13:37:59 +02:00
Tobias Brunner f376503f41 testing: Add packages to rebuild strongSwan from the repository 2014-09-19 13:37:59 +02:00
Tobias Brunner ffcf8f4ea2 testing: Make strongSwan build recipe more configurable 2014-09-19 13:37:59 +02:00
Tobias Brunner bc9acd7b9e swanctl: Document --stats command 2014-09-19 11:30:08 +02:00
Reto Buerki e0d59e10f8 testing: Update certs and keys in tkm tests
References #705.
2014-09-17 17:08:35 +02:00
Reto Buerki 1004d395f5 testing: Update x509-ada version to 0.1.1
Fixes #705.
2014-09-17 17:07:29 +02:00
Tobias Brunner 22949c590f ikev2: Don't treat initial messages as MOBIKE exchanges
The MOBIKE task is active during the initial exchanges but we don't want
to treat them as actual MOBIKE exchanges (i.e. there is no path probing).
2014-09-16 15:05:12 +02:00
Tobias Brunner 8a6b01dd2a ikev1: Don't cache last block of INFORMATIONAL messages as IV
We don't expect a response with the same MID, but apparently some
devices (e.g. FRITZ!Box) do that for DPDs, while still treating the
response as a new exchange.  By storing the last message block as IV
we can't decrypt the first block of such a response.

Fixes #661.
2014-09-12 13:56:18 +02:00
Tobias Brunner 2e62f51bcc ikev1: Log IV when encrypting messages 2014-09-12 13:56:17 +02:00
Tobias Brunner 2f7fef569b ikev1: Skip unusable IPComp proposals
Fixes #661.
2014-09-12 13:56:06 +02:00
Tobias Brunner 84337ac8d0 ikev1: Properly handle different proposal numbering schemes
While the examples in RFC 2408 show proposal numbers starting at 1 and
increasing by one for each subsequent proposal this is not mandatory.
Actually, IKEv1 proposals may start at any number, the only requirement
is that the proposal numbers increase monotonically they don't have to
do so consecutively.

Most implementations follow the examples and start numbering at 1 (charon,
racoon, Shrew, Cisco, Windows XP, FRITZ!Box) but pluto was one of the
implementations that started with 0 and there might be others out there.

The previous assumption that implementations always start numbering proposals
at 0 caused problems with clients that start numbering with 1 and whose first
proposal consists of multiple protocols (e.g. ESP+IPComp).

Fixes #661.
2014-09-12 13:55:00 +02:00
Tobias Brunner 90e6675a65 kernel-netlink: Optionally install protocol and ports on transport mode SAs 2014-09-12 10:45:50 +02:00
Tobias Brunner 5dec7d2f9d Merge branch 'mobike-fixes'
These changes improve the handling of MOBIKE tasks, for instance, when
retransmitting and no path is available.

Fixes #632.
2014-09-12 10:40:07 +02:00
Tobias Brunner acd69fc291 ikev2: Reduce timeout if path probing was enabled 2014-09-12 10:29:37 +02:00
Tobias Brunner de6ab8e85a ikev2: Defer MOBIKE updates if no path is available 2014-09-12 10:29:37 +02:00
Tobias Brunner 8956dcecd4 ike-mobike: Allow calling transmit() even when not currently path probing
Path probing is enabled if the current path is not available anymore.
2014-09-12 10:29:37 +02:00
Tobias Brunner 10bad0fc23 ikev2: Defer path probing if no path is currently available
We do the same before initiating the task, so we should probably do it
too when we already initiated it, not just time out and destroy the SA.
2014-09-12 10:29:37 +02:00
Tobias Brunner 7840952edc ike-mobike: Return FALSE in transmit() if no path was available 2014-09-12 10:29:36 +02:00
Tobias Brunner 1b17f647a5 ikev2: Enable path probing for currently active MOBIKE task
This might not be the case if e.g. an address appeared but the old one
is still available but not actually usable.  Without this the MOBIKE
task would eventually time out even though we might be able to switch
to a working address.
2014-09-12 10:29:36 +02:00
Tobias Brunner 2180ace937 ike-mobike: Add method to enable path probing 2014-09-12 10:29:36 +02:00
Tobias Brunner c5a5bc85d9 ike-mobike: Skip peer addresses we can't send packets to when checking paths 2014-09-12 10:29:36 +02:00
Tobias Brunner ff60134157 ikev2: Skip peer addresses we can't send packets to when looking for valid paths 2014-09-12 10:29:36 +02:00
Tobias Brunner 3293d14628 ikev2: Insert MOBIKE tasks at the front of the queue
In case we have no usable path to the other peer there is no point in
initiating any other tasks (like rekeying).
2014-09-12 10:29:36 +02:00
Tobias Brunner 40164bbe27 ikev2: Migrate number of pending MOBIKE updates
This will probably never be more than 1 since we only have one task queued
at a time and we don't migrate running tasks.
2014-09-12 10:29:36 +02:00
Tobias Brunner 03f61ba3d5 ikev2: Properly keep track of pending MOBIKE updates
Because we only queue one MOBIKE task at a time, but destroy superfluous
ones only after we already increased the counter for pending MOBIKE updates,
we have to reduce the counter when such tasks are destroyed.  Otherwise, the
queued task would assume another task is queued when it is running and
ignore any successful response.
2014-09-12 10:29:36 +02:00
Tobias Brunner f640af5b7a Merge branch 'android-pfs'
Changes how CHILD_SA rekeying errors are handled in the Android app and adds
CHILD_SA proposals with DH groups.
2014-09-12 10:24:48 +02:00
Tobias Brunner f9ceb5b543 android: Reduce CHILD_SA lifetime 2014-09-12 10:21:50 +02:00
Tobias Brunner 1fe3b02838 android: Add DH groups to ESP proposals 2014-09-12 10:21:49 +02:00
Tobias Brunner f92399ef18 child-cfg: Ignore duplicate proposals
If ESP proposals are added once with and once without DH groups
duplicates result during IKE_AUTH when DH groups are stripped.
2014-09-12 10:18:14 +02:00
Tobias Brunner 8e52dc2733 proposal: Fix equals() 2014-09-12 10:18:13 +02:00
Tobias Brunner ac1b3a6ddd android: Reestablish IKE_SA if CHILD_SA rekeying failed 2014-09-12 10:18:13 +02:00
Tobias Brunner a39c28bb35 android: Report error if CHILD_SA rekeying fails 2014-09-12 10:18:13 +02:00
Tobias Brunner 47a0e289d9 kernel-netlink: Add global option to configure MSS-clamping on installed routes 2014-09-12 10:13:30 +02:00
Tobias Brunner c1adf7e0c4 kernel-netlink: Add global option to set MTU on installed routes 2014-09-12 10:13:30 +02:00
Tobias Brunner c6e8b5dc2c chunk: Fix Doxygen comments for chunk_internet_checksum[_inc] 2014-09-11 17:56:12 +02:00