From: Tobias Brunner Date: Mon, 30 May 2016 14:53:37 +0000 (+0200) Subject: ike-rekey: Respond with TEMPORARY_FAILURE if we are deleting the SA X-Git-Tag: 5.5.0dr1~4^2~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c0976a5e01f0ceacb9a7d44821a5afd7ad3cbdce;p=thirdparty%2Fstrongswan.git ike-rekey: Respond with TEMPORARY_FAILURE if we are deleting the SA --- diff --git a/src/libcharon/sa/ikev2/tasks/ike_rekey.c b/src/libcharon/sa/ikev2/tasks/ike_rekey.c index 334749a61a..9373e96431 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 */