Store shorter soft lifetime of in- and outbound SAs only

This commit is contained in:
Martin Willi
2012-06-08 10:22:03 +02:00
parent 7a5f372c57
commit 106b938b6b
+8 -1
View File
@@ -632,7 +632,14 @@ METHOD(child_sa_t, install, status_t,
now = time_monotonic(NULL);
if (lifetime->time.rekey)
{
this->rekey_time = now + lifetime->time.rekey;
if (this->rekey_time)
{
this->rekey_time = min(this->rekey_time, now + lifetime->time.rekey);
}
else
{
this->rekey_time = now + lifetime->time.rekey;
}
}
if (lifetime->time.life)
{