HomeFreeBSD

Update key_sa_recordxfer() to use PCPU counters.

Description

Update key_sa_recordxfer() to use PCPU counters.

NOTE: previously CURRENT usetime was updated every time, when key_sa_recordxfer() is invoked. RFC 2367 says:

sadb_lifetime_usetime

For CURRENT, the time, in seconds, when association
was first used. For HARD and SOFT, the number of
seconds after the first use of the association until
it expires.

Rename usetime into firstused and update it only once. Also, now
it is possible to check SA expiration using difference between
SOFT/HARD usetime and CURRENT firstused (this is already done in
key_flush_sad).

Details

Provenance
aeAuthored on
Parents
rS309051: Remove debugging code.
Branches
Unknown
Tags
Unknown