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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user