Enforce a local address of the same family as remote address
This commit is contained in:
@@ -1075,9 +1075,15 @@ static void resolve_hosts(private_ike_sa_t *this)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
int family = 0;
|
||||||
|
|
||||||
|
/* use same address family as for other */
|
||||||
|
if (!this->other_host->is_anyaddr(this->other_host))
|
||||||
|
{
|
||||||
|
family = this->other_host->get_family(this->other_host);
|
||||||
|
}
|
||||||
host = host_create_from_dns(this->ike_cfg->get_my_addr(this->ike_cfg),
|
host = host_create_from_dns(this->ike_cfg->get_my_addr(this->ike_cfg),
|
||||||
this->my_host->get_family(this->my_host),
|
family, IKEV2_UDP_PORT);
|
||||||
IKEV2_UDP_PORT);
|
|
||||||
|
|
||||||
if (host && host->is_anyaddr(host) &&
|
if (host && host->is_anyaddr(host) &&
|
||||||
!this->other_host->is_anyaddr(this->other_host))
|
!this->other_host->is_anyaddr(this->other_host))
|
||||||
|
|||||||
Reference in New Issue
Block a user