diff options
author | Yves-Alexis Perez <corsac@debian.org> | 2013-04-30 17:51:33 +0200 |
---|---|---|
committer | Yves-Alexis Perez <corsac@debian.org> | 2013-04-30 17:51:33 +0200 |
commit | c83921a2b566aa9d55d8ccc7258f04fca6292ee6 (patch) | |
tree | 44039788fc816c84d5788df847d1555413ebe55a /src/libcharon/sa | |
parent | 10e5fb2b9b2f27c83b3e5a1d048b158d5cf42a43 (diff) | |
download | vyos-strongswan-c83921a2b566aa9d55d8ccc7258f04fca6292ee6.tar.gz vyos-strongswan-c83921a2b566aa9d55d8ccc7258f04fca6292ee6.zip |
Imported Upstream version 5.0.4
Diffstat (limited to 'src/libcharon/sa')
-rw-r--r-- | src/libcharon/sa/ike_sa.c | 8 | ||||
-rw-r--r-- | src/libcharon/sa/ikev2/tasks/ike_config.c | 2 |
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", |