ike-rekey: Add the name/ID of the redundant IKE_SAs to the log messages

This commit is contained in:
Tobias Brunner
2016-06-17 18:48:04 +02:00
parent b5695bbffc
commit d6ac7496e6
+11 -6
View File
@@ -317,14 +317,19 @@ METHOD(task_t, process_i, status_t,
job_t *job = (job_t*)delete_ike_sa_job_create( job_t *job = (job_t*)delete_ike_sa_job_create(
other->new_sa->get_id(other->new_sa), TRUE); other->new_sa->get_id(other->new_sa), TRUE);
lib->scheduler->schedule_job(lib->scheduler, job, 10); lib->scheduler->schedule_job(lib->scheduler, job, 10);
DBG1(DBG_IKE, "IKE_SA rekey collision won, waiting for delete"); DBG1(DBG_IKE, "IKE_SA rekey collision won, waiting for delete "
charon->ike_sa_manager->checkin(charon->ike_sa_manager, other->new_sa); "for redundant IKE_SA %s[%d]",
other->new_sa->get_name(other->new_sa),
other->new_sa->get_unique_id(other->new_sa));
charon->ike_sa_manager->checkin(charon->ike_sa_manager,
other->new_sa);
other->new_sa = NULL; other->new_sa = NULL;
} }
else else
{ {
DBG1(DBG_IKE, "IKE_SA rekey collision lost, " DBG1(DBG_IKE, "IKE_SA rekey collision lost, deleting redundant "
"deleting redundant IKE_SA"); "IKE_SA %s[%d]", this->new_sa->get_name(this->new_sa),
this->new_sa->get_unique_id(this->new_sa));
/* apply host for a proper delete */ /* apply host for a proper delete */
host = this->ike_sa->get_my_host(this->ike_sa); host = this->ike_sa->get_my_host(this->ike_sa);
this->new_sa->set_my_host(this->new_sa, host->clone(host)); this->new_sa->set_my_host(this->new_sa, host->clone(host));
@@ -338,8 +343,8 @@ METHOD(task_t, process_i, status_t,
} }
else else
{ {
charon->ike_sa_manager->checkin( charon->ike_sa_manager->checkin(charon->ike_sa_manager,
charon->ike_sa_manager, this->new_sa); this->new_sa);
} }
charon->bus->set_sa(charon->bus, this->ike_sa); charon->bus->set_sa(charon->bus, this->ike_sa);
this->new_sa = NULL; this->new_sa = NULL;