ike-rekey: There is no passive reauth task, so it will never collide with one

This commit is contained in:
Tobias Brunner
2016-06-17 18:48:06 +02:00
parent 724d65900c
commit 7426576184
2 changed files with 4 additions and 7 deletions
+2 -4
View File
@@ -761,8 +761,7 @@ static bool handle_collisions(private_task_manager_t *this, task_t *task)
/* do we have to check */ /* do we have to check */
if (type == TASK_IKE_REKEY || type == TASK_CHILD_REKEY || if (type == TASK_IKE_REKEY || type == TASK_CHILD_REKEY ||
type == TASK_CHILD_DELETE || type == TASK_IKE_DELETE || type == TASK_CHILD_DELETE || type == TASK_IKE_DELETE)
type == TASK_IKE_REAUTH)
{ {
/* find an exchange collision, and notify these tasks */ /* find an exchange collision, and notify these tasks */
enumerator = array_create_enumerator(this->active_tasks); enumerator = array_create_enumerator(this->active_tasks);
@@ -771,8 +770,7 @@ static bool handle_collisions(private_task_manager_t *this, task_t *task)
switch (active->get_type(active)) switch (active->get_type(active))
{ {
case TASK_IKE_REKEY: case TASK_IKE_REKEY:
if (type == TASK_IKE_REKEY || type == TASK_IKE_DELETE || if (type == TASK_IKE_REKEY || type == TASK_IKE_DELETE)
type == TASK_IKE_REAUTH)
{ {
ike_rekey_t *rekey = (ike_rekey_t*)active; ike_rekey_t *rekey = (ike_rekey_t*)active;
rekey->collide(rekey, task); rekey->collide(rekey, task);
+2 -3
View File
@@ -284,9 +284,8 @@ METHOD(task_t, process_i, status_t,
{ {
case FAILED: case FAILED:
/* rekeying failed, fallback to old SA */ /* rekeying failed, fallback to old SA */
if (!(this->collision && ( if (!this->collision ||
this->collision->get_type(this->collision) == TASK_IKE_DELETE || this->collision->get_type(this->collision) != TASK_IKE_DELETE)
this->collision->get_type(this->collision) == TASK_IKE_REAUTH)))
{ {
schedule_delayed_rekey(this); schedule_delayed_rekey(this);
} }