aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2011-12-12 18:38:32 +0100
committerTobias Brunner <tobias@strongswan.org>2012-03-20 17:31:17 +0100
commit4dbd81c66959dbb78485941e3ab9705c5b05776c (patch)
treeb84f102a0a337afd0c5c916036ecc0825fd0642b /src
parent3d44d735c649559b9768ae635a6bee7fec932902 (diff)
downloadstrongswan-4dbd81c66959dbb78485941e3ab9705c5b05776c.tar.bz2
strongswan-4dbd81c66959dbb78485941e3ab9705c5b05776c.tar.xz
Destroy IKE_SA after failed XAuth authentication.
Diffstat (limited to 'src')
-rw-r--r--src/libcharon/sa/tasks/xauth.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libcharon/sa/tasks/xauth.c b/src/libcharon/sa/tasks/xauth.c
index de93935a9..4fd896e3c 100644
--- a/src/libcharon/sa/tasks/xauth.c
+++ b/src/libcharon/sa/tasks/xauth.c
@@ -277,9 +277,12 @@ METHOD(task_t, process_i_status, status_t,
DBG1(DBG_IKE, "received invalid XAUTH status response");
return FAILED;
}
-
+ if (this->status != XAUTH_OK)
+ {
+ DBG1(DBG_IKE, "destroying IKE_SA after failed XAuth authentication");
+ return FAILED;
+ }
establish(this);
-
return SUCCESS;
}