diff options
author | Martin Willi <martin@revosec.ch> | 2012-06-05 16:16:07 +0200 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2012-06-08 10:22:03 +0200 |
commit | 106b938b6bc665b01973f0977743be15db77b80d (patch) | |
tree | 9ef78c52ffbdfd5997eec849e8e3a51328254b67 /src | |
parent | 7a5f372c57925d0d13d9c9d599b4accbec499a0f (diff) | |
download | strongswan-106b938b6bc665b01973f0977743be15db77b80d.tar.bz2 strongswan-106b938b6bc665b01973f0977743be15db77b80d.tar.xz |
Store shorter soft lifetime of in- and outbound SAs only
Diffstat (limited to 'src')
-rw-r--r-- | src/libcharon/sa/child_sa.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/libcharon/sa/child_sa.c b/src/libcharon/sa/child_sa.c index 76ccceec2..d5adb2527 100644 --- a/src/libcharon/sa/child_sa.c +++ b/src/libcharon/sa/child_sa.c @@ -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) { |