summaryrefslogtreecommitdiff
path: root/src/libcharon/sa
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcharon/sa')
-rw-r--r--src/libcharon/sa/ike_sa.c8
-rw-r--r--src/libcharon/sa/ikev2/tasks/ike_config.c2
2 files changed, 10 insertions, 0 deletions
diff --git a/src/libcharon/sa/ike_sa.c b/src/libcharon/sa/ike_sa.c
index 8c4dabd81..63c04d9c0 100644
--- a/src/libcharon/sa/ike_sa.c
+++ b/src/libcharon/sa/ike_sa.c
@@ -776,6 +776,10 @@ METHOD(ike_sa_t, clear_virtual_ips, void,
linked_list_t *vips = local ? this->my_vips : this->other_vips;
host_t *vip;
+ if (!local && vips->get_count(vips))
+ {
+ charon->bus->assign_vips(charon->bus, &this->public, FALSE);
+ }
while (vips->remove_first(vips, (void**)&vip) == SUCCESS)
{
if (local)
@@ -2105,6 +2109,10 @@ METHOD(ike_sa_t, destroy, void,
vip->destroy(vip);
}
this->my_vips->destroy(this->my_vips);
+ if (this->other_vips->get_count(this->other_vips))
+ {
+ charon->bus->assign_vips(charon->bus, &this->public, FALSE);
+ }
while (this->other_vips->remove_last(this->other_vips,
(void**)&vip) == SUCCESS)
{
diff --git a/src/libcharon/sa/ikev2/tasks/ike_config.c b/src/libcharon/sa/ikev2/tasks/ike_config.c
index d637c26fe..17132feee 100644
--- a/src/libcharon/sa/ikev2/tasks/ike_config.c
+++ b/src/libcharon/sa/ikev2/tasks/ike_config.c
@@ -387,6 +387,8 @@ METHOD(task_t, build_r, status_t,
pools->destroy(pools);
return SUCCESS;
}
+ charon->bus->assign_vips(charon->bus, this->ike_sa, TRUE);
+
if (pools->get_count(pools) && !this->vips->get_count(this->vips))
{
DBG1(DBG_IKE, "expected a virtual IP request, sending %N",