Delete the in-memory IP address pools if a connection gets deleted.

This fixes ipsec reload.
This commit is contained in:
Tobias Brunner
2010-04-06 12:47:39 +02:00
parent bd22823358
commit 4e06abe0fa
2 changed files with 8 additions and 0 deletions
+5
View File
@@ -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;
+3
View File
@@ -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;