/*
- * Copyright (C) 2012-2019 Tobias Brunner
+ * Copyright (C) 2012-2024 Tobias Brunner
* Copyright (C) 2011 Martin Willi
*
* Copyright (C) secunet Security Networks AG
*/
bool delete;
+ /**
+ * Whether the task was aborted
+ */
+ bool aborted;
+
/**
* Negotiated mode, tunnel or transport
*/
}
case QM_NEGOTIATED:
{
+ if (this->aborted)
+ {
+ this->ike_sa->queue_task(this->ike_sa,
+ (task_t*)quick_delete_create(this->ike_sa,
+ this->proposal->get_protocol(this->proposal),
+ this->spi_i, TRUE, FALSE));
+ }
return SUCCESS;
}
default:
this->rekey = spi;
}
+METHOD(quick_mode_t, abort_, void,
+ private_quick_mode_t *this)
+{
+ this->aborted = TRUE;
+}
+
METHOD(task_t, migrate, void,
private_quick_mode_t *this, ike_sa_t *ike_sa)
{
.use_marks = _use_marks,
.use_if_ids = _use_if_ids,
.rekey = _rekey,
+ .abort = _abort_,
},
.ike_sa = ike_sa,
.initiator = config != NULL,
/*
- * Copyright (C) 2015-2019 Tobias Brunner
+ * Copyright (C) 2015-2024 Tobias Brunner
* Copyright (C) 2011 Martin Willi
*
* Copyright (C) secunet Security Networks AG
* @param spi spi of SA to rekey
*/
void (*rekey)(quick_mode_t *this, uint32_t spi);
+
+ /**
+ * Mark this active task as being aborted, i.e. cause a deletion of the
+ * created CHILD_SA immediately after its successful creation.
+ */
+ void (*abort)(quick_mode_t *this);
};
/**