diff options
author | Dirk Engling <erdgeist@erdgeist.org> | 2022-11-24 16:38:26 +0100 |
---|---|---|
committer | Dirk Engling <erdgeist@erdgeist.org> | 2022-11-24 16:38:26 +0100 |
commit | f62398c7483e8ce9122e86cc2a09abda5f3745e3 (patch) | |
tree | 0339deeaa7e6050bf99c57cdb4b57368b23b401b /ot_accesslist.c | |
parent | be825f57597b0e9dcf07d257e93f03e30935f7db (diff) |
Clean accesslists every five minutes
Diffstat (limited to 'ot_accesslist.c')
-rw-r--r-- | ot_accesslist.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ot_accesslist.c b/ot_accesslist.c index 078cebd..2fc146c 100644 --- a/ot_accesslist.c +++ b/ot_accesslist.c | |||
@@ -369,6 +369,18 @@ void accesslist_deinit( void ) { | |||
369 | pthread_cancel( thread_id ); | 369 | pthread_cancel( thread_id ); |
370 | pthread_mutex_destroy(&g_accesslist_mutex); | 370 | pthread_mutex_destroy(&g_accesslist_mutex); |
371 | } | 371 | } |
372 | |||
373 | void accesslist_cleanup( void ) { | ||
374 | pthread_mutex_lock(&g_accesslist_mutex); | ||
375 | |||
376 | accesslist_clean(g_accesslist); | ||
377 | #if WANT_DYNAMIC_ACCESSLIST | ||
378 | accesslist_clean(g_accesslist_add); | ||
379 | accesslist_clean(g_accesslist_delete); | ||
380 | #endif | ||
381 | |||
382 | pthread_mutex_unlock(&g_accesslist_mutex); | ||
383 | } | ||
372 | #endif | 384 | #endif |
373 | 385 | ||
374 | int address_in_net( const ot_ip6 address, const ot_net *net ) { | 386 | int address_in_net( const ot_ip6 address, const ot_net *net ) { |