Commit Graph

56 Commits

Author SHA1 Message Date
Thomas Egerer eed20c21d3 ha: Add auth method for HA IKEv1 key derivation
Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
2018-12-07 10:17:56 +01:00
Tobias Brunner 1b67166921 Unify format of HSR copyright statements 2018-05-23 16:32:53 +02:00
Tobias Brunner 4989aba822 child-sa: Change API used to set/install policies
This way we only have to pass the traffic selectors once.
2017-05-23 18:41:31 +02:00
Andreas Steffen b12c53ce77 Use standard unsigned integer types 2016-03-24 18:52:48 +01:00
Tobias Brunner b5c2ed5016 ha: Add DH group to CHILD_ADD message
References #1267.
2016-02-01 10:50:53 +01:00
Tobias Brunner f1e908837a ha: Add DH group to IKE_ADD message
It is required for IKEv1 to determine the DH group of the CHILD SAs
during rekeying. It also fixes the status output for HA SAs, which so
far haven't shown the DH group on the passive side.

Fixes #1267.
2016-02-01 10:50:41 +01:00
Tobias Brunner ebeb8c87c5 traffic-selector: Don't end printf'ed list of traffic selectors with a space 2015-11-10 12:13:06 +01:00
Tobias Brunner a7f381ef00 ha: Properly initialize algo variables when installing CHILD_SAs
If AEAD algorithms are used no integrity algorithm will be received from
the other HA node.  But since AUTH_UNDEFINED is 1024 and not 0 this value
was incorrectly added to the proposal, resulting in a failure during key
derivation.  The variables are now explicitly initialized to 0, as already
was the case for the IKE SAs.

Fixes #1051.
2015-08-04 11:23:27 +02:00
Thomas Egerer 3434709460 ha: Sync remote address in HA_IKE_ADD, too
When the IKE_SA is synced without the remote address, after a
reauthentication charon is not able to find it in its connected_peers
table since the destination host will be %any (it's missing in the
message, hence the default from the newly created ike_sa_t -- %any --
will be used).
By adding the value to the HA_IKE_ADD message, we should be able to
solve this problem.

Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
2015-08-04 11:21:54 +02:00
Martin Willi 42431690e0 diffie-hellman: Add a bool return value to get_my_public_value() 2015-03-23 17:54:03 +01:00
Martin Willi bace1d6479 diffie-hellman: Use bool instead of status_t as get_shared_secret() return value
While such a change is not unproblematic, keeping status_t makes the API
inconsistent once we introduce return values for the public value operations.
2015-03-23 17:54:02 +01:00
Martin Willi 438318c6c3 ha: Destroy synced IKE_SA if no configuration is found during update 2015-03-10 15:08:58 +01:00
Martin Willi 8be21ae7ef Revert "ha: Always install the CHILD_SAs with the inbound flag set to FALSE"
While this change results in the correct add/update flag during installation,
it exchanges all other values in the child_sa->install() call. We should pass
the correct flag, but determine the add/update flag by other means.

This reverts commit e722ee5d.
2015-03-09 18:18:20 +01:00
Martin Willi e722ee5df8 ha: Always install the CHILD_SAs with the inbound flag set to FALSE
The inbound flag is used to determine if we have to install an update or a new
SA in the kernel. As we do not have allocated SPIs and therefore can't update
an existing SA in the HA plugin, always set the flag to FALSE.

Before 698ed656 we had extra logic for that case, but handling it directly in
the HA plugin is simpler.
2015-02-27 10:58:32 +01:00
Martin Willi 246c969d8b ike: Consistently log CHILD_SAs with their unique_id instead of their reqid 2015-02-20 13:34:52 +01:00
Martin Willi 85b238887d child-sa: Replace reqid based marks by "unique" marks
As we now use the same reqid for multiple CHILD_SAs with the same selectors,
having marks based on the reqid makes not that much sense anymore. Instead we
use unique marks that use a custom identifier. This identifier is reused during
rekeying, keeping the marks constant for any rule relying on it (for example
installed by updown).

This also simplifies handling of reqid allocation, as we do not have to query
the marks that is not yet assigned for an unknown reqid.
2015-02-20 13:34:49 +01:00
Martin Willi e1c7e1bc1f ha: Don't adopt IKEv1 children when building without IKEv1 support
The adopt_children_job_create() function is not available when IKEv1 support
is disabled. Fixes uncommon builds using --enable-ha --disable-ikev1.

Fixes #690.
2014-08-28 10:19:57 +02:00
Martin Willi 713a1122b4 ikev2: Add inherit_pre() to apply config and hosts before IKE_SA rekeying 2014-04-17 09:24:51 +02:00
Tobias Brunner 44fb978169 ha: Fix CHILD_SA installation in ha_dispatcher after adding initiator flag 2013-06-13 13:17:55 +02:00
Tobias Brunner d2e8f20d94 Clear virtual IPs before storing assigned ones on the IKE_SA
Otherwise we'll end up with duplicate or invalid VIPs stored on the
IKE_SA.
2012-09-05 14:35:57 +02:00
Martin Willi 497ce2cf51 Support multiple address pools configured on a peer_cfg 2012-08-30 16:43:42 +02:00
Martin Willi 101d26babe Support multiple virtual IPs on peer_cfg and ike_sa classes 2012-08-30 16:43:42 +02:00
Martin Willi e185612dd8 Add a return value to keymat_v1_t.{get,update,confirm}_iv 2012-07-16 14:55:06 +02:00
Tobias Brunner 26d77eb3e6 Centralized thread cancellation in processor_t
This ensures that no threads are active when plugins and the rest of the
daemon are unloaded.

callback_job_t was simplified a lot in the process as its main
functionality is now contained in processor_t.  The parent-child
relationships were abandoned as these were only needed to simplify job
cancellation.
2012-06-25 17:38:59 +02:00
Martin Willi b1f2f05c92 Merge branch 'ikev1-clean' into ikev1-master
Conflicts:
	configure.in
	man/ipsec.conf.5.in
	src/libcharon/daemon.c
	src/libcharon/plugins/eap_ttls/eap_ttls_peer.c
	src/libcharon/plugins/eap_radius/eap_radius_accounting.c
	src/libcharon/plugins/eap_radius/eap_radius_forward.c
	src/libcharon/plugins/farp/farp_listener.c
	src/libcharon/sa/ike_sa.c
	src/libcharon/sa/keymat.c
	src/libcharon/sa/task_manager.c
	src/libcharon/sa/trap_manager.c
	src/libstrongswan/plugins/x509/x509_cert.c
	src/libstrongswan/utils.h

Applied lost changes of moved files keymat.c and task_manager.c.
Updated listener_t.message hook signature in new plugins.
2012-03-20 17:57:53 +01:00
Martin Willi aa3b53e716 Adopt children after syncing a rekeyed IKEv1 SA 2012-03-20 17:31:38 +01:00
Martin Willi 868d92a402 Sync new IKE_SA condition/extension flags 2012-03-20 17:31:37 +01:00
Martin Willi c8531b7e69 Added support for Phase1 IV synchronization to HA plugin 2012-03-20 17:31:37 +01:00
Martin Willi ae92641806 Create IKEv1 keymat hasher explicitly on sync 2012-03-20 17:31:37 +01:00
Martin Willi 8bcd9bd161 Added support to sync IKEv1 SAs key material in HA plugin 2012-03-20 17:31:37 +01:00
Martin Willi 264514826c Use a more complete implementation of a HA specific diffie_hellman_t 2012-03-20 17:31:37 +01:00
Martin Willi c3f1839ab7 Apply proposal to a HA synced IKE_SA 2012-03-20 17:31:37 +01:00
Martin Willi 6bc6f67b0f Updated HA plugin to new IKEv2 specific keymat functions 2012-03-20 17:31:37 +01:00
Martin Willi 17ec1c74de Don't compare initiator flag in IKE_SA manager, pass initiator parameter to IKE_SA constructor 2012-03-20 17:30:47 +01:00
Tobias Brunner 0b611540ef Store IKE version of an SA on ike_sa_t. 2012-03-20 17:30:43 +01:00
Tobias Brunner cd6b5bf8e9 Clear peer addresses during HA update. 2012-03-09 10:30:37 +01:00
Tobias Brunner 94bbc60256 Renamed list of additional peer addresses as it now stores all known addresses. 2012-03-09 10:17:42 +01:00
Martin Willi f54bcf35af Sync newer IKE_SA condition/extension flags in ha plugin 2011-08-19 09:16:16 +02:00
Martin Willi 14bf2f689d Use CRITICAL job priority class for long running dispatcher jobs 2011-05-16 15:24:15 +02:00
Martin Willi 98788537be Synchronize ESN support in HA plugin 2011-04-20 12:26:58 +02:00
Andreas Steffen 1c7a729100 set tfcv3 flag TRUE in ha_dispatcher 2010-12-26 23:10:57 +01:00
Martin Willi bb16217581 Store proposal number in proposal_t to reuse it in the selected proposal
According to RFC 5996 3.3.1, we MUST reuse the proposal number of
the selected proposal in the SA payload reply.
2010-10-28 15:08:14 +02:00
Tobias Brunner bb381e26c6 Refer to scheduler and processor via lib and not hydra. 2010-09-02 19:04:18 +02:00
Tobias Brunner c5f7146b17 Refer to processor via hydra and not charon. 2010-09-02 19:01:22 +02:00
Martin Willi 98d0343870 Implemented a HA enabled in-memory address pool 2010-07-28 10:06:19 +02:00
Martin Willi c03b64a4ac Reserving does not work, as our pools do not support acquiring arbitrary addresses
This reverts commit d1384080b3.
2010-07-27 12:05:39 +02:00
Martin Willi fa4f71c819 Synchronize EAP-Identity of remote peer 2010-07-26 15:10:54 +02:00
Martin Willi d1384080b3 Reserve virtual IP of passive IKE_SAs in the local pool 2010-07-26 15:01:24 +02:00
Martin Willi 08e266a119 Log CHILD_SA segment responsibility 2010-07-26 13:53:54 +02:00
Martin Willi 3e6736f67e Pass initiator parameter to distinguish between original and exchange initiator 2010-07-26 13:53:53 +02:00