FreeBSD only reports a policy's usetime if a lifetime has been specified when the policy was added (we only specify a lifetime on the SA, not on the policy).

This commit is contained in:
Tobias Brunner
2009-08-04 11:08:58 +02:00
parent 56ee8fcc96
commit 524f9ac470
@@ -1888,6 +1888,13 @@ static status_t query_policy(private_kernel_pfkey_ipsec_t *this,
free(out);
return FAILED;
}
else if (response.lft_current == NULL)
{
DBG1(DBG_KNL, "unable to query policy %R === %R %N: kernel reports no "
"use time", src_ts, dst_ts, policy_dir_names, direction);
free(out);
return FAILED;
}
*use_time = response.lft_current->sadb_lifetime_usetime;