ike-mobike: Allow calling transmit() even when not currently path probing
Path probing is enabled if the current path is not available anymore.
This commit is contained in:
@@ -316,9 +316,25 @@ METHOD(ike_mobike_t, transmit, bool,
|
|||||||
int family = AF_UNSPEC;
|
int family = AF_UNSPEC;
|
||||||
bool found = FALSE;
|
bool found = FALSE;
|
||||||
|
|
||||||
|
me_old = this->ike_sa->get_my_host(this->ike_sa);
|
||||||
|
other_old = this->ike_sa->get_other_host(this->ike_sa);
|
||||||
|
ike_cfg = this->ike_sa->get_ike_cfg(this->ike_sa);
|
||||||
|
|
||||||
if (!this->check)
|
if (!this->check)
|
||||||
{
|
{
|
||||||
return TRUE;
|
me = hydra->kernel_interface->get_source_addr(hydra->kernel_interface,
|
||||||
|
other_old, me_old);
|
||||||
|
if (me)
|
||||||
|
{
|
||||||
|
if (me->ip_equals(me, me_old))
|
||||||
|
{
|
||||||
|
charon->sender->send(charon->sender, packet->clone(packet));
|
||||||
|
me->destroy(me);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
me->destroy(me);
|
||||||
|
}
|
||||||
|
this->check = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (charon->socket->supported_families(charon->socket))
|
switch (charon->socket->supported_families(charon->socket))
|
||||||
@@ -334,10 +350,6 @@ METHOD(ike_mobike_t, transmit, bool,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
me_old = this->ike_sa->get_my_host(this->ike_sa);
|
|
||||||
other_old = this->ike_sa->get_other_host(this->ike_sa);
|
|
||||||
ike_cfg = this->ike_sa->get_ike_cfg(this->ike_sa);
|
|
||||||
|
|
||||||
enumerator = this->ike_sa->create_peer_address_enumerator(this->ike_sa);
|
enumerator = this->ike_sa->create_peer_address_enumerator(this->ike_sa);
|
||||||
while (enumerator->enumerate(enumerator, (void**)&other))
|
while (enumerator->enumerate(enumerator, (void**)&other))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user