fall back to reauthentication if IKE rekeying fails with NO_ADDITIONAL_SAS
This commit is contained in:
@@ -170,6 +170,32 @@ static status_t process_i(private_ike_rekey_t *this, message_t *message)
|
|||||||
{
|
{
|
||||||
job_t *job;
|
job_t *job;
|
||||||
ike_sa_id_t *to_delete;
|
ike_sa_id_t *to_delete;
|
||||||
|
iterator_t *iterator;
|
||||||
|
payload_t *payload;
|
||||||
|
|
||||||
|
/* handle NO_ADDITIONAL_SAS notify */
|
||||||
|
iterator = message->get_payload_iterator(message);
|
||||||
|
while (iterator->iterate(iterator, (void**)&payload))
|
||||||
|
{
|
||||||
|
if (payload->get_type(payload) == NOTIFY)
|
||||||
|
{
|
||||||
|
notify_payload_t *notify = (notify_payload_t*)payload;
|
||||||
|
notify_type_t type = notify->get_notify_type(notify);
|
||||||
|
|
||||||
|
if (type == NO_ADDITIONAL_SAS)
|
||||||
|
{
|
||||||
|
DBG1(DBG_IKE, "peer seems to not support IKE rekeying, "
|
||||||
|
"starting reauthentication");
|
||||||
|
this->ike_sa->set_state(this->ike_sa, IKE_ESTABLISHED);
|
||||||
|
charon->processor->queue_job(charon->processor,
|
||||||
|
(job_t*)rekey_ike_sa_job_create(
|
||||||
|
this->ike_sa->get_id(this->ike_sa), TRUE));
|
||||||
|
iterator->destroy(iterator);
|
||||||
|
return SUCCESS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
iterator->destroy(iterator);
|
||||||
|
|
||||||
switch (this->ike_init->task.process(&this->ike_init->task, message))
|
switch (this->ike_init->task.process(&this->ike_init->task, message))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user