if (this->version == IKEV1)
{
- task = (task_t*)quick_delete_create(&this->public, protocol, spi);
+ task = (task_t*)quick_delete_create(&this->public, protocol, spi, FALSE);
}
else
{
* Inbound SPI of CHILD_SA to delete
*/
u_int32_t spi;
+
+ /**
+ * Send delete even if SA does not exist
+ */
+ bool force;
};
/**
METHOD(task_t, build_i, status_t,
private_quick_delete_t *this, message_t *message)
{
- if (delete_child(this, this->protocol, this->spi))
+ if (delete_child(this, this->protocol, this->spi) || this->force)
{
delete_payload_t *delete_payload;
* Described in header.
*/
quick_delete_t *quick_delete_create(ike_sa_t *ike_sa, protocol_id_t protocol,
- u_int32_t spi)
+ u_int32_t spi, bool force)
{
private_quick_delete_t *this;
.ike_sa = ike_sa,
.protocol = protocol,
.spi = spi,
+ .force = force,
);
if (protocol != PROTO_NONE)
* @param ike_sa IKE_SA this task works for
* @param protocol protocol of CHILD_SA to delete, PROTO_NONE as responder
* @param spi inbound SPI of CHILD_SA to delete
+ * @param force send delete even if SA does not exist
* @return quick_delete task to handle by the task_manager
*/
quick_delete_t *quick_delete_create(ike_sa_t *ike_sa, protocol_id_t protocol,
- u_int32_t spi);
+ u_int32_t spi, bool force);
#endif /** QUICK_DELETE_H_ @}*/