use more generic stats getter, introducing new stats
[strongswan.git] / src / charon / sa / tasks / ike_auth_lifetime.c
index 969e21c..6be893c 100644 (file)
@@ -47,9 +47,10 @@ static void add_auth_lifetime(private_ike_auth_lifetime_t *this, message_t *mess
        chunk_t chunk;
        u_int32_t lifetime;
        
-       lifetime = this->ike_sa->get_statistic(this->ike_sa, STAT_REAUTH_TIME);
+       lifetime = this->ike_sa->get_statistic(this->ike_sa, STAT_REAUTH);
        if (lifetime)
        {
+               lifetime -= time(NULL);
                chunk = chunk_from_thing(lifetime);
                *(u_int32_t*)chunk.ptr = htonl(lifetime);
                message->add_notify(message, FALSE, AUTH_LIFETIME, chunk);