fixed CHILD_SA rekeying time in statusall

This commit is contained in:
Martin Willi
2007-03-20 12:29:42 +00:00
parent 37c6ebb78b
commit 39a268b867
+2 -2
View File
@@ -753,7 +753,7 @@ static int print(FILE *stream, const struct printf_info *info,
return fprintf(stream, "(null)"); return fprintf(stream, "(null)");
} }
now = (u_int32_t)time(NULL); now = time(NULL);
written += fprintf(stream, "%12s{%d}: %N, %N", written += fprintf(stream, "%12s{%d}: %N, %N",
this->policy->get_name(this->policy), this->reqid, this->policy->get_name(this->policy), this->reqid,
@@ -796,7 +796,7 @@ static int print(FILE *stream, const struct printf_info *info,
/* calculate rekey times */ /* calculate rekey times */
if (soft) if (soft)
{ {
rekeying = soft - (now - this->install_time); rekeying = this->install_time + soft - now;
written += fprintf(stream, "in %ds", rekeying); written += fprintf(stream, "in %ds", rekeying);
} }
else else