From: Martin Willi Date: Tue, 13 Dec 2011 08:55:37 +0000 (+0100) Subject: Close SA immediately after sending an INFORMATIONAL error X-Git-Tag: 5.0.0~338^2~9^2~246 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=46505067c761072c1567a134814c9d7852d066b3;p=thirdparty%2Fstrongswan.git Close SA immediately after sending an INFORMATIONAL error --- diff --git a/src/libcharon/sa/task_manager_v1.c b/src/libcharon/sa/task_manager_v1.c index 48218a809d..89c664c8f9 100755 --- a/src/libcharon/sa/task_manager_v1.c +++ b/src/libcharon/sa/task_manager_v1.c @@ -432,6 +432,13 @@ METHOD(task_manager_t, initiate, status_t, this->initiating.packet->clone(this->initiating.packet)); this->initiating.packet->destroy(this->initiating.packet); this->initiating.packet = NULL; + + /* close after sending an INFORMATIONAL error but not yet established */ + if (this->initiating.type == INFORMATIONAL_V1 && + this->ike_sa->get_state(this->ike_sa) == IKE_CONNECTING) + { + return FAILED; + } return SUCCESS; }