]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
Add the ability to use a named pool for conftest configs
authorTobias Brunner <tobias@strongswan.org>
Thu, 13 Dec 2012 14:31:47 +0000 (15:31 +0100)
committerTobias Brunner <tobias@strongswan.org>
Mon, 21 Jan 2013 10:46:20 +0000 (11:46 +0100)
src/conftest/README
src/conftest/config.c

index 133ae603c273368c4ece15255e9c5d168fab946a..617195df921ccd412f9c8ae607c5b65931299b7d 100644 (file)
@@ -98,9 +98,10 @@ The IKE_SA configuration uses the following options (as key/value pairs):
                   src/libstrongswan/crypt/proposal/proposal_keywords.txt
   fake_nat:       Fake the NAT_DETECTION_*_IP payloads to simulate a NAT
                   scenario
-  rsa_strength:   connection requires a trustchain with RSA keys of given bits
-  ecdsa_strength: connection requires a trustchain with ECDSA keys of given bits
-  cert_policy:    connection requries a certificate with the given OID policy
+  rsa_strength:   Connection requires a trustchain with RSA keys of given bits
+  ecdsa_strength: Connection requires a trustchain with ECDSA keys of given bits
+  cert_policy:    Connection requries a certificate with the given OID policy
+  named_pool:     Name of an IP pool defined e.g. in a database backend
 
 The following CHILD_SA specific configuration options are supported:
 
index 22c9d23e0cc0c2d49bd89550adc340e7625d65fd..ae0d93460556751569d6ab99f3d20aecdcb022ed 100644 (file)
@@ -244,7 +244,7 @@ static peer_cfg_t *load_peer_config(private_config_t *this,
        child_cfg_t *child_cfg;
        enumerator_t *enumerator;
        identification_t *lid, *rid;
-       char *child, *policy;
+       char *child, *policy, *pool;
        uintptr_t strength;
 
        ike_cfg = load_ike_config(this, settings, config);
@@ -280,6 +280,11 @@ static peer_cfg_t *load_peer_config(private_config_t *this,
        }
        auth->add(auth, AUTH_RULE_IDENTITY, rid);
        peer_cfg->add_auth_cfg(peer_cfg, auth, FALSE);
+       pool = settings->get_str(settings, "configs.%s.named_pool", NULL, config);
+       if (pool)
+       {
+               peer_cfg->add_pool(peer_cfg, pool);
+       }
 
        DBG1(DBG_CFG, "loaded config %s: %Y - %Y", config, lid, rid);