kernel-netlink: Add support to set CPU ID on SA
This commit is contained in:
@@ -1725,6 +1725,7 @@ METHOD(kernel_ipsec_t, add_sa, status_t,
|
||||
.int_alg = AUTH_UNDEFINED,
|
||||
.tfc = data->tfc,
|
||||
.ipcomp = data->ipcomp,
|
||||
.cpu = data->cpu,
|
||||
.initiator = data->initiator,
|
||||
.inbound = data->inbound,
|
||||
.update = data->update,
|
||||
@@ -2084,6 +2085,15 @@ METHOD(kernel_ipsec_t, add_sa, status_t,
|
||||
goto failed;
|
||||
}
|
||||
|
||||
if (data->cpu != CPU_ID_MAX)
|
||||
{
|
||||
if (!add_uint32(hdr, sizeof(request), XFRMA_SA_PCPU, data->cpu))
|
||||
{
|
||||
goto failed;
|
||||
}
|
||||
DBG2(DBG_KNL, " using CPU ID: %u", data->cpu);
|
||||
}
|
||||
|
||||
if (id->proto != IPPROTO_COMP)
|
||||
{
|
||||
/* we don't need a replay window for outbound SAs, however, older
|
||||
|
||||
Reference in New Issue
Block a user