aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcharon/sa/ikev2
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2016-05-30 16:53:37 +0200
committerTobias Brunner <tobias@strongswan.org>2016-06-17 18:48:05 +0200
commitc0976a5e01f0ceacb9a7d44821a5afd7ad3cbdce (patch)
tree091593eafdc3785f75952ddb15744f1564091fd2 /src/libcharon/sa/ikev2
parent72c295df5b6d5fb2732af7c9d454c7f78115b828 (diff)
downloadstrongswan-c0976a5e01f0ceacb9a7d44821a5afd7ad3cbdce.tar.bz2
strongswan-c0976a5e01f0ceacb9a7d44821a5afd7ad3cbdce.tar.xz
ike-rekey: Respond with TEMPORARY_FAILURE if we are deleting the SA
Diffstat (limited to 'src/libcharon/sa/ikev2')
-rw-r--r--src/libcharon/sa/ikev2/tasks/ike_rekey.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libcharon/sa/ikev2/tasks/ike_rekey.c b/src/libcharon/sa/ikev2/tasks/ike_rekey.c
index 334749a61..9373e9643 100644
--- a/src/libcharon/sa/ikev2/tasks/ike_rekey.c
+++ b/src/libcharon/sa/ikev2/tasks/ike_rekey.c
@@ -208,6 +208,11 @@ METHOD(task_t, process_r, status_t,
METHOD(task_t, build_r, status_t,
private_ike_rekey_t *this, message_t *message)
{
+ if (this->ike_sa->get_state(this->ike_sa) == IKE_DELETING)
+ {
+ message->add_notify(message, TRUE, TEMPORARY_FAILURE, chunk_empty);
+ return SUCCESS;
+ }
if (this->new_sa == NULL)
{
/* IKE_SA/a CHILD_SA is in an inacceptable state, deny rekeying */