mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-04 00:00:14 -04:00
ike-sa: Accept optional CPU ID when initiating CHILD_SAs
This commit is contained in:
parent
8e7f379f71
commit
2082fa5dd2
@ -406,6 +406,8 @@ extern enum_name_t *ike_sa_state_names;
|
|||||||
struct child_init_args_t {
|
struct child_init_args_t {
|
||||||
/** Reqid to use for CHILD_SA, 0 to assign automatically */
|
/** Reqid to use for CHILD_SA, 0 to assign automatically */
|
||||||
uint32_t reqid;
|
uint32_t reqid;
|
||||||
|
/** Optional CPU ID to use for CHILD_SA, CPU_ID_MAX if unspecified */
|
||||||
|
uint32_t cpu;
|
||||||
/** Optional source of triggering packet */
|
/** Optional source of triggering packet */
|
||||||
traffic_selector_t *src;
|
traffic_selector_t *src;
|
||||||
/** Optional destination of triggering packet */
|
/** Optional destination of triggering packet */
|
||||||
|
@ -152,6 +152,7 @@ static status_t delete_child(private_quick_delete_t *this,
|
|||||||
{
|
{
|
||||||
child_init_args_t args = {
|
child_init_args_t args = {
|
||||||
.reqid = child_sa->get_reqid_ref(child_sa),
|
.reqid = child_sa->get_reqid_ref(child_sa),
|
||||||
|
.cpu = child_sa->get_cpu(child_sa),
|
||||||
};
|
};
|
||||||
action_t action;
|
action_t action;
|
||||||
|
|
||||||
|
@ -2208,6 +2208,8 @@ static void trigger_mbb_reauth(private_task_manager_t *this)
|
|||||||
child_sa->get_mark(child_sa, TRUE).value,
|
child_sa->get_mark(child_sa, TRUE).value,
|
||||||
child_sa->get_mark(child_sa, FALSE).value);
|
child_sa->get_mark(child_sa, FALSE).value);
|
||||||
child_create->use_label(child_create, child_sa->get_label(child_sa));
|
child_create->use_label(child_create, child_sa->get_label(child_sa));
|
||||||
|
child_create->use_per_cpu(child_create, child_sa->use_per_cpu(child_sa),
|
||||||
|
child_sa->get_cpu(child_sa));
|
||||||
/* interface IDs are not migrated as the new CHILD_SAs on old and new
|
/* interface IDs are not migrated as the new CHILD_SAs on old and new
|
||||||
* IKE_SA go though regular updown events */
|
* IKE_SA go though regular updown events */
|
||||||
new->queue_task(new, &child_create->task);
|
new->queue_task(new, &child_create->task);
|
||||||
@ -2387,6 +2389,8 @@ METHOD(task_manager_t, queue_child, void,
|
|||||||
charon->kernel->release_reqid(charon->kernel, reqid);
|
charon->kernel->release_reqid(charon->kernel, reqid);
|
||||||
}
|
}
|
||||||
task->use_label(task, child_sa->get_label(child_sa));
|
task->use_label(task, child_sa->get_label(child_sa));
|
||||||
|
task->use_per_cpu(task, child_sa->use_per_cpu(child_sa),
|
||||||
|
child_sa->get_cpu(child_sa));
|
||||||
}
|
}
|
||||||
else if (args)
|
else if (args)
|
||||||
{
|
{
|
||||||
@ -2394,6 +2398,7 @@ METHOD(task_manager_t, queue_child, void,
|
|||||||
args->dst, args->seq);
|
args->dst, args->seq);
|
||||||
task->use_reqid(task, args->reqid);
|
task->use_reqid(task, args->reqid);
|
||||||
task->use_label(task, args->label);
|
task->use_label(task, args->label);
|
||||||
|
task->use_per_cpu(task, FALSE, args->cpu);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -171,6 +171,8 @@ static void queue_child_create(ike_sa_t *ike_sa, child_sa_t *child_sa)
|
|||||||
charon->kernel->release_reqid(charon->kernel, reqid);
|
charon->kernel->release_reqid(charon->kernel, reqid);
|
||||||
}
|
}
|
||||||
child_create->use_label(child_create, child_sa->get_label(child_sa));
|
child_create->use_label(child_create, child_sa->get_label(child_sa));
|
||||||
|
child_create->use_per_cpu(child_create, child_sa->use_per_cpu(child_sa),
|
||||||
|
child_sa->get_cpu(child_sa));
|
||||||
ike_sa->queue_task(ike_sa, (task_t*)child_create);
|
ike_sa->queue_task(ike_sa, (task_t*)child_create);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -643,6 +643,7 @@ METHOD(trap_manager_t, acquire, void,
|
|||||||
{
|
{
|
||||||
child_init_args_t args = {
|
child_init_args_t args = {
|
||||||
.reqid = allocated_reqid,
|
.reqid = allocated_reqid,
|
||||||
|
.cpu = CPU_ID_MAX,
|
||||||
.src = data->src,
|
.src = data->src,
|
||||||
.dst = data->dst,
|
.dst = data->dst,
|
||||||
.label = data->label,
|
.label = data->label,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user