Raise an alert if an IKE_SA could not have been reauthenticated and expires

This commit is contained in:
Martin Willi
2013-03-14 14:20:54 +01:00
parent 68c12fd9f9
commit c45cf9048e
2 changed files with 6 additions and 0 deletions
+2
View File
@@ -130,6 +130,8 @@ enum alert_t {
ALERT_VIP_FAILURE,
/** an authorize() hook failed, no argument */
ALERT_AUTHORIZATION_FAILED,
/** IKE_SA hit the hard lifetime limit before it could be rekeyed */
ALERT_IKE_SA_EXPIRED,
};
/**
+4
View File
@@ -1445,6 +1445,10 @@ METHOD(ike_sa_t, delete_, status_t,
}
/* FALL */
case IKE_ESTABLISHED:
if (time_monotonic(NULL) >= this->stats[STAT_DELETE])
{ /* IKE_SA hard lifetime hit */
charon->bus->alert(charon->bus, ALERT_IKE_SA_EXPIRED);
}
this->task_manager->queue_ike_delete(this->task_manager);
return this->task_manager->initiate(this->task_manager);
case IKE_CREATED: