do not report a CHILD_SA rekey time if rekeying disabled
This commit is contained in:
@@ -502,8 +502,14 @@ static status_t install(private_child_sa_t *this, chunk_t encr, chunk_t integ,
|
|||||||
this->mode, this->ipcomp, cpi, this->encap, update);
|
this->mode, this->ipcomp, cpi, this->encap, update);
|
||||||
|
|
||||||
now = time(NULL);
|
now = time(NULL);
|
||||||
this->rekey_time = now + soft;
|
if (soft)
|
||||||
this->expire_time = now + hard;
|
{
|
||||||
|
this->rekey_time = now + soft;
|
||||||
|
}
|
||||||
|
if (hard)
|
||||||
|
{
|
||||||
|
this->expire_time = now + hard;
|
||||||
|
}
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -814,6 +820,8 @@ child_sa_t * child_sa_create(host_t *me, host_t* other,
|
|||||||
this->protocol = PROTO_NONE;
|
this->protocol = PROTO_NONE;
|
||||||
this->mode = MODE_TUNNEL;
|
this->mode = MODE_TUNNEL;
|
||||||
this->proposal = NULL;
|
this->proposal = NULL;
|
||||||
|
this->rekey_time = 0;
|
||||||
|
this->expire_time = 0;
|
||||||
this->config = config;
|
this->config = config;
|
||||||
config->get_ref(config);
|
config->get_ref(config);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user