ike-config: Ignore unrequested virtual IP addresses
But forward them to handlers in case they requested them.
This commit is contained in:
@@ -41,6 +41,11 @@ struct private_ike_config_t {
|
|||||||
*/
|
*/
|
||||||
bool initiator;
|
bool initiator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Did we request a virtual IP?
|
||||||
|
*/
|
||||||
|
bool vip_requested;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Received list of virtual IPs, host_t*
|
* Received list of virtual IPs, host_t*
|
||||||
*/
|
*/
|
||||||
@@ -149,6 +154,12 @@ static void process_attribute(private_ike_config_t *this,
|
|||||||
/* fall */
|
/* fall */
|
||||||
case INTERNAL_IP6_ADDRESS:
|
case INTERNAL_IP6_ADDRESS:
|
||||||
{
|
{
|
||||||
|
if (this->initiator && !this->vip_requested)
|
||||||
|
{
|
||||||
|
handle_attribute(this, ca);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
addr = ca->get_chunk(ca);
|
addr = ca->get_chunk(ca);
|
||||||
if (addr.len == 0)
|
if (addr.len == 0)
|
||||||
{
|
{
|
||||||
@@ -270,6 +281,7 @@ METHOD(task_t, build_i, status_t,
|
|||||||
cp->add_attribute(cp, build_vip(host));
|
cp->add_attribute(cp, build_vip(host));
|
||||||
}
|
}
|
||||||
enumerator->destroy(enumerator);
|
enumerator->destroy(enumerator);
|
||||||
|
this->vip_requested = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
enumerator = charon->attributes->create_initiator_enumerator(
|
enumerator = charon->attributes->create_initiator_enumerator(
|
||||||
|
|||||||
Reference in New Issue
Block a user