]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
vici: Maintain connection order when replacing one
authorTobias Brunner <tobias@strongswan.org>
Mon, 28 May 2018 15:36:03 +0000 (17:36 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 26 Jun 2018 13:10:40 +0000 (15:10 +0200)
src/libcharon/plugins/vici/vici_config.c

index 78a77d271a2f801d989d73fc47e34e66b9e4122c..dfb4c84f3804a5d09a5581af4a9cc584922e7333 100644 (file)
@@ -2212,8 +2212,8 @@ static void merge_config(private_vici_config_t *this, peer_cfg_t *peer_cfg)
                        {
                                DBG1(DBG_CFG, "replaced vici connection: %s",
                                         peer_cfg->get_name(peer_cfg));
+                               this->conns->insert_before(this->conns, enumerator, peer_cfg);
                                this->conns->remove_at(this->conns, enumerator);
-                               this->conns->insert_last(this->conns, peer_cfg);
                                handle_start_actions(this, current, TRUE);
                                handle_start_actions(this, peer_cfg, FALSE);
                                current->destroy(current);