Added a stroke rekey command to trigger IKE/CHILD_SA rekeying manually
This commit is contained in:
@@ -245,6 +245,17 @@ static void stroke_terminate_srcip(private_stroke_socket_t *this,
|
||||
this->control->terminate_srcip(this->control, msg, out);
|
||||
}
|
||||
|
||||
/**
|
||||
* rekey a connection by name/id
|
||||
*/
|
||||
static void stroke_rekey(private_stroke_socket_t *this, stroke_msg_t *msg, FILE *out)
|
||||
{
|
||||
pop_string(msg, &msg->terminate.name);
|
||||
DBG1(DBG_CFG, "received stroke: rekey '%s'", msg->rekey.name);
|
||||
|
||||
this->control->rekey(this->control, msg, out);
|
||||
}
|
||||
|
||||
/**
|
||||
* route a policy (install SPD entries)
|
||||
*/
|
||||
@@ -510,6 +521,9 @@ static job_requeue_t process(stroke_job_context_t *ctx)
|
||||
case STR_TERMINATE_SRCIP:
|
||||
stroke_terminate_srcip(this, msg, out);
|
||||
break;
|
||||
case STR_REKEY:
|
||||
stroke_rekey(this, msg, out);
|
||||
break;
|
||||
case STR_STATUS:
|
||||
stroke_status(this, msg, out, FALSE);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user