Raise an alert if half-open timeout limit reached

This commit is contained in:
Martin Willi 2012-11-06 15:26:15 +01:00
parent c57fe7ac6f
commit 578f72ceb0
2 changed files with 3 additions and 0 deletions

View 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 */

View 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);
}