Commit Graph

1763 Commits

Author SHA1 Message Date
Martin Willi 9d2968e272 As a responder, don't start a TRANSACTION request if we expect one from the initiator 2012-06-29 13:40:31 +02:00
Andreas Steffen 5f451f2d6a IMCs and IMVs might depend on X.509 certificates or trusted public keys 2012-06-28 17:55:02 +02:00
Martin Willi 0f018a7324 Show some uname() info in "ipsec statusall" 2012-06-28 11:56:40 +02:00
Tobias Brunner bd858af851 libcharon also requires kernel interfaces and a socket implementation 2012-06-27 12:15:09 +02:00
Martin Willi 271377905d Defer quick mode initiation if we expect a mode config request 2012-06-27 11:42:56 +02:00
Martin Willi 8ff45cfd99 Queue a mode config task as responder if we need a virtual IP 2012-06-27 11:42:56 +02:00
Martin Willi c2a391746c Add basic support for XAuth responder authentication 2012-06-27 11:42:56 +02:00
Martin Willi a9aa75b90e Map XAuth responder authentication methods between IKEv1 and IKEv2 2012-06-27 11:42:56 +02:00
Martin Willi dc6d259635 Show remote EAP/XAuth identity in "statusall" on a separate line 2012-06-27 11:42:00 +02:00
Tobias Brunner aa54ecef44 Use static plugin features in libcharon to define essential dependencies 2012-06-27 11:31:16 +02:00
Martin Willi 5def45b890 Ignore a received %any virtual IP for installation 2012-06-26 18:00:40 +02:00
Tobias Brunner 9866c26c5b Also build charon's IKEv1 implementation on Android 2012-06-26 07:56:15 +02:00
Tobias Brunner 8497c5d147 Missing source file added to libcharon's Android.mk 2012-06-26 07:56:15 +02:00
Tobias Brunner e0efd7c121 Make rescheduling a job more predictable
This avoids race conditions between calls to cancel() and jobs that like
to be rescheduled.  If jobs were able to reschedule themselves it would
theoretically be possible that two worker threads have the same job
assigned (the one currently executing the job and the one executing the
same but rescheduled job if it already is time to execute it), this means
that cancel() could be called twice for that job.

Creating a new job based on the current one and reschedule that is also
OK, but rescheduling itself is more efficient for jobs that need to be
executed often.
2012-06-25 17:49:12 +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
Tobias Brunner 7fec83af28 Give processor_t more control over the lifecycle of a job
Jobs are now destroyed by the processor, but they are allowed to
reschedule themselves.  That is, parts of the reschedule functionality
already provided by callback_job_t is moved to the processor.  Not yet
fully supported is JOB_REQUEUE_DIRECT and canceling jobs.

Note: job_t.destroy() is now called not only for queued jobs but also
after execution or cancellation of jobs.  job_t.status can be used to
decide what to do in said method.
2012-06-25 17:10:28 +02:00
Andreas Steffen 554a697a84 support Cisco Unity VID 2012-06-25 11:09:06 +02:00
Martin Willi 0ba1ddaa24 Enforce uniqueids=keep based on XAuth identity 2012-06-25 10:18:35 +02:00
Martin Willi f145ea29e0 Don't send XAUTH_OK if a hook prevents SA to establish 2012-06-25 10:18:35 +02:00
Martin Willi 0c32b9c62f Enforce uniqueids=keep only for non-XAuth Main/Agressive Modes 2012-06-25 10:18:35 +02:00
Martin Willi dd1381e7d3 Show EAP/XAuth identity in "ipsec status", if available 2012-06-25 10:18:35 +02:00
Martin Willi 0fbfcf2a3a Use XAuth/EAP remote identity for uniqueness check 2012-06-25 10:18:34 +02:00
Martin Willi de5e8fb4e0 Add missing XAuth name variable when complaining about missing XAuth backend 2012-06-25 10:09:27 +02:00
Tobias Brunner e91157a4b6 Fix SIGSEGV if kernel install fails during Quick Mode as responder. 2012-06-22 11:34:38 +02:00
Tobias Brunner aa8898bc45 Fixed compile error because of charon->name in certexpire plugin. 2012-06-21 13:59:18 +02:00
Martin Willi e2dd114f37 Select requested virtual IP family based on remote TS, if no local TS available 2012-06-20 10:02:01 +02:00
Martin Willi af518b450e Adopt children as XAuth initiator (which is IKE responder) 2012-06-14 14:49:19 +02:00
Martin Willi 137035cc78 Show what kind of *Swan we run in "ipsec status" 2012-06-14 10:25:48 +02:00
Martin Willi b31a56f128 Require a scary option to respond to Aggressive Mode PSK requests
While Aggressive Mode PSK is widely used, it is known to be subject
to dictionary attacks by passive attackers. We don't complain as
initiator to be compatible with existing (insecure) setups, but
require a scary strongswan.conf option if someone wants to use it
as responder.
2012-06-14 10:25:48 +02:00
Tobias Brunner f7cbc0fafe Use proper defines for IPV6_PKTINFO on Mac OS X Lion and newer. 2012-06-13 15:02:10 +02:00
Martin Willi e35bbb9740 Added signature scheme options left/rightauth 2012-06-12 15:01:39 +02:00
Martin Willi a37f2d2006 certificate_t->issued_by takes an argument to receive signature scheme 2012-06-12 14:24:49 +02:00
Andreas Steffen fd03443f42 added missing parameter in get_my_addr() and get_other_addr() calls 2012-06-09 14:06:45 +02:00
Andreas Steffen 1d315bddd3 implemented the right|leftallowany feature 2012-06-08 21:24:41 +02:00
Martin Willi e5f0f9ff96 Enforce uniqueness policy in IKEv1 main and aggressive modes 2012-06-08 16:15:22 +02:00
Martin Willi 82ad53b776 Try to rekey without KE exchange if peer returns INVALID_KE_PAYLOAD(NONE)
According to RFC5996, implementations should just ignore the KE payload
if they select a non-PFS proposals. Some implementations don't, but
return MODP_NONE in INVALID_KE_PAYLOAD, hence we accept that, too.
2012-06-08 10:35:02 +02:00
Martin Willi 2d4c347af9 While checking for redundant quick modes, compare traffic selectors
If a configuration is instanced more than once using narrowing,
we should keep all unique quick modes up during rekeying.
2012-06-08 10:22:03 +02:00
Martin Willi 106b938b6b Store shorter soft lifetime of in- and outbound SAs only 2012-06-08 10:22:03 +02:00
Martin Willi 7a5f372c57 Initiate quick mode rekeying with narrowed traffic selectors 2012-06-08 10:22:03 +02:00
Martin Willi d61f2906d4 Use traffic selectors passed to quick mode constructor as initiator 2012-06-08 10:22:03 +02:00
Martin Willi 1e24fa4614 Instead of rekeying, delete a quick mode if we have a fresher instance
If both peers initiate quick mode rekeying simultaneously, we end up
with duplicate SAs for a configuration. This can't be avoided, nor do
the standards provide an appropriate solution. Instead of closing one
SA immediately, we keep both. But once rekeying triggers, we don't
refresh the SA with the shorter soft lifetime, but delete it.
2012-06-08 10:22:03 +02:00
Martin Willi ab24a32edf As responder, enforce the same configuration while rekeying CHILD_SAs 2012-06-06 16:06:49 +02:00
Martin Willi 21043198ff Show expiration time of rekeyed CHILD_SAs in statusall 2012-06-05 10:29:43 +02:00
Tobias Brunner c8f7a114b6 Mark CHILD_SAs used for trap policies to uninstall them properly.
If the installation failed the state is not CHILD_ROUTED which means the
wrong priority is used to uninstall the policies.  This is a problem for
kernel interfaces that keep track of installed policies as now the proper
policy is not found (if the priority is considered).
2012-06-04 18:04:48 +02:00
Tobias Brunner 77e4282643 Avoid queueing more than one retry initiate job. 2012-05-30 15:32:52 +02:00
Tobias Brunner 60c82591c5 Retry IKE_SA initiation if DNS resolution failed.
This is disabled by default and can be enabled with the
charon.retry_initiate_interval option in strongswan.conf.
2012-05-30 15:32:52 +02:00
Tobias Brunner eac9d77059 Job added to re-initiate an IKE_SA. 2012-05-30 15:32:52 +02:00
Tobias Brunner 53915f14ae Fix MOBIKE address update if responder address changed.
Use the source address of the current MOBIKE message as peer address
instead of assuming the address cached on the IKE_SA is still valid.
2012-05-25 17:05:53 +02:00
Tobias Brunner a46fe56858 Resolve hosts before reauthenticating due to address change. 2012-05-25 17:05:53 +02:00
Tobias Brunner c6da59f014 Don't queue delete_ike_sa job when setting IKE_DELETING.
This avoids deleting IKE_SAs during reauthentication (without
trying to reestablish them).
2012-05-25 17:05:53 +02:00