aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcharon/sa/ikev2
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2016-05-19 15:06:27 +0200
committerTobias Brunner <tobias@strongswan.org>2016-06-17 18:48:02 +0200
commitb7b414463d7448f7fbac5537694b298baedf9b47 (patch)
tree935ab8c09cbb93af2c38f231f4b334e808b446eb /src/libcharon/sa/ikev2
parentfa098aa97c444e6d1631155a94bf04fecbdd082e (diff)
downloadstrongswan-b7b414463d7448f7fbac5537694b298baedf9b47.tar.bz2
strongswan-b7b414463d7448f7fbac5537694b298baedf9b47.tar.xz
child-create: Handle TEMPORARY_FAILURE notify as failure
We will later add code to retry creating the CHILD_SA if we are not rekeying. Rekeying is already rescheduled as with any other errors.
Diffstat (limited to 'src/libcharon/sa/ikev2')
-rw-r--r--src/libcharon/sa/ikev2/tasks/child_create.c1
-rw-r--r--src/libcharon/sa/ikev2/tasks/child_rekey.c8
2 files changed, 5 insertions, 4 deletions
diff --git a/src/libcharon/sa/ikev2/tasks/child_create.c b/src/libcharon/sa/ikev2/tasks/child_create.c
index 326993885..ea56e161e 100644
--- a/src/libcharon/sa/ikev2/tasks/child_create.c
+++ b/src/libcharon/sa/ikev2/tasks/child_create.c
@@ -1432,6 +1432,7 @@ METHOD(task_t, process_i, status_t,
case FAILED_CP_REQUIRED:
case TS_UNACCEPTABLE:
case INVALID_SELECTORS:
+ case TEMPORARY_FAILURE:
{
DBG1(DBG_IKE, "received %N notify, no CHILD_SA built",
notify_type_names, type);
diff --git a/src/libcharon/sa/ikev2/tasks/child_rekey.c b/src/libcharon/sa/ikev2/tasks/child_rekey.c
index 17b812e91..66bd3b4be 100644
--- a/src/libcharon/sa/ikev2/tasks/child_rekey.c
+++ b/src/libcharon/sa/ikev2/tasks/child_rekey.c
@@ -346,10 +346,10 @@ METHOD(task_t, process_i, status_t,
}
if (message->get_payload(message, PLV2_SECURITY_ASSOCIATION) == NULL)
{
- /* establishing new child failed, reuse old. but not when we
- * received a delete in the meantime */
- if (!(this->collision &&
- this->collision->get_type(this->collision) == TASK_CHILD_DELETE))
+ /* establishing new child failed, reuse old and try again. but not when
+ * we received a delete in the meantime */
+ if (!this->collision ||
+ this->collision->get_type(this->collision) != TASK_CHILD_DELETE)
{
schedule_delayed_rekey(this);
}