* 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. */
| 4716 | * XXX: year 2038 problem may remain. |
| 4717 | */ |
| 4718 | static void |
| 4719 | key_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 | |
| 4741 | u_long |
| 4742 | key_random() |
nothing calls this directly
no test coverage detected