ikev2: Add possibility to delay initiation of a queued task
Such a task is not initiated unless a certain time has passed. This allows delaying certain tasks but avoids problems if we'd do this via a scheduled job (e.g. if the IKE_SA is rekeyed in the meantime). If the IKE_SA is rekeyed the delay of such tasks is reset when the tasks are adopted i.e. they get executed immediately on the new IKE_SA. This hasn't been implemented for IKEv1 yet.
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* Copyright (C) 2006-2015 Tobias Brunner
|
||||
* Copyright (C) 2006-2016 Tobias Brunner
|
||||
* Copyright (C) 2006 Daniel Roethlisberger
|
||||
* Copyright (C) 2005-2009 Martin Willi
|
||||
* Copyright (C) 2005 Jan Hutter
|
||||
* Hochschule fuer Technik Rapperswil
|
||||
* HSR Hochschule fuer Technik Rapperswil
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
@@ -1123,6 +1123,15 @@ struct ike_sa_t {
|
||||
*/
|
||||
void (*queue_task)(ike_sa_t *this, task_t *task);
|
||||
|
||||
/**
|
||||
* Queue a task in the manager, but delay its initiation for at least the
|
||||
* given number of seconds.
|
||||
*
|
||||
* @param task task to queue
|
||||
* @param delay minimum delay in s before initiating the task
|
||||
*/
|
||||
void (*queue_task_delayed)(ike_sa_t *this, task_t *task, uint32_t delay);
|
||||
|
||||
/**
|
||||
* Inherit required attributes to new SA before rekeying.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user