vici: Actually add configured virtual IPs to peer config
authorMartin Willi <martin@revosec.ch>
Tue, 15 Apr 2014 11:21:11 +0000 (13:21 +0200)
committerMartin Willi <martin@revosec.ch>
Wed, 7 May 2014 12:13:37 +0000 (14:13 +0200)
src/libcharon/plugins/vici/vici_config.c

index 2d2f531..ee18349 100644 (file)
@@ -1689,6 +1689,7 @@ CALLBACK(config_sn, bool,
        child_cfg_t *child_cfg;
        auth_cfg_t *auth_cfg;
        proposal_t *proposal;
+       host_t *host;
 
        DBG2(DBG_CFG, " conn %s:", name);
 
@@ -1768,6 +1769,10 @@ CALLBACK(config_sn, bool,
        {
                ike_cfg->add_proposal(ike_cfg, proposal);
        }
+       while (peer.vips->remove_first(peer.vips, (void**)&host) == SUCCESS)
+       {
+               peer_cfg->add_virtual_ip(peer_cfg, host);
+       }
 
        free_peer_data(&peer);