added fake_kernel option to make dummy kernel implementation optional

This commit is contained in:
Martin Willi 2008-11-03 15:11:01 +00:00
parent ee66fa625e
commit 4d901e3584
2 changed files with 7 additions and 3 deletions

View 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);

View 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)