Raise an alert if half-open timeout limit reached
authorMartin Willi <martin@revosec.ch>
Tue, 6 Nov 2012 14:26:15 +0000 (15:26 +0100)
committerMartin Willi <martin@revosec.ch>
Wed, 19 Dec 2012 09:40:33 +0000 (10:40 +0100)
src/libcharon/bus/bus.h
src/libcharon/processing/jobs/delete_ike_sa_job.c

index 32b28c6..34b9bc3 100644 (file)
@@ -107,6 +107,8 @@ enum alert_t {
        ALERT_RETRANSMIT_SEND_TIMEOUT,
        /** received a retransmit for a message, argument is message_t */
        ALERT_RETRANSMIT_RECEIVE,
+       /** received half-open timeout before IKE_SA established, no argument */
+       ALERT_HALF_OPEN_TIMEOUT,
        /** IKE proposals do not match, argument is linked_list_t of proposal_t */
        ALERT_PROPOSAL_MISMATCH_IKE,
        /** CHILD proposals do not match, argument is linked_list_t of proposal_t */
index 08b41af..3a8c2e1 100644 (file)
@@ -84,6 +84,7 @@ METHOD(job_t, execute, job_requeue_t,
                        else
                        {
                                DBG1(DBG_JOB, "deleting half open IKE_SA after timeout");
+                               charon->bus->alert(charon->bus, ALERT_HALF_OPEN_TIMEOUT);
                                charon->ike_sa_manager->checkin_and_destroy(
                                                                                                charon->ike_sa_manager, ike_sa);
                        }