aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libcharon/plugins/smp/smp.c5
-rw-r--r--src/libcharon/plugins/stroke/stroke_control.c24
-rw-r--r--src/libcharon/plugins/stroke/stroke_list.c3
-rw-r--r--src/libcharon/processing/jobs/start_action_job.c5
-rw-r--r--src/starter/confread.c2
-rw-r--r--src/starter/starter.c18
6 files changed, 8 insertions, 49 deletions
diff --git a/src/libcharon/plugins/smp/smp.c b/src/libcharon/plugins/smp/smp.c
index 2743b7224..0db287480 100644
--- a/src/libcharon/plugins/smp/smp.c
+++ b/src/libcharon/plugins/smp/smp.c
@@ -302,11 +302,6 @@ static void request_query_config(xmlTextReaderPtr reader, xmlTextWriterPtr write
ike_cfg_t *ike_cfg;
linked_list_t *list;
- if (peer_cfg->get_ike_version(peer_cfg) != IKEV2)
- { /* only IKEv2 connections yet */
- continue;
- }
-
/* <peerconfig> */
xmlTextWriterStartElement(writer, "peerconfig");
xmlTextWriterWriteElement(writer, "name", peer_cfg->get_name(peer_cfg));
diff --git a/src/libcharon/plugins/stroke/stroke_control.c b/src/libcharon/plugins/stroke/stroke_control.c
index 5897862c3..98f57b56c 100644
--- a/src/libcharon/plugins/stroke/stroke_control.c
+++ b/src/libcharon/plugins/stroke/stroke_control.c
@@ -126,14 +126,6 @@ METHOD(stroke_control_t, initiate, void,
msg->initiate.name);
if (peer_cfg)
{
- if (peer_cfg->get_ike_version(peer_cfg) != IKEV2)
- {
- DBG1(DBG_CFG, "ignoring initiation request for %N config",
- ike_version_names, peer_cfg->get_ike_version(peer_cfg));
- peer_cfg->destroy(peer_cfg);
- return;
- }
-
child_cfg = get_child_from_peer(peer_cfg, msg->initiate.name);
if (child_cfg == NULL)
{
@@ -161,10 +153,6 @@ METHOD(stroke_control_t, initiate, void,
NULL, NULL, NULL, NULL);
while (enumerator->enumerate(enumerator, &peer_cfg))
{
- if (peer_cfg->get_ike_version(peer_cfg) != IKEV2)
- {
- continue;
- }
child_cfg = get_child_from_peer(peer_cfg, msg->initiate.name);
if (child_cfg)
{
@@ -568,14 +556,6 @@ METHOD(stroke_control_t, route, void,
msg->route.name);
if (peer_cfg)
{
- if (peer_cfg->get_ike_version(peer_cfg) != IKEV2)
- {
- DBG1(DBG_CFG, "ignoring initiation request for %N config",
- ike_version_names, peer_cfg->get_ike_version(peer_cfg));
- peer_cfg->destroy(peer_cfg);
- return;
- }
-
child_cfg = get_child_from_peer(peer_cfg, msg->route.name);
if (child_cfg == NULL)
{
@@ -603,10 +583,6 @@ METHOD(stroke_control_t, route, void,
NULL, NULL, NULL, NULL);
while (enumerator->enumerate(enumerator, &peer_cfg))
{
- if (peer_cfg->get_ike_version(peer_cfg) != IKEV2)
- {
- continue;
- }
child_cfg = get_child_from_peer(peer_cfg, msg->route.name);
if (child_cfg)
{
diff --git a/src/libcharon/plugins/stroke/stroke_list.c b/src/libcharon/plugins/stroke/stroke_list.c
index 4145a7962..2246e748d 100644
--- a/src/libcharon/plugins/stroke/stroke_list.c
+++ b/src/libcharon/plugins/stroke/stroke_list.c
@@ -489,8 +489,7 @@ METHOD(stroke_list_t, status, void,
charon->backends, NULL, NULL, NULL, NULL);
while (enumerator->enumerate(enumerator, &peer_cfg))
{
- if (peer_cfg->get_ike_version(peer_cfg) != IKEV2 ||
- (name && !streq(name, peer_cfg->get_name(peer_cfg))))
+ if (name && !streq(name, peer_cfg->get_name(peer_cfg)))
{
continue;
}
diff --git a/src/libcharon/processing/jobs/start_action_job.c b/src/libcharon/processing/jobs/start_action_job.c
index 0019a1145..efb53acea 100644
--- a/src/libcharon/processing/jobs/start_action_job.c
+++ b/src/libcharon/processing/jobs/start_action_job.c
@@ -49,11 +49,6 @@ METHOD(job_t, execute, void,
NULL, NULL, NULL, NULL);
while (enumerator->enumerate(enumerator, &peer_cfg))
{
- if (peer_cfg->get_ike_version(peer_cfg) != IKEV2)
- {
- continue;
- }
-
children = peer_cfg->create_child_cfg_enumerator(peer_cfg);
while (children->enumerate(children, &child_cfg))
{
diff --git a/src/starter/confread.c b/src/starter/confread.c
index 089be1aa5..1da4eb025 100644
--- a/src/starter/confread.c
+++ b/src/starter/confread.c
@@ -466,7 +466,7 @@ static void handle_dns_failure(const char *label, starter_end_t *end,
plog("# fallback to %s=%%any due to '%%' prefix or %sallowany=yes",
label, label);
}
- else if (!end->host || conn->keyexchange == KEY_EXCHANGE_IKEV1)
+ else if (!end->host)
{
/* declare an error */
cfg->err++;
diff --git a/src/starter/starter.c b/src/starter/starter.c
index 44e21431c..15c50c44b 100644
--- a/src/starter/starter.c
+++ b/src/starter/starter.c
@@ -764,14 +764,11 @@ int main (int argc, char **argv)
if (conn->startup == STARTUP_START)
{
- if (conn->keyexchange != KEY_EXCHANGE_IKEV1)
+ if (starter_charon_pid())
{
- if (starter_charon_pid())
- {
- starter_stroke_initiate_conn(conn);
- }
+ starter_stroke_initiate_conn(conn);
}
- else
+ if (conn->keyexchange == KEY_EXCHANGE_IKEV1)
{
if (starter_pluto_pid())
{
@@ -781,14 +778,11 @@ int main (int argc, char **argv)
}
else if (conn->startup == STARTUP_ROUTE)
{
- if (conn->keyexchange != KEY_EXCHANGE_IKEV1)
+ if (starter_charon_pid())
{
- if (starter_charon_pid())
- {
- starter_stroke_route_conn(conn);
- }
+ starter_stroke_route_conn(conn);
}
- else
+ if (conn->keyexchange == KEY_EXCHANGE_IKEV1)
{
if (starter_pluto_pid())
{