Sync remote virtual IP for IKEv1 SAs
This commit is contained in:
@@ -296,6 +296,7 @@ METHOD(listener_t, message_hook, bool,
|
|||||||
keymat_v1_t *keymat;
|
keymat_v1_t *keymat;
|
||||||
u_int32_t mid;
|
u_int32_t mid;
|
||||||
chunk_t iv;
|
chunk_t iv;
|
||||||
|
host_t *vip;
|
||||||
|
|
||||||
mid = message->get_message_id(message);
|
mid = message->get_message_id(message);
|
||||||
if (mid == 0)
|
if (mid == 0)
|
||||||
@@ -309,6 +310,18 @@ METHOD(listener_t, message_hook, bool,
|
|||||||
this->socket->push(this->socket, m);
|
this->socket->push(this->socket, m);
|
||||||
this->cache->cache(this->cache, ike_sa, m);
|
this->cache->cache(this->cache, ike_sa, m);
|
||||||
}
|
}
|
||||||
|
if (!incoming && message->get_exchange_type(message) == TRANSACTION)
|
||||||
|
{
|
||||||
|
vip = ike_sa->get_virtual_ip(ike_sa, FALSE);
|
||||||
|
if (vip)
|
||||||
|
{
|
||||||
|
m = ha_message_create(HA_IKE_UPDATE);
|
||||||
|
m->add_attribute(m, HA_IKE_ID, ike_sa->get_id(ike_sa));
|
||||||
|
m->add_attribute(m, HA_REMOTE_VIP, vip);
|
||||||
|
this->socket->push(this->socket, m);
|
||||||
|
this->cache->cache(this->cache, ike_sa, m);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user