MCPcopy Create free account
hub / github.com/F-Stack/f-stack / key_timehandler

Function key_timehandler

freebsd/netipsec/key.c:4718–4739  ·  view source on GitHub ↗

* time handler. * scanning SPD and SAD to check status for each entries, * and do to remove or to expire. * XXX: year 2038 problem may remain. */

Source from the content-addressed store, hash-verified

4716 * XXX: year 2038 problem may remain.
4717 */
4718static void
4719key_timehandler(void *arg)
4720{
4721 VNET_ITERATOR_DECL(vnet_iter);
4722 time_t now = time_second;
4723
4724 VNET_LIST_RLOCK_NOSLEEP();
4725 VNET_FOREACH(vnet_iter) {
4726 CURVNET_SET(vnet_iter);
4727 key_flush_spd(now);
4728 key_flush_sad(now);
4729 key_flush_acq(now);
4730 key_flush_spacq(now);
4731 CURVNET_RESTORE();
4732 }
4733 VNET_LIST_RUNLOCK_NOSLEEP();
4734
4735#ifndef IPSEC_DEBUG2
4736 /* do exchange to tick time !! */
4737 callout_schedule(&key_timer, hz);
4738#endif /* IPSEC_DEBUG2 */
4739}
4740
4741u_long
4742key_random()

Callers

nothing calls this directly

Calls 5

key_flush_spdFunction · 0.85
key_flush_sadFunction · 0.85
key_flush_acqFunction · 0.85
key_flush_spacqFunction · 0.85
callout_scheduleFunction · 0.50

Tested by

no test coverage detected