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.
This commit is contained in:
Tobias Brunner
2014-09-09 10:56:15 +02:00
parent 8a59fa6467
commit 25fcbab678
@@ -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)
{