mobike: try to keep existing source address before switching to another
This commit is contained in:
@@ -277,7 +277,7 @@ static void transmit(private_ike_mobike_t *this, packet_t *packet)
|
||||
other_old = this->ike_sa->get_other_host(this->ike_sa);
|
||||
|
||||
me = charon->kernel_interface->get_source_addr(
|
||||
charon->kernel_interface, other_old);
|
||||
charon->kernel_interface, other_old, NULL);
|
||||
if (me)
|
||||
{
|
||||
me->set_port(me, me->ip_equals(me, me_old) ?
|
||||
@@ -289,7 +289,7 @@ static void transmit(private_ike_mobike_t *this, packet_t *packet)
|
||||
while (iterator->iterate(iterator, (void**)&other))
|
||||
{
|
||||
me = charon->kernel_interface->get_source_addr(
|
||||
charon->kernel_interface, other);
|
||||
charon->kernel_interface, other, NULL);
|
||||
if (me)
|
||||
{
|
||||
if (me->get_family(me) != other->get_family(other))
|
||||
|
||||
@@ -341,9 +341,8 @@ static status_t build_i(private_ike_natd_t *this, message_t *message)
|
||||
}
|
||||
else
|
||||
{
|
||||
host = charon->kernel_interface->get_source_addr(
|
||||
charon->kernel_interface,
|
||||
this->ike_sa->get_other_host(this->ike_sa));
|
||||
host = charon->kernel_interface->get_source_addr(charon->kernel_interface,
|
||||
this->ike_sa->get_other_host(this->ike_sa), NULL);
|
||||
if (host)
|
||||
{ /* 2. */
|
||||
host->set_port(host, IKEV2_UDP_PORT);
|
||||
|
||||
Reference in New Issue
Block a user