Do not ignore configs for IKEv1 in charon anymore
This commit is contained in:
@@ -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));
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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))
|
||||
{
|
||||
|
||||
@@ -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++;
|
||||
|
||||
+6
-12
@@ -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())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user