| 4671 | } |
| 4672 | |
| 4673 | static void |
| 4674 | key_flush_acq(time_t now) |
| 4675 | { |
| 4676 | struct secacq *acq, *nextacq; |
| 4677 | |
| 4678 | /* ACQ tree */ |
| 4679 | ACQ_LOCK(); |
| 4680 | acq = LIST_FIRST(&V_acqtree); |
| 4681 | while (acq != NULL) { |
| 4682 | nextacq = LIST_NEXT(acq, chain); |
| 4683 | if (now - acq->created > V_key_blockacq_lifetime) { |
| 4684 | LIST_REMOVE(acq, chain); |
| 4685 | LIST_REMOVE(acq, addrhash); |
| 4686 | LIST_REMOVE(acq, seqhash); |
| 4687 | free(acq, M_IPSEC_SAQ); |
| 4688 | } |
| 4689 | acq = nextacq; |
| 4690 | } |
| 4691 | ACQ_UNLOCK(); |
| 4692 | } |
| 4693 | |
| 4694 | static void |
| 4695 | key_flush_spacq(time_t now) |
no test coverage detected