From: Martin Willi Date: Mon, 3 Nov 2014 08:38:27 +0000 (+0100) Subject: child-sa: Introduce a CHILD_RETRYING state to detect DH group retries X-Git-Tag: 5.2.2dr1~33 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=013857ad7956fa5f38614bea8b08e05cd23a47d7;p=thirdparty%2Fstrongswan.git child-sa: Introduce a CHILD_RETRYING state to detect DH group retries --- diff --git a/src/libcharon/sa/child_sa.c b/src/libcharon/sa/child_sa.c index a96ab4e907..66be5fe619 100644 --- a/src/libcharon/sa/child_sa.c +++ b/src/libcharon/sa/child_sa.c @@ -34,6 +34,7 @@ ENUM(child_sa_state_names, CHILD_CREATED, CHILD_DESTROYING, "INSTALLED", "UPDATING", "REKEYING", + "RETRYING", "DELETING", "DESTROYING", ); diff --git a/src/libcharon/sa/child_sa.h b/src/libcharon/sa/child_sa.h index a0c6c357f8..30a0edf421 100644 --- a/src/libcharon/sa/child_sa.h +++ b/src/libcharon/sa/child_sa.h @@ -67,6 +67,11 @@ enum child_sa_state_t { */ CHILD_REKEYING, + /** + * CHILD_SA negotiation failed, but gets retried + */ + CHILD_RETRYING, + /** * CHILD_SA in progress of delete */ diff --git a/src/libcharon/sa/ikev2/tasks/child_create.c b/src/libcharon/sa/ikev2/tasks/child_create.c index a1f01c276f..e7a9148757 100644 --- a/src/libcharon/sa/ikev2/tasks/child_create.c +++ b/src/libcharon/sa/ikev2/tasks/child_create.c @@ -1408,6 +1408,7 @@ METHOD(task_t, process_i, status_t, this->dh_group, diffie_hellman_group_names, group); this->retry = TRUE; this->dh_group = group; + this->child_sa->set_state(this->child_sa, CHILD_RETRYING); this->public.task.migrate(&this->public.task, this->ike_sa); enumerator->destroy(enumerator); return NEED_MORE;