aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2009-08-04 11:03:39 +0200
committerTobias Brunner <tobias@strongswan.org>2009-08-04 11:08:58 +0200
commit524f9ac4705d933a4cdfdd9f86ef820de2fdc5d6 (patch)
tree37855fc6ce62cdd76712d411485ad380d3039d84 /src
parent56ee8fcc96f1e16ae9eeac3ca5bafbb647d2b37c (diff)
downloadstrongswan-524f9ac4705d933a4cdfdd9f86ef820de2fdc5d6.tar.bz2
strongswan-524f9ac4705d933a4cdfdd9f86ef820de2fdc5d6.tar.xz
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).
Diffstat (limited to 'src')
-rw-r--r--src/charon/plugins/kernel_pfkey/kernel_pfkey_ipsec.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/charon/plugins/kernel_pfkey/kernel_pfkey_ipsec.c b/src/charon/plugins/kernel_pfkey/kernel_pfkey_ipsec.c
index ce34f19fa..a06c68e95 100644
--- a/src/charon/plugins/kernel_pfkey/kernel_pfkey_ipsec.c
+++ b/src/charon/plugins/kernel_pfkey/kernel_pfkey_ipsec.c
@@ -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;