]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
Delete the in-memory IP address pools if a connection gets deleted.
authorTobias Brunner <tobias@strongswan.org>
Wed, 31 Mar 2010 08:17:51 +0000 (10:17 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 6 Apr 2010 10:47:39 +0000 (12:47 +0200)
This fixes ipsec reload.

src/pluto/connections.c
src/pluto/whack_attribute.c

index 38803ea650a120b0a5891602ee64248271141019..b6ba57c4cd97812adc435f6afbd9752a05d7ca96 100644 (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;
index 2ccfdb3e8f63a1d73579b95c24e59f53f116642e..fcb5c13cb72c86658fafff5e8804ae90ee4f1cb7 100644 (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;