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

Function key_flush_spacq

freebsd/netipsec/key.c:4694–4710  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4692}
4693
4694static void
4695key_flush_spacq(time_t now)
4696{
4697 struct secspacq *acq, *nextacq;
4698
4699 /* SP ACQ tree */
4700 SPACQ_LOCK();
4701 for (acq = LIST_FIRST(&V_spacqtree); acq != NULL; acq = nextacq) {
4702 nextacq = LIST_NEXT(acq, chain);
4703 if (now - acq->created > V_key_blockacq_lifetime
4704 && __LIST_CHAINED(acq)) {
4705 LIST_REMOVE(acq, chain);
4706 free(acq, M_IPSEC_SAQ);
4707 }
4708 }
4709 SPACQ_UNLOCK();
4710}
4711
4712/*
4713 * time handler.

Callers 1

key_timehandlerFunction · 0.85

Calls 1

freeFunction · 0.50

Tested by

no test coverage detected