child-sa: Introduce a CHILD_RETRYING state to detect DH group retries

This commit is contained in:
Martin Willi
2014-11-21 12:51:19 +01:00
parent f6f3b0db11
commit 013857ad79
3 changed files with 7 additions and 0 deletions
+1
View File
@@ -34,6 +34,7 @@ ENUM(child_sa_state_names, CHILD_CREATED, CHILD_DESTROYING,
"INSTALLED", "INSTALLED",
"UPDATING", "UPDATING",
"REKEYING", "REKEYING",
"RETRYING",
"DELETING", "DELETING",
"DESTROYING", "DESTROYING",
); );
+5
View File
@@ -67,6 +67,11 @@ enum child_sa_state_t {
*/ */
CHILD_REKEYING, CHILD_REKEYING,
/**
* CHILD_SA negotiation failed, but gets retried
*/
CHILD_RETRYING,
/** /**
* CHILD_SA in progress of delete * CHILD_SA in progress of delete
*/ */
@@ -1408,6 +1408,7 @@ METHOD(task_t, process_i, status_t,
this->dh_group, diffie_hellman_group_names, group); this->dh_group, diffie_hellman_group_names, group);
this->retry = TRUE; this->retry = TRUE;
this->dh_group = group; this->dh_group = group;
this->child_sa->set_state(this->child_sa, CHILD_RETRYING);
this->public.task.migrate(&this->public.task, this->ike_sa); this->public.task.migrate(&this->public.task, this->ike_sa);
enumerator->destroy(enumerator); enumerator->destroy(enumerator);
return NEED_MORE; return NEED_MORE;