kernel-netlink: Read last use time from SA if possible
Since 6.2 the Linux kernel updates the last use time per SA. In previous releases the attribute was only updated and reported for specific outbound IPv6 SAs. Using this reduces the number of kernel queries per CHILD_SA: for DPDs from two policy queries (IN/FWD) to a single query of the inbound SA, and for status reports the three policy queries (IN/FWD/OUT) can be omitted and only the two SAs have to be queried. For NAT keepalives the number of queries doesn't change but a policy query (OUT) is replaced by a query for the outbound SA. While we could use the existence of the attribute as indicator for its support, we don't know this until we queried an SA. By using a version check we can announce the feature from the start.
This commit is contained in:
@@ -288,7 +288,7 @@ enum xfrm_attr_type_t {
|
||||
XFRMA_ETIMER_THRESH,
|
||||
XFRMA_SRCADDR, /* xfrm_address_t */
|
||||
XFRMA_COADDR, /* xfrm_address_t */
|
||||
XFRMA_LASTUSED, /* unsigned long */
|
||||
XFRMA_LASTUSED, /* __u64 */
|
||||
XFRMA_POLICY_TYPE, /* struct xfrm_userpolicy_type */
|
||||
XFRMA_MIGRATE,
|
||||
XFRMA_ALG_AEAD, /* struct xfrm_algo_aead */
|
||||
|
||||
Reference in New Issue
Block a user