added fake_kernel option to make dummy kernel implementation optional
authorMartin Willi <martin@strongswan.org>
Mon, 3 Nov 2008 15:11:01 +0000 (15:11 -0000)
committerMartin Willi <martin@strongswan.org>
Mon, 3 Nov 2008 15:11:01 +0000 (15:11 -0000)
src/charon/plugins/load_tester/load_tester_config.c
src/charon/plugins/load_tester/load_tester_plugin.c

index 90545cd..9fb01b9 100644 (file)
@@ -115,7 +115,7 @@ load_tester_config_t *load_tester_config_create()
        auth = this->peer_cfg->get_auth(this->peer_cfg);
        class = AUTH_CLASS_PUBKEY;
        auth->add_item(auth, AUTHN_AUTH_CLASS, &class);
-       child_cfg = child_cfg_create("load-test", 0, 0, 300, NULL, TRUE,
+       child_cfg = child_cfg_create("load-test", 600, 400, 100, NULL, TRUE,
                                                                 MODE_TUNNEL, ACTION_NONE, ACTION_NONE, FALSE);
        proposal = proposal_create_from_string(PROTO_ESP, "aes128-sha1");
        child_cfg->add_proposal(child_cfg, proposal);
index 563ca97..86a7e1d 100644 (file)
@@ -113,9 +113,13 @@ plugin_t *plugin_create()
        this->creds = load_tester_creds_create();
        charon->backends->add_backend(charon->backends, &this->config->backend);
        charon->credentials->add_set(charon->credentials, &this->creds->credential_set);
-       charon->kernel_interface->add_ipsec_interface(charon->kernel_interface, 
-                                               (kernel_ipsec_constructor_t)load_tester_ipsec_create);
        
+       if (lib->settings->get_bool(lib->settings,
+                                                               "charon.plugins.load_tester.fake_kernel", FALSE))
+       {
+               charon->kernel_interface->add_ipsec_interface(charon->kernel_interface, 
+                                               (kernel_ipsec_constructor_t)load_tester_ipsec_create);
+       }
        initiators = lib->settings->get_int(lib->settings,
                                                "charon.plugins.load_tester.initiators", 1);
        while (initiators-- > 0)