kernel-interface: Add feature to indicate if query_sa() returns last use time

Currently supported by libipsec and PF_KEY on macOS (FreeBSD, like Linux,
reports the time the SA was first used in sadb_lifetime_usetime - it also
triggers rekeyings based on that, which Linux doesn't, it also triggers
them if an SA is never used).
This commit is contained in:
Tobias Brunner committed 2023-02-22 13:20:10 +01:00
1 parent 1efdb0f791
commit b9131c34d3
5 files changed
+40 -11

No files matched your search

@@ -231,7 +231,8 @@ static void expire(uint8_t protocol, uint32_t spi, host_t *dst, bool hard)
METHOD(kernel_ipsec_t, get_features, kernel_feature_t,
private_kernel_libipsec_ipsec_t *this)
{
return KERNEL_REQUIRE_UDP_ENCAPSULATION | KERNEL_ESP_V3_TFC;
return KERNEL_REQUIRE_UDP_ENCAPSULATION | KERNEL_ESP_V3_TFC |
KERNEL_SA_USE_TIME;
}
METHOD(kernel_ipsec_t, get_spi, status_t,