mediation extension adapted to the naming convention of the current version of the draft. note: the external interface (config, autotools) has not yet been changed

This commit is contained in:
Tobias Brunner
2008-03-26 18:40:19 +00:00
parent 685232670a
commit dc04b7c743
47 changed files with 522 additions and 522 deletions
+11 -11
View File
@@ -375,8 +375,8 @@ static peer_cfg_t *build_peer_cfg(private_stroke_config_t *this,
}
#ifdef P2P
if (msg->add_conn.p2p.mediation && msg->add_conn.p2p.mediated_by)
#ifdef ME
if (msg->add_conn.ikeme.mediation && msg->add_conn.ikeme.mediated_by)
{
DBG1(DBG_CFG, "a mediation connection cannot be a"
" mediated connection at the same time, aborting");
@@ -385,14 +385,14 @@ static peer_cfg_t *build_peer_cfg(private_stroke_config_t *this,
return NULL;
}
if (msg->add_conn.p2p.mediated_by)
if (msg->add_conn.ikeme.mediated_by)
{
mediated_by = charon->backends->get_peer_cfg_by_name(charon->backends,
msg->add_conn.p2p.mediated_by);
msg->add_conn.ikeme.mediated_by);
if (!mediated_by)
{
DBG1(DBG_CFG, "mediation connection '%s' not found, aborting",
msg->add_conn.p2p.mediated_by);
msg->add_conn.ikeme.mediated_by);
me->destroy(me);
other->destroy(other);
return NULL;
@@ -402,7 +402,7 @@ static peer_cfg_t *build_peer_cfg(private_stroke_config_t *this,
{
DBG1(DBG_CFG, "connection '%s' as referred to by '%s' is"
"no mediation connection, aborting",
msg->add_conn.p2p.mediated_by, msg->add_conn.name);
msg->add_conn.ikeme.mediated_by, msg->add_conn.name);
mediated_by->destroy(mediated_by);
me->destroy(me);
other->destroy(other);
@@ -410,12 +410,12 @@ static peer_cfg_t *build_peer_cfg(private_stroke_config_t *this,
}
}
if (msg->add_conn.p2p.peerid)
if (msg->add_conn.ikeme.peerid)
{
peer_id = identification_create_from_string(msg->add_conn.p2p.peerid);
peer_id = identification_create_from_string(msg->add_conn.ikeme.peerid);
if (!peer_id)
{
DBG1(DBG_CFG, "invalid peer ID: %s\n", msg->add_conn.p2p.peerid);
DBG1(DBG_CFG, "invalid peer ID: %s\n", msg->add_conn.ikeme.peerid);
mediated_by->destroy(mediated_by);
me->destroy(me);
other->destroy(other);
@@ -427,7 +427,7 @@ static peer_cfg_t *build_peer_cfg(private_stroke_config_t *this,
/* no peer ID supplied, assume right ID */
peer_id = other->clone(other);
}
#endif /* P2P */
#endif /* ME */
if (msg->add_conn.me.cert)
{
@@ -471,7 +471,7 @@ static peer_cfg_t *build_peer_cfg(private_stroke_config_t *this,
msg->add_conn.eap_type, msg->add_conn.eap_vendor,
msg->add_conn.rekey.tries, rekey, reauth, jitter, over,
msg->add_conn.mobike, msg->add_conn.dpd.delay, msg->add_conn.dpd.action,
my_vip, other_vip, msg->add_conn.p2p.mediation, mediated_by, peer_id);
my_vip, other_vip, msg->add_conn.ikeme.mediation, mediated_by, peer_id);
}
/**
+5 -5
View File
@@ -166,11 +166,11 @@ static void stroke_add_conn(private_stroke_socket_t *this, stroke_msg_t *msg)
pop_string(msg, &msg->add_conn.algorithms.esp);
DBG2(DBG_CFG, " ike=%s", msg->add_conn.algorithms.ike);
DBG2(DBG_CFG, " esp=%s", msg->add_conn.algorithms.esp);
pop_string(msg, &msg->add_conn.p2p.mediated_by);
pop_string(msg, &msg->add_conn.p2p.peerid);
DBG2(DBG_CFG, " p2p_mediation=%s", msg->add_conn.p2p.mediation ? "yes" : "no");
DBG2(DBG_CFG, " p2p_mediated_by=%s", msg->add_conn.p2p.mediated_by);
DBG2(DBG_CFG, " p2p_peerid=%s", msg->add_conn.p2p.peerid);
pop_string(msg, &msg->add_conn.ikeme.mediated_by);
pop_string(msg, &msg->add_conn.ikeme.peerid);
DBG2(DBG_CFG, " p2p_mediation=%s", msg->add_conn.ikeme.mediation ? "yes" : "no");
DBG2(DBG_CFG, " p2p_mediated_by=%s", msg->add_conn.ikeme.mediated_by);
DBG2(DBG_CFG, " p2p_peerid=%s", msg->add_conn.ikeme.peerid);
this->config->add(this->config, msg);
}