ike-sa: Log IKE endpoint changes
This commit is contained in:
committed by
Andreas Steffen
parent
79b526deba
commit
036ae27645
@@ -1196,10 +1196,30 @@ METHOD(ike_sa_t, update_hosts, void,
|
|||||||
}
|
}
|
||||||
if (new_me)
|
if (new_me)
|
||||||
{
|
{
|
||||||
|
if (this->state == IKE_ESTABLISHED)
|
||||||
|
{
|
||||||
|
DBG1(DBG_IKE, "local endpoint changed from %#H to %#H",
|
||||||
|
this->my_host, new_me);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DBG2(DBG_IKE, "local endpoint changed from %#H to %#H",
|
||||||
|
this->my_host, new_me);
|
||||||
|
}
|
||||||
set_my_host(this, new_me->clone(new_me));
|
set_my_host(this, new_me->clone(new_me));
|
||||||
}
|
}
|
||||||
if (new_other)
|
if (new_other)
|
||||||
{
|
{
|
||||||
|
if (this->state == IKE_ESTABLISHED)
|
||||||
|
{
|
||||||
|
DBG1(DBG_IKE, "remote endpoint changed from %#H to %#H",
|
||||||
|
this->other_host, new_other);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DBG2(DBG_IKE, "remote endpoint changed from %#H to %#H",
|
||||||
|
this->other_host, new_other);
|
||||||
|
}
|
||||||
set_other_host(this, new_other->clone(new_other));
|
set_other_host(this, new_other->clone(new_other));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -443,8 +443,6 @@ METHOD(task_t, process_r, status_t,
|
|||||||
other_old = this->ike_sa->get_other_host(this->ike_sa);
|
other_old = this->ike_sa->get_other_host(this->ike_sa);
|
||||||
if (!other->equals(other, other_old))
|
if (!other->equals(other, other_old))
|
||||||
{
|
{
|
||||||
DBG1(DBG_IKE, "remote address changed from %H to %H", other_old,
|
|
||||||
other);
|
|
||||||
other_new = other;
|
other_new = other;
|
||||||
/* our address might have changed too if the responder used
|
/* our address might have changed too if the responder used
|
||||||
* a different address from our list to reach us */
|
* a different address from our list to reach us */
|
||||||
|
|||||||
Reference in New Issue
Block a user