aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2011-12-13 10:35:18 +0100
committerMartin Willi <martin@revosec.ch>2012-03-20 17:31:19 +0100
commit5dec456b69af65170c44ecf8c724ea7d62e39d16 (patch)
treef7aa3bd378590fde44bdc8e14491cb9f8244980e /src
parent10e18713f17f3528667c7124d17174e55a1137c9 (diff)
downloadstrongswan-5dec456b69af65170c44ecf8c724ea7d62e39d16.tar.bz2
strongswan-5dec456b69af65170c44ecf8c724ea7d62e39d16.tar.xz
Fix IKEv1 DELETE subtask creation and processing
Diffstat (limited to 'src')
-rw-r--r--src/libcharon/sa/tasks/informational.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/libcharon/sa/tasks/informational.c b/src/libcharon/sa/tasks/informational.c
index c1a30e4ee..c2c6aa5fa 100644
--- a/src/libcharon/sa/tasks/informational.c
+++ b/src/libcharon/sa/tasks/informational.c
@@ -94,15 +94,19 @@ METHOD(task_t, process_r, status_t,
}
continue;
case DELETE_V1:
- delete = (delete_payload_t*)payload;
- if (delete->get_protocol_id(delete) == PROTO_IKE)
+ if (!this->del)
{
- this->del = (task_t*)ike_delete_create(this->ike_sa, FALSE);
- }
- else
- {
- this->del = (task_t*)child_delete_create(this->ike_sa,
- PROTO_NONE, 0);
+ delete = (delete_payload_t*)payload;
+ if (delete->get_protocol_id(delete) == PROTO_IKE)
+ {
+ this->del = (task_t*)ike_delete_create(this->ike_sa,
+ FALSE);
+ }
+ else
+ {
+ this->del = (task_t*)child_delete_create(this->ike_sa,
+ PROTO_NONE, 0);
+ }
}
break;
default:
@@ -112,7 +116,7 @@ METHOD(task_t, process_r, status_t,
}
enumerator->destroy(enumerator);
- if (status == SUCCESS)
+ if (this->del && status == SUCCESS)
{
return this->del->process(this->del, message);
}