kernel-interface: Raise expires with a proto/SPI/dst tuple instead of reqid
This commit is contained in:
@@ -222,10 +222,10 @@ static inline bool policy_entry_equals(policy_entry_t *a,
|
||||
/**
|
||||
* Expiration callback
|
||||
*/
|
||||
static void expire(u_int32_t reqid, u_int8_t protocol, u_int32_t spi, bool hard)
|
||||
static void expire(u_int8_t protocol, u_int32_t spi, host_t *dst, bool hard)
|
||||
{
|
||||
hydra->kernel_interface->expire(hydra->kernel_interface, reqid, protocol,
|
||||
spi, hard);
|
||||
hydra->kernel_interface->expire(hydra->kernel_interface, protocol,
|
||||
spi, dst, hard);
|
||||
}
|
||||
|
||||
METHOD(kernel_ipsec_t, get_features, kernel_feature_t,
|
||||
|
||||
@@ -2032,9 +2032,8 @@ static void expire_data_destroy(expire_data_t *data)
|
||||
static job_requeue_t expire_job(expire_data_t *data)
|
||||
{
|
||||
private_kernel_wfp_ipsec_t *this = data->this;
|
||||
u_int32_t reqid = 0;
|
||||
u_int8_t protocol;
|
||||
entry_t *entry;
|
||||
entry_t *entry = NULL;
|
||||
sa_entry_t key = {
|
||||
.spi = data->spi,
|
||||
.dst = data->dst,
|
||||
@@ -2048,7 +2047,6 @@ static job_requeue_t expire_job(expire_data_t *data)
|
||||
if (entry)
|
||||
{
|
||||
protocol = entry->isa.protocol;
|
||||
reqid = entry->reqid;
|
||||
if (entry->osa.dst)
|
||||
{
|
||||
key.dst = entry->osa.dst;
|
||||
@@ -2065,15 +2063,14 @@ static job_requeue_t expire_job(expire_data_t *data)
|
||||
if (entry)
|
||||
{
|
||||
protocol = entry->isa.protocol;
|
||||
reqid = entry->reqid;
|
||||
}
|
||||
this->mutex->unlock(this->mutex);
|
||||
}
|
||||
|
||||
if (reqid)
|
||||
if (entry)
|
||||
{
|
||||
hydra->kernel_interface->expire(hydra->kernel_interface,
|
||||
reqid, protocol, data->spi, data->hard);
|
||||
hydra->kernel_interface->expire(hydra->kernel_interface, protocol,
|
||||
data->spi, data->dst, data->hard);
|
||||
}
|
||||
|
||||
return JOB_REQUEUE_NONE;
|
||||
|
||||
@@ -432,13 +432,13 @@ METHOD(stroke_control_t, rekey, void,
|
||||
while (children->enumerate(children, (void**)&child_sa))
|
||||
{
|
||||
if ((name && streq(name, child_sa->get_name(child_sa))) ||
|
||||
(id && id == child_sa->get_reqid(child_sa)))
|
||||
(id && id == child_sa->get_unique_id(child_sa)))
|
||||
{
|
||||
lib->processor->queue_job(lib->processor,
|
||||
(job_t*)rekey_child_sa_job_create(
|
||||
child_sa->get_reqid(child_sa),
|
||||
child_sa->get_protocol(child_sa),
|
||||
child_sa->get_spi(child_sa, TRUE)));
|
||||
child_sa->get_spi(child_sa, TRUE),
|
||||
ike_sa->get_my_host(ike_sa)));
|
||||
if (!all)
|
||||
{
|
||||
finished = TRUE;
|
||||
|
||||
Reference in New Issue
Block a user