From: Adrian-Ken Rueegsegger Date: Wed, 19 Dec 2012 14:48:35 +0000 (+0100) Subject: Raise an alert if IKE SA is kept X-Git-Tag: 5.0.2dr4~34 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ba8b28b67f8649fa562f12f59f55c3312b9053f1;p=thirdparty%2Fstrongswan.git Raise an alert if IKE SA is kept This alert is raised when the establishment of a child SA fails but the IKE SA is kept. --- diff --git a/src/libcharon/bus/bus.h b/src/libcharon/bus/bus.h index 34b9bc3fea..105375ae48 100644 --- a/src/libcharon/bus/bus.h +++ b/src/libcharon/bus/bus.h @@ -124,6 +124,8 @@ enum alert_t { ALERT_UNIQUE_REPLACE, /** IKE_SA deleted because of "keep" unique policy, no arguement */ ALERT_UNIQUE_KEEP, + /** IKE_SA kept on failed child SA establishment, no argument */ + ALERT_KEEP_ON_CHILD_SA_FAILURE, /** allocating virtual IP failed, linked_list_t of host_t requested */ ALERT_VIP_FAILURE, /** an authorize() hook failed, no argument */ diff --git a/src/libcharon/sa/ikev2/tasks/child_create.c b/src/libcharon/sa/ikev2/tasks/child_create.c index c59b4d646f..787c51eb28 100644 --- a/src/libcharon/sa/ikev2/tasks/child_create.c +++ b/src/libcharon/sa/ikev2/tasks/child_create.c @@ -989,6 +989,7 @@ static void handle_child_sa_failure(private_child_create_t *this, else { DBG1(DBG_IKE, "failed to establish CHILD_SA, keeping IKE_SA"); + charon->bus->alert(charon->bus, ALERT_KEEP_ON_CHILD_SA_FAILURE); } }