| 4692 | } |
| 4693 | |
| 4694 | static void |
| 4695 | key_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. |
no test coverage detected