controller: Add option to force destruction of an IKE_SA
It's optionally possible to wait for a timeout to destroy the SA.
This commit is contained in:
@@ -415,7 +415,7 @@ static void request_control_terminate(xmlTextReaderPtr reader,
|
||||
if (ike)
|
||||
{
|
||||
status = charon->controller->terminate_ike(
|
||||
charon->controller, id,
|
||||
charon->controller, id, FALSE,
|
||||
(controller_cb_t)xml_callback, writer, 0);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -316,7 +316,8 @@ static void charon_terminate(private_stroke_control_t *this, uint32_t id,
|
||||
else
|
||||
{
|
||||
status = charon->controller->terminate_ike(charon->controller, id,
|
||||
(controller_cb_t)stroke_log, &info, this->timeout);
|
||||
FALSE, (controller_cb_t)stroke_log, &info,
|
||||
this->timeout);
|
||||
}
|
||||
report_terminate_status(this, status, out, id, child);
|
||||
}
|
||||
@@ -327,7 +328,7 @@ static void charon_terminate(private_stroke_control_t *this, uint32_t id,
|
||||
}
|
||||
else
|
||||
{
|
||||
charon->controller->terminate_ike(charon->controller, id,
|
||||
charon->controller->terminate_ike(charon->controller, id, FALSE,
|
||||
NULL, NULL, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -180,7 +180,7 @@ static void terminate(private_uci_control_t *this, char *name)
|
||||
{
|
||||
id = ike_sa->get_unique_id(ike_sa);
|
||||
enumerator->destroy(enumerator);
|
||||
charon->controller->terminate_ike(charon->controller, id,
|
||||
charon->controller->terminate_ike(charon->controller, id, FALSE,
|
||||
controller_cb_empty, NULL, 0);
|
||||
write_fifo(this, "connection '%s' terminated\n", name);
|
||||
return;
|
||||
|
||||
@@ -2083,7 +2083,7 @@ static void clear_start_action(private_vici_config_t *this, char *peer_name,
|
||||
while (array_remove(ikeids, ARRAY_HEAD, &id))
|
||||
{
|
||||
DBG1(DBG_CFG, "closing IKE_SA #%u", id);
|
||||
charon->controller->terminate_ike(charon->controller,
|
||||
charon->controller->terminate_ike(charon->controller, FALSE,
|
||||
id, NULL, NULL, 0);
|
||||
}
|
||||
array_destroy(ikeids);
|
||||
|
||||
@@ -326,7 +326,7 @@ CALLBACK(terminate, vici_message_t*,
|
||||
}
|
||||
else
|
||||
{
|
||||
if (charon->controller->terminate_ike(charon->controller, *del,
|
||||
if (charon->controller->terminate_ike(charon->controller, *del, FALSE,
|
||||
log_cb, &log, timeout) == SUCCESS)
|
||||
{
|
||||
done++;
|
||||
|
||||
Reference in New Issue
Block a user