Reply quick mode with the same SA lifetime that we received

This commit is contained in:
Martin Willi
2012-03-20 17:31:31 +01:00
parent 3a925f74ab
commit 31bd5c8c0e
+4 -4
View File
@@ -510,15 +510,15 @@ static void apply_lifetimes(private_quick_mode_t *this, sa_payload_t *sa_payload
lifebytes = sa_payload->get_lifebytes(sa_payload); lifebytes = sa_payload->get_lifebytes(sa_payload);
if (this->lifetime != lifetime) if (this->lifetime != lifetime)
{ {
DBG1(DBG_IKE, "received %us lifetime, configured %us, using lower", DBG1(DBG_IKE, "received %us lifetime, configured %us",
lifetime, this->lifetime); lifetime, this->lifetime);
this->lifetime = min(this->lifetime, lifetime); this->lifetime = lifetime;
} }
if (this->lifebytes != lifebytes) if (this->lifebytes != lifebytes)
{ {
DBG1(DBG_IKE, "received %llu lifebytes, configured %llu, using lower", DBG1(DBG_IKE, "received %llu lifebytes, configured %llu",
lifebytes, this->lifebytes); lifebytes, this->lifebytes);
this->lifebytes = min(this->lifebytes, lifebytes); this->lifebytes = lifebytes;
} }
} }