diff options
author | Tobias Brunner <tobias@strongswan.org> | 2010-03-31 10:17:51 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2010-04-06 12:47:39 +0200 |
commit | 4e06abe0fafd8590da4cd83f1c435947e0561a82 (patch) | |
tree | 108ab579d58672da434cf5000040ad74c26252c6 /src | |
parent | bd228233584b03615d3c3b9be0823b86d0526244 (diff) | |
download | strongswan-4e06abe0fafd8590da4cd83f1c435947e0561a82.tar.bz2 strongswan-4e06abe0fafd8590da4cd83f1c435947e0561a82.tar.xz |
Delete the in-memory IP address pools if a connection gets deleted.
This fixes ipsec reload.
Diffstat (limited to 'src')
-rw-r--r-- | src/pluto/connections.c | 5 | ||||
-rw-r--r-- | src/pluto/whack_attribute.c | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/pluto/connections.c b/src/pluto/connections.c index 38803ea65..b6ba57c4c 100644 --- a/src/pluto/connections.c +++ b/src/pluto/connections.c @@ -376,6 +376,11 @@ void delete_connection(connection_t *c, bool relations) vip->destroy(vip); } + if (c->kind != CK_GOING_AWAY) + { + whack_attr->del_pool(whack_attr, c->name); + } + /* free internal data */ #ifdef DEBUG cur_debugging = old_cur_debugging; diff --git a/src/pluto/whack_attribute.c b/src/pluto/whack_attribute.c index 2ccfdb3e8..fcb5c13cb 100644 --- a/src/pluto/whack_attribute.c +++ b/src/pluto/whack_attribute.c @@ -160,6 +160,9 @@ METHOD(whack_attribute_t, del_pool, void, { if (streq(name, pool->get_name(pool))) { + DBG(DBG_CONTROL, + DBG_log("deleting virtual IP address pool '%s'", name) + ); this->pools->remove_at(this->pools, enumerator); pool->destroy(pool); break; |