aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* stroke: Dynamically resize stroke messagesTobias Brunner2015-05-223-287/+320
| | | | | | | The maximum size of a stroke message is currently 64k due to the 2 byte length field. Fixes #943.
* vici: Explicitly disable --user-install when installing Ruby GemTobias Brunner2015-05-211-1/+1
| | | | | | | | Only one of `--user-install` and `--install-dir` may be set and if `--user-install` is the default on a system installation will fail unless we disable it explicitly. Fixes #914.
* vici: Make installation of Ruby Gem and Python Egg optionalTobias Brunner2015-05-212-0/+4
| | | | | | | | | | | | | | | | | | Installing them might not work well when building distro packages (e.g. with DESTDIR installs). It might be easier to install them later with a script in the distro package. When building from source on the local system it could still be useful to install the packages directly, which can be enabled with separate configure options. The main problem with DESTDIR installations of the Python Egg is that easy_install creates or modifies a file called easy-install.pth in the installation directory. So it's not actually possible to simply copy the results in DESTDIR over to the actual system as that file would have to be merged with any existing one. Fixes #914.
* vici: Support out-of-tree build of Python EggTobias Brunner2015-05-211-5/+5
| | | | | | | We also don't require setup.py to exist during cleanup, as e.g. with make distcheck the source directory is not writable when the build directory is cleaned, so setup.py can't be created (to just get removed again anyway if VICI and the Python Eggs haven't been enabled previously).
* ikev1: When a reauth is detected explicitly delete the old IKE_SATobias Brunner2015-05-211-3/+13
| | | | | | | | | | | Instead of just implicitly destroying the old SA we properly delete it to notify the other peer (if the other peer keeps the SA up after the reauthentication and sends DPDs it might consider us dead even though the new SA is up, that seems to be the case with racoon). We delay the DELETE a bit to give the other peer time to get the new SA fully established. Since DELETE messages are not retransmitted it is still possible that the other peer misses that we deleted the SA.
* libipsec: Insert SAs first, so latest SA with the same reqid gets usedTobias Brunner2015-05-211-1/+1
| | | | | This was useful for testing purposes of RADIUS accounting, but OS kernels generally will use the latest SA, so we do the same.
* eap-radius: Keep track of stats for SAs migrated during IKEv1 reauthenticationTobias Brunner2015-05-211-88/+229
|
* ikev1: Trigger children_migrate event if CHILD_SAs are adoptedTobias Brunner2015-05-213-1/+12
|
* bus: Add new hook called when IKEv1 CHILD_SAs are migrated to a new IKE_SATobias Brunner2015-05-213-3/+58
| | | | | | The interface is currently not very nice, but if we ever were able to safely checkout multiple SAs concurrently we could add something similar to ike_rekey() and call that when we detect a reauthentication.
* eap-radius: Remove cache entries for expired SAs during ike/child_rekeyTobias Brunner2015-05-211-0/+53
|
* eap-radius: Add cache for usage stats of expired/rekeyed SAsTobias Brunner2015-05-211-6/+102
| | | | | | | | | | | | | There are several situations that the previous code didn't handle that well, for example, interim updates during rekeying (until the rekeyed SA was deleted the numbers were too high, then suddenly dropped afterwards), or rekeying for IKEv1 in general because rekeyed IPsec SAs stay installed until they expire (so if they were still around when the IKE_SA was terminated, the reported numbers in the Stop message were too high). If intermediate updates are not used the cache entries for rekeyed CHILD_SA will accumulate, we can't clean them up as we don't get child_updown() events for them.
* libradius: Verify message ID of RADIUS responsesTobias Brunner2015-05-211-35/+69
| | | | | | | | | | | If we sent retransmits for a message and didn't receive a response it might still arrive later. Such a message will be queued on the socket. The next read will then return not the expected response but the one for the earlier request. For this message the verification will fail and the message gets discarded. But with the earlier code the actual response was never received. Instead, a subsequent request resulted in the same failure and so on. Fixes #838.
* kernel-netlink: Ignore unusable routesTobias Brunner2015-05-211-0/+24
|
* kernel-netlink: Make buffer size for received Netlink messages configurableTobias Brunner2015-05-211-7/+11
|
* Exempt ignored PA-TNC attributes from error handlingAndreas Steffen2015-05-201-1/+8
|
* starter: Ensure the daemon executable exists when starting upTobias Brunner2015-05-083-18/+8
| | | | | | | | | The only purpose of starter is to control the IKE daemon, so we terminate it if the daemon executable is not found (e.g. because DAEMON_NAME is incorrect). This removes the charonstart setting (it was not actually configurable anymore).
* starter: Remove START_CHARON compile flagTobias Brunner2015-05-053-13/+2
| | | | | | Since the removal of pluto this is quite superfluous. The flag itself might be useful to avoid starting charon if the executable does not exist for some reason (e.g. if DAEMON_NAME is incorrect).
* charon-nm: Disable leak-detective in charon-nmTobias Brunner2015-05-051-0/+3
| | | | It segfaults immediately if it is enabled, at least on Ubuntu 14.04.
* child-create: Destroy nonceg in migrate()Tobias Brunner2015-05-051-1/+2
| | | | | Since another nonce gets allocated later (if any was allocated already) this would have resulted in a leaked nonce context ID when used in charon-tkm.
* child-create: Fix error handling if nonceg can't be createdTobias Brunner2015-05-051-14/+12
| | | | As with ike-init we can't return NULL in the task constructor.
* ike-init: Fix error handling if nonceg can't be createdTobias Brunner2015-05-051-13/+21
| | | | | | Returning FAILED in the constructor is wrong, but returning NULL doesn't work either as it's currently assumed tasks always can be created. Therefore, delay this check until we actually try to allocate a nonce.
* ike-init: Fix compiler warningTobias Brunner2015-05-051-2/+0
|
* swanctl: Fix --uri optionMartin Willi2015-05-051-9/+36
| | | | | | | As we now pass the vici connection to the command dispatcher callback, we can't parse the --uri option to create the connection from the same callback. Instead pre-process the common command options in a separate loop, and ignore the same options while processing the actual command.
* charon-tkm: Also store local SPI in SADAdrian-Ken Rueegsegger2015-05-044-27/+36
|
* ike-init: Make nonceg a member of ike_init structReto Buerki2015-05-041-20/+17
| | | | | | | This allows to control the life-cycle of a nonce in the context of the ike init task. In the TKM use-case the nonce generator cannot be destroyed before the ike init task is finalized, otherwise the created nonce is detected as stale.
* child-create: Make nonceg a member of child_create structReto Buerki2015-05-041-12/+16
| | | | | | | | This allows to control the life-cycle of a nonce in the context of the child create task. In the TKM use-case, it is required to reset the nonce context if the created nonce is not consumed. This happens if the child SA negotiation fails and it is detected before the SA is established via the TKM kernel plugin (i.e. rekey collision).
* charon-tkm: Reset stale nonce contextsReto Buerki2015-05-042-18/+30
| | | | | | | | | | | If the nonce generator detects a stale nonce upon destroy(), it resets the context in the TKM and releases associated resources in the ID manager and chunk map. Also, do not acquire the nonce context ID in tkm_nonceg_create function but rather when the nonce is actually created by get_nonce(). The nonces created with get_nonce must also be registered in the chunk map.
* charon-tkm: Drop unneeded nonceg get_id functionReto Buerki2015-05-043-16/+0
|
* charon-tkm: Remove ESA nonce mappings from chunk mapAdrian-Ken Rueegsegger2015-05-041-0/+2
|
* charon-tkm: Drop obsolete TKM_LIMIT defineReto Buerki2015-05-041-2/+0
|
* charon-tkm: Select other ESA if any is present upon deletionAdrian-Ken Rueegsegger2015-05-041-1/+12
| | | | | In the case that multiple ESAs exist (e.g. rekey collision) for a security policy, make sure to select one of the remaining ESAs.
* charon-tkm: Add get_other_esa_id function to TKM kernel SADAdrian-Ken Rueegsegger2015-05-043-0/+103
| | | | | The function gets the ESA id for another entry associated with the same security policy as the specified ESA.
* charon-tkm: Only skip creation of first child SAAdrian-Ken Rueegsegger2015-05-041-0/+9
| | | | | | Use the new is_first boolean parameter of the ALERT_KEEP_ON_CHILD_SA_FAILURE alert to determine if the failure was caused by the first CHILD SA.
* Add bool param to ALERT_KEEP_ON_CHILD_SA_FAILURE alertAdrian-Ken Rueegsegger2015-05-042-3/+8
| | | | | The parameter indicates if the alert is raised upon failure to establish the first CHILD SA of an IKE SA.
* charon-tkm: Fix SAD insertion when adding ESAAdrian-Ken Rueegsegger2015-05-041-1/+1
| | | | | Commit f5fc592 added the reqid to the SAD. The insert call swapped the order of the esa_id and reqid parameters.
* vici: Default to certificate subject for identityTimo Teräs2015-05-041-0/+37
| | | | | | | | If id is not specified and certificate authentication is used, use the certificate subject name as identity. Simplifies configuration as in most cases this is the right thing to do. Signed-off-by: Timo Teräs <timo.teras@iki.fi>
* swanctl: Implement monitoring of IKE_SA and CHILD_SA changesTimo Teräs2015-05-042-2/+84
| | | | Signed-off-by: Timo Teräs <timo.teras@iki.fi>
* vici: Add support for ike_sa and child_sa updown notificationsTimo Teräs2015-05-043-0/+137
| | | | | | Useful for monitoring and management purposes. Signed-off-by: Timo Teräs <timo.teras@iki.fi>
* vici: Add function to test if an event should be generatedTimo Teräs2015-05-042-0/+74
| | | | | | | Useful to avoid generating vici messages if they are not needed and their generation is heavy operation. Signed-off-by: Timo Teräs <timo.teras@iki.fi>
* swanctl: Add missing unit in install-time logRomain Francoise2015-05-041-1/+1
|
* imv_policy_manager: Added capability to execute an allow or block shell ↵Andreas Steffen2015-04-261-1/+21
| | | | command string
* Fixed PB-TNC directionality debug messageAndreas Steffen2015-04-241-1/+1
|
* ike-vendor: Add some Microsoft vendor IDsTobias Brunner2015-04-211-0/+10
|
* leak-detective: Use passed callback to report leaksTobias Brunner2015-04-201-2/+2
| | | | | | | | This prevented `stroke memusage` from reporting the leaks on the console. Instead, they were sent to the callbacks set up by libstrongswan. Fixes a426851f6362 ("leak-detective: Use callback functions to report leaks and usage information").
* openssl: Don't refer to EVP_des_ecb() if OpenSSL is built without DES supportTobias Brunner2015-04-171-0/+2
| | | | | | While DES-ECB is not registered by the plugin in this case (so the function will never actually be called), the compiler still warns about the implicitly declared function.
* strerror: Move to its own Doxygen subgroupMartin Willi2015-04-161-1/+2
|
* utils: Clean up includesMartin Willi2015-04-162-36/+31
|
* align: Move min/max/padding/alignment functions to separate filesMartin Willi2015-04-166-109/+154
|
* time: Move time related functions to separate filesMartin Willi2015-04-166-191/+238
|
* object: Move OO programming helper macros to a separate header fileMartin Willi2015-04-163-107/+128
|