diff options
author | Tobias Brunner <tobias@strongswan.org> | 2014-07-18 18:19:46 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2014-09-09 10:56:15 +0200 |
commit | 25fcbab6789c9c8839d898a6527e0017dfac4322 (patch) | |
tree | d08b35843d19a775116832a62fea597f0fa93d36 /src/libhydra/plugins/kernel_pfkey/kernel_pfkey_ipsec.c | |
parent | 8a59fa6467b0e600cfce1319f8dcd474aec84c86 (diff) | |
download | strongswan-25fcbab6789c9c8839d898a6527e0017dfac4322.tar.bz2 strongswan-25fcbab6789c9c8839d898a6527e0017dfac4322.tar.xz |
kernel-pfkey: Report packet counts of IPsec SAs
Seems that packet counts can be retrieved after all. At least the Linux
and FreeBSD kernels treat the number of allocations as number of packets.
We actually installed packet limits in that field already.
Diffstat (limited to 'src/libhydra/plugins/kernel_pfkey/kernel_pfkey_ipsec.c')
-rw-r--r-- | src/libhydra/plugins/kernel_pfkey/kernel_pfkey_ipsec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libhydra/plugins/kernel_pfkey/kernel_pfkey_ipsec.c b/src/libhydra/plugins/kernel_pfkey/kernel_pfkey_ipsec.c index e1a58aa94..00ab5ab5a 100644 --- a/src/libhydra/plugins/kernel_pfkey/kernel_pfkey_ipsec.c +++ b/src/libhydra/plugins/kernel_pfkey/kernel_pfkey_ipsec.c @@ -1978,8 +1978,8 @@ METHOD(kernel_ipsec_t, query_sa, status_t, } if (packets) { - /* not supported by PF_KEY */ - *packets = 0; + /* at least on Linux and FreeBSD this contains the number of packets */ + *packets = response.lft_current->sadb_lifetime_allocations; } if (time) { |