ike-sa: Use a struct to pass optional arguments when initiating CHILD_SAs

This commit is contained in:
Tobias Brunner
2022-04-14 18:42:01 +02:00
parent 366ac36a1f
commit 7f30e1aea2
18 changed files with 80 additions and 55 deletions
+1 -1
View File
@@ -903,7 +903,7 @@ static gboolean connect_(NMVpnServicePlugin *plugin, NMConnection *connection,
* Initiate * Initiate
*/ */
child_cfg->get_ref(child_cfg); child_cfg->get_ref(child_cfg);
if (ike_sa->initiate(ike_sa, child_cfg, 0, NULL, NULL) != SUCCESS) if (ike_sa->initiate(ike_sa, child_cfg, NULL) != SUCCESS)
{ {
charon->ike_sa_manager->checkin_and_destroy(charon->ike_sa_manager, ike_sa); charon->ike_sa_manager->checkin_and_destroy(charon->ike_sa_manager, ike_sa);
@@ -924,7 +924,7 @@ static job_requeue_t initiate(private_android_service_t *this)
/* get an additional reference because initiate consumes one */ /* get an additional reference because initiate consumes one */
child_cfg->get_ref(child_cfg); child_cfg->get_ref(child_cfg);
if (ike_sa->initiate(ike_sa, child_cfg, 0, NULL, NULL) != SUCCESS) if (ike_sa->initiate(ike_sa, child_cfg, NULL) != SUCCESS)
{ {
DBG1(DBG_CFG, "failed to initiate tunnel"); DBG1(DBG_CFG, "failed to initiate tunnel");
charon->ike_sa_manager->checkin_and_destroy(charon->ike_sa_manager, charon->ike_sa_manager->checkin_and_destroy(charon->ike_sa_manager,
+1 -1
View File
@@ -473,7 +473,7 @@ METHOD(job_t, initiate_execute, job_requeue_t,
} }
} }
if (ike_sa->initiate(ike_sa, listener->child_cfg, 0, NULL, NULL) == SUCCESS) if (ike_sa->initiate(ike_sa, listener->child_cfg, NULL) == SUCCESS)
{ {
if (!listener->logger.callback) if (!listener->logger.callback)
{ {
@@ -253,7 +253,7 @@ METHOD(job_t, execute, job_requeue_t,
task->migrate(task, ike_sa); task->migrate(task, ike_sa);
ike_sa->queue_task(ike_sa, task); ike_sa->queue_task(ike_sa, task);
} }
if (ike_sa->initiate(ike_sa, NULL, 0, NULL, NULL) == DESTROY_ME) if (ike_sa->initiate(ike_sa, NULL, NULL) == DESTROY_ME)
{ {
charon->ike_sa_manager->checkin_and_destroy( charon->ike_sa_manager->checkin_and_destroy(
charon->ike_sa_manager, ike_sa); charon->ike_sa_manager, ike_sa);
@@ -55,7 +55,7 @@ METHOD(job_t, execute, job_requeue_t,
this->ike_sa_id); this->ike_sa_id);
if (ike_sa) if (ike_sa)
{ {
if (ike_sa->initiate(ike_sa, NULL, 0, NULL, NULL) == DESTROY_ME) if (ike_sa->initiate(ike_sa, NULL, NULL) == DESTROY_ME)
{ {
charon->ike_sa_manager->checkin_and_destroy(charon->ike_sa_manager, charon->ike_sa_manager->checkin_and_destroy(charon->ike_sa_manager,
ike_sa); ike_sa);
+9 -9
View File
@@ -1531,8 +1531,7 @@ static void resolve_hosts(private_ike_sa_t *this)
} }
METHOD(ike_sa_t, initiate, status_t, METHOD(ike_sa_t, initiate, status_t,
private_ike_sa_t *this, child_cfg_t *child_cfg, uint32_t reqid, private_ike_sa_t *this, child_cfg_t *child_cfg, child_init_args_t *args)
traffic_selector_t *tsi, traffic_selector_t *tsr)
{ {
bool defer_initiate = FALSE; bool defer_initiate = FALSE;
@@ -1587,8 +1586,7 @@ METHOD(ike_sa_t, initiate, status_t,
if (child_cfg) if (child_cfg)
{ {
/* normal IKE_SA with CHILD_SA */ /* normal IKE_SA with CHILD_SA */
this->task_manager->queue_child(this->task_manager, child_cfg, reqid, this->task_manager->queue_child(this->task_manager, child_cfg, args);
tsi, tsr);
#ifdef ME #ifdef ME
if (this->peer_cfg->get_mediated_by(this->peer_cfg)) if (this->peer_cfg->get_mediated_by(this->peer_cfg))
{ {
@@ -1621,7 +1619,7 @@ METHOD(ike_sa_t, retry_initiate, status_t,
if (this->retry_initiate_queued) if (this->retry_initiate_queued)
{ {
this->retry_initiate_queued = FALSE; this->retry_initiate_queued = FALSE;
return initiate(this, NULL, 0, NULL, NULL); return initiate(this, NULL, NULL);
} }
return SUCCESS; return SUCCESS;
} }
@@ -2077,13 +2075,15 @@ static status_t reestablish_children(private_ike_sa_t *this, ike_sa_t *new,
} }
if (action == ACTION_RESTART) if (action == ACTION_RESTART)
{ {
child_init_args_t args = {
.reqid = child_sa->get_reqid(child_sa),
};
child_cfg = child_sa->get_config(child_sa); child_cfg = child_sa->get_config(child_sa);
DBG1(DBG_IKE, "restarting CHILD_SA %s", DBG1(DBG_IKE, "restarting CHILD_SA %s",
child_cfg->get_name(child_cfg)); child_cfg->get_name(child_cfg));
other->task_manager->queue_child(other->task_manager, other->task_manager->queue_child(other->task_manager,
child_cfg->get_ref(child_cfg), child_cfg->get_ref(child_cfg),
child_sa->get_reqid(child_sa), &args);
NULL, NULL);
} }
} }
enumerator->destroy(enumerator); enumerator->destroy(enumerator);
@@ -2091,7 +2091,7 @@ static status_t reestablish_children(private_ike_sa_t *this, ike_sa_t *new,
/* adopt any active or queued CHILD-creating tasks */ /* adopt any active or queued CHILD-creating tasks */
new->adopt_child_tasks(new, &this->public); new->adopt_child_tasks(new, &this->public);
return new->initiate(new, NULL, 0, NULL, NULL); return new->initiate(new, NULL, NULL);
} }
METHOD(ike_sa_t, reestablish, status_t, METHOD(ike_sa_t, reestablish, status_t,
@@ -2224,7 +2224,7 @@ METHOD(ike_sa_t, reestablish, status_t,
#ifdef ME #ifdef ME
if (this->peer_cfg->is_mediation(this->peer_cfg)) if (this->peer_cfg->is_mediation(this->peer_cfg))
{ {
status = new->initiate(new, NULL, 0, NULL, NULL); status = new->initiate(new, NULL, NULL);
} }
else else
#endif /* ME */ #endif /* ME */
+15 -5
View File
@@ -29,6 +29,7 @@ typedef enum ike_condition_t ike_condition_t;
typedef enum ike_sa_state_t ike_sa_state_t; typedef enum ike_sa_state_t ike_sa_state_t;
typedef enum statistic_t statistic_t; typedef enum statistic_t statistic_t;
typedef enum update_hosts_flag_t update_hosts_flag_t; typedef enum update_hosts_flag_t update_hosts_flag_t;
typedef struct child_init_args_t child_init_args_t;
typedef struct ike_sa_t ike_sa_t; typedef struct ike_sa_t ike_sa_t;
#include <library.h> #include <library.h>
@@ -369,6 +370,18 @@ enum ike_sa_state_t {
*/ */
extern enum_name_t *ike_sa_state_names; extern enum_name_t *ike_sa_state_names;
/**
* Optional arguments passed when initiating a CHILD_SA.
*/
struct child_init_args_t {
/** Reqid to use for CHILD_SA, 0 to assign automatically */
uint32_t reqid;
/** Optional source of triggering packet */
traffic_selector_t *src;
/** Optional destination of triggering packet */
traffic_selector_t *dst;
};
/** /**
* Class ike_sa_t representing an IKE_SA. * Class ike_sa_t representing an IKE_SA.
* *
@@ -787,16 +800,13 @@ struct ike_sa_t {
* to the CHILD_SA. * to the CHILD_SA.
* *
* @param child_cfg child config to create CHILD from * @param child_cfg child config to create CHILD from
* @param reqid reqid to use for CHILD_SA, 0 assign uniquely * @param args optional arguments for the CHILD initiation
* @param tsi source of triggering packet
* @param tsr destination of triggering packet.
* @return * @return
* - SUCCESS if initialization started * - SUCCESS if initialization started
* - DESTROY_ME if initialization failed * - DESTROY_ME if initialization failed
*/ */
status_t (*initiate) (ike_sa_t *this, child_cfg_t *child_cfg, status_t (*initiate) (ike_sa_t *this, child_cfg_t *child_cfg,
uint32_t reqid, traffic_selector_t *tsi, child_init_args_t *args);
traffic_selector_t *tsr);
/** /**
* Retry initiation of this IKE_SA after it got deferred previously. * Retry initiation of this IKE_SA after it got deferred previously.
+11 -6
View File
@@ -1685,7 +1685,7 @@ METHOD(task_manager_t, queue_ike_reauth, void,
enumerator->destroy(enumerator); enumerator->destroy(enumerator);
} }
if (new->initiate(new, NULL, 0, NULL, NULL) != DESTROY_ME) if (new->initiate(new, NULL, NULL) != DESTROY_ME)
{ {
charon->ike_sa_manager->checkin(charon->ike_sa_manager, new); charon->ike_sa_manager->checkin(charon->ike_sa_manager, new);
this->ike_sa->set_state(this->ike_sa, IKE_REKEYING); this->ike_sa->set_state(this->ike_sa, IKE_REKEYING);
@@ -1732,14 +1732,19 @@ METHOD(task_manager_t, queue_mobike, void,
} }
METHOD(task_manager_t, queue_child, void, METHOD(task_manager_t, queue_child, void,
private_task_manager_t *this, child_cfg_t *cfg, uint32_t reqid, private_task_manager_t *this, child_cfg_t *cfg, child_init_args_t *args)
traffic_selector_t *tsi, traffic_selector_t *tsr)
{ {
quick_mode_t *task; quick_mode_t *task;
task = quick_mode_create(this->ike_sa, cfg, tsi, tsr); if (args)
task->use_reqid(task, reqid); {
task = quick_mode_create(this->ike_sa, cfg, args->src, args->dst);
task->use_reqid(task, args->reqid);
}
else
{
task = quick_mode_create(this->ike_sa, cfg, NULL, NULL);
}
queue_task(this, &task->task); queue_task(this, &task->task);
} }
+4 -1
View File
@@ -149,6 +149,9 @@ static status_t delete_child(private_quick_delete_t *this,
if (remote_close) if (remote_close)
{ {
child_init_args_t args = {
.reqid = child_sa->get_reqid(child_sa),
};
child_cfg = child_sa->get_config(child_sa); child_cfg = child_sa->get_config(child_sa);
child_cfg->get_ref(child_cfg); child_cfg->get_ref(child_cfg);
@@ -157,7 +160,7 @@ static status_t delete_child(private_quick_delete_t *this,
case ACTION_RESTART: case ACTION_RESTART:
child_cfg->get_ref(child_cfg); child_cfg->get_ref(child_cfg);
status = this->ike_sa->initiate(this->ike_sa, child_cfg, status = this->ike_sa->initiate(this->ike_sa, child_cfg,
child_sa->get_reqid(child_sa), NULL, NULL); &args);
break; break;
case ACTION_ROUTE: case ACTION_ROUTE:
charon->traps->install(charon->traps, charon->traps->install(charon->traps,
+9 -6
View File
@@ -1983,7 +1983,7 @@ static void trigger_mbb_reauth(private_task_manager_t *this)
/* suspend online revocation checking until the SA is established */ /* suspend online revocation checking until the SA is established */
new->set_condition(new, COND_ONLINE_VALIDATION_SUSPENDED, TRUE); new->set_condition(new, COND_ONLINE_VALIDATION_SUSPENDED, TRUE);
if (new->initiate(new, NULL, 0, NULL, NULL) != DESTROY_ME) if (new->initiate(new, NULL, NULL) != DESTROY_ME)
{ {
new->queue_task(new, (task_t*)ike_verify_peer_cert_create(new)); new->queue_task(new, (task_t*)ike_verify_peer_cert_create(new));
new->queue_task(new, (task_t*)ike_reauth_complete_create(new, new->queue_task(new, (task_t*)ike_reauth_complete_create(new,
@@ -2102,15 +2102,18 @@ METHOD(task_manager_t, queue_dpd, void,
} }
METHOD(task_manager_t, queue_child, void, METHOD(task_manager_t, queue_child, void,
private_task_manager_t *this, child_cfg_t *cfg, uint32_t reqid, private_task_manager_t *this, child_cfg_t *cfg, child_init_args_t *args)
traffic_selector_t *tsi, traffic_selector_t *tsr)
{ {
child_create_t *task; child_create_t *task;
task = child_create_create(this->ike_sa, cfg, FALSE, tsi, tsr); if (args)
if (reqid)
{ {
task->use_reqid(task, reqid); task = child_create_create(this->ike_sa, cfg, FALSE, args->src, args->dst);
task->use_reqid(task, args->reqid);
}
else
{
task = child_create_create(this->ike_sa, cfg, FALSE, NULL, NULL);
} }
queue_task(this, &task->task); queue_task(this, &task->task);
} }
+4 -3
View File
@@ -312,12 +312,13 @@ static void process_payloads(private_child_delete_t *this, message_t *message)
*/ */
static status_t destroy_and_reestablish(private_child_delete_t *this) static status_t destroy_and_reestablish(private_child_delete_t *this)
{ {
child_init_args_t args = {};
enumerator_t *enumerator; enumerator_t *enumerator;
entry_t *entry; entry_t *entry;
child_sa_t *child_sa; child_sa_t *child_sa;
child_cfg_t *child_cfg; child_cfg_t *child_cfg;
protocol_id_t protocol; protocol_id_t protocol;
uint32_t spi, reqid; uint32_t spi;
action_t action; action_t action;
status_t status = SUCCESS; status_t status = SUCCESS;
time_t now, expire; time_t now, expire;
@@ -362,9 +363,9 @@ static status_t destroy_and_reestablish(private_child_delete_t *this)
/* no delay and no lifetime, destroy it immediately */ /* no delay and no lifetime, destroy it immediately */
} }
spi = child_sa->get_spi(child_sa, TRUE); spi = child_sa->get_spi(child_sa, TRUE);
reqid = child_sa->get_reqid(child_sa);
child_cfg = child_sa->get_config(child_sa); child_cfg = child_sa->get_config(child_sa);
child_cfg->get_ref(child_cfg); child_cfg->get_ref(child_cfg);
args.reqid = child_sa->get_reqid(child_sa);
action = child_sa->get_close_action(child_sa); action = child_sa->get_close_action(child_sa);
this->ike_sa->destroy_child_sa(this->ike_sa, protocol, spi); this->ike_sa->destroy_child_sa(this->ike_sa, protocol, spi);
@@ -376,7 +377,7 @@ static status_t destroy_and_reestablish(private_child_delete_t *this)
case ACTION_RESTART: case ACTION_RESTART:
child_cfg->get_ref(child_cfg); child_cfg->get_ref(child_cfg);
status = this->ike_sa->initiate(this->ike_sa, child_cfg, status = this->ike_sa->initiate(this->ike_sa, child_cfg,
reqid, NULL, NULL); &args);
break; break;
case ACTION_ROUTE: case ACTION_ROUTE:
charon->traps->install(charon->traps, charon->traps->install(charon->traps,
+3 -4
View File
@@ -391,7 +391,7 @@ METHOD(task_t, process_i, status_t,
if (message->get_notify(message, CHILD_SA_NOT_FOUND)) if (message->get_notify(message, CHILD_SA_NOT_FOUND))
{ {
child_cfg_t *child_cfg; child_cfg_t *child_cfg;
uint32_t reqid; child_init_args_t args = {};
if (this->collision && if (this->collision &&
this->collision->get_type(this->collision) == TASK_CHILD_DELETE) this->collision->get_type(this->collision) == TASK_CHILD_DELETE)
@@ -406,15 +406,14 @@ METHOD(task_t, process_i, status_t,
* that (we could go by name, but that might be tricky e.g. due to * that (we could go by name, but that might be tricky e.g. due to
* narrowing) */ * narrowing) */
spi = this->child_sa->get_spi(this->child_sa, TRUE); spi = this->child_sa->get_spi(this->child_sa, TRUE);
reqid = this->child_sa->get_reqid(this->child_sa);
protocol = this->child_sa->get_protocol(this->child_sa); protocol = this->child_sa->get_protocol(this->child_sa);
child_cfg = this->child_sa->get_config(this->child_sa); child_cfg = this->child_sa->get_config(this->child_sa);
child_cfg->get_ref(child_cfg); child_cfg->get_ref(child_cfg);
args.reqid = this->child_sa->get_reqid(this->child_sa);
charon->bus->child_updown(charon->bus, this->child_sa, FALSE); charon->bus->child_updown(charon->bus, this->child_sa, FALSE);
this->ike_sa->destroy_child_sa(this->ike_sa, protocol, spi); this->ike_sa->destroy_child_sa(this->ike_sa, protocol, spi);
return this->ike_sa->initiate(this->ike_sa, return this->ike_sa->initiate(this->ike_sa,
child_cfg->get_ref(child_cfg), reqid, child_cfg->get_ref(child_cfg), &args);
NULL, NULL);
} }
if (this->child_create->task.process(&this->child_create->task, if (this->child_create->task.process(&this->child_create->task,
+3 -5
View File
@@ -172,12 +172,10 @@ struct task_manager_t {
* Queue CHILD_SA establishing tasks. * Queue CHILD_SA establishing tasks.
* *
* @param cfg CHILD_SA config to establish * @param cfg CHILD_SA config to establish
* @param reqid reqid to use for CHILD_SA * @param args optional arguments for the initiation
* @param tsi initiator traffic selector, if packet-triggered
* @param tsr responder traffic selector, if packet-triggered
*/ */
void (*queue_child)(task_manager_t *this, child_cfg_t *cfg, uint32_t reqid, void (*queue_child)(task_manager_t *this, child_cfg_t *cfg,
traffic_selector_t *tsi, traffic_selector_t *tsr); child_init_args_t *args);
/** /**
* Queue CHILD_SA rekeying tasks. * Queue CHILD_SA rekeying tasks.
+8 -2
View File
@@ -542,17 +542,23 @@ METHOD(trap_manager_t, acquire, void,
if (ike_sa) if (ike_sa)
{ {
child_init_args_t args = {
.reqid = reqid,
.src = src,
.dst = dst,
};
if (this->ignore_acquire_ts || ike_sa->get_version(ike_sa) == IKEV1) if (this->ignore_acquire_ts || ike_sa->get_version(ike_sa) == IKEV1)
{ /* in IKEv1, don't prepend the acquiring packet TS, as we only { /* in IKEv1, don't prepend the acquiring packet TS, as we only
* have a single TS that we can establish in a Quick Mode. */ * have a single TS that we can establish in a Quick Mode. */
src = dst = NULL; args.src = args.dst = NULL;
} }
this->mutex->lock(this->mutex); this->mutex->lock(this->mutex);
acquire->ike_sa = ike_sa; acquire->ike_sa = ike_sa;
this->mutex->unlock(this->mutex); this->mutex->unlock(this->mutex);
if (ike_sa->initiate(ike_sa, child, reqid, src, dst) != DESTROY_ME) if (ike_sa->initiate(ike_sa, child, &args) != DESTROY_ME)
{ {
charon->ike_sa_manager->checkin(charon->ike_sa_manager, ike_sa); charon->ike_sa_manager->checkin(charon->ike_sa_manager, ike_sa);
} }
@@ -44,7 +44,7 @@ START_TEST(test_collision_ike_rekey)
traffic_selector_create_dynamic(0, 0, 65535)); traffic_selector_create_dynamic(0, 0, 65535));
child_cfg->add_traffic_selector(child_cfg, FALSE, child_cfg->add_traffic_selector(child_cfg, FALSE,
traffic_selector_create_dynamic(0, 0, 65535)); traffic_selector_create_dynamic(0, 0, 65535));
call_ikesa(a, initiate, child_cfg, 0, NULL, NULL); call_ikesa(a, initiate, child_cfg, NULL);
assert_child_sa_count(a, 1); assert_child_sa_count(a, 1);
assert_hook(); assert_hook();
@@ -81,7 +81,7 @@ START_TEST(test_collision_ike_rekey)
ck_assert(!exchange_test_helper->sender->dequeue(exchange_test_helper->sender)); ck_assert(!exchange_test_helper->sender->dequeue(exchange_test_helper->sender));
assert_num_tasks(a, 0, TASK_QUEUE_ACTIVE); assert_num_tasks(a, 0, TASK_QUEUE_ACTIVE);
assert_num_tasks(a, 1, TASK_QUEUE_QUEUED); assert_num_tasks(a, 1, TASK_QUEUE_QUEUED);
call_ikesa(a, initiate, NULL, 0, NULL, NULL); call_ikesa(a, initiate, NULL, NULL);
assert_num_tasks(a, 0, TASK_QUEUE_ACTIVE); assert_num_tasks(a, 0, TASK_QUEUE_ACTIVE);
assert_sa_idle(b); assert_sa_idle(b);
+5 -5
View File
@@ -44,7 +44,7 @@ START_TEST(test_regular)
id_a = a->get_id(a); id_a = a->get_id(a);
id_b = b->get_id(b); id_b = b->get_id(b);
call_ikesa(a, initiate, child_cfg, 0, NULL, NULL); call_ikesa(a, initiate, child_cfg, NULL);
/* IKE_SA_INIT --> */ /* IKE_SA_INIT --> */
id_b->set_initiator_spi(id_b, id_a->get_initiator_spi(id_a)); id_b->set_initiator_spi(id_b, id_a->get_initiator_spi(id_a));
@@ -115,7 +115,7 @@ START_TEST(test_regular_manual)
id_a = a->get_id(a); id_a = a->get_id(a);
id_b = b->get_id(b); id_b = b->get_id(b);
call_ikesa(a, initiate, NULL, 0, NULL, NULL); call_ikesa(a, initiate, NULL, NULL);
/* IKE_SA_INIT --> */ /* IKE_SA_INIT --> */
id_b->set_initiator_spi(id_b, id_a->get_initiator_spi(id_a)); id_b->set_initiator_spi(id_b, id_a->get_initiator_spi(id_a));
@@ -144,7 +144,7 @@ START_TEST(test_regular_manual)
assert_sa_idle(a); assert_sa_idle(a);
assert_sa_idle(b); assert_sa_idle(b);
call_ikesa(a, initiate, child_cfg, 0, NULL, NULL); call_ikesa(a, initiate, child_cfg, NULL);
/* CREATE_CHILD_SA { SA, Ni, KEi, TSi, TSr } --> */ /* CREATE_CHILD_SA { SA, Ni, KEi, TSi, TSr } --> */
assert_hook_called(child_updown); assert_hook_called(child_updown);
@@ -192,7 +192,7 @@ START_TEST(test_failure_init)
id_a = a->get_id(a); id_a = a->get_id(a);
id_b = b->get_id(b); id_b = b->get_id(b);
call_ikesa(a, initiate, child_cfg, 0, NULL, NULL); call_ikesa(a, initiate, child_cfg, NULL);
/* IKE_SA_INIT --> */ /* IKE_SA_INIT --> */
id_b->set_initiator_spi(id_b, id_a->get_initiator_spi(id_a)); id_b->set_initiator_spi(id_b, id_a->get_initiator_spi(id_a));
@@ -233,7 +233,7 @@ START_TEST(test_failure_resp)
id_a = a->get_id(a); id_a = a->get_id(a);
id_b = b->get_id(b); id_b = b->get_id(b);
call_ikesa(a, initiate, child_cfg, 0, NULL, NULL); call_ikesa(a, initiate, child_cfg, NULL);
/* IKE_SA_INIT --> */ /* IKE_SA_INIT --> */
id_b->set_initiator_spi(id_b, id_a->get_initiator_spi(id_a)); id_b->set_initiator_spi(id_b, id_a->get_initiator_spi(id_a));
@@ -493,7 +493,7 @@ START_TEST(test_active)
charon->bus->remove_listener(charon->bus, &mid.listener); charon->bus->remove_listener(charon->bus, &mid.listener);
/* the active task was queued again */ /* the active task was queued again */
call_ikesa(a, initiate, NULL, 0, NULL, NULL); call_ikesa(a, initiate, NULL, NULL);
exchange_test_helper->process_message(exchange_test_helper, b, NULL); exchange_test_helper->process_message(exchange_test_helper, b, NULL);
exchange_test_helper->process_message(exchange_test_helper, a, NULL); exchange_test_helper->process_message(exchange_test_helper, a, NULL);
send_dpd(b, a); send_dpd(b, a);
@@ -273,7 +273,7 @@ METHOD(exchange_test_helper_t, establish_sa, void,
id_i = sa_i->get_id(sa_i); id_i = sa_i->get_id(sa_i);
id_r = sa_r->get_id(sa_r); id_r = sa_r->get_id(sa_r);
call_ikesa(sa_i, initiate, child_i, 0, NULL, NULL); call_ikesa(sa_i, initiate, child_i, NULL);
/* IKE_SA_INIT --> */ /* IKE_SA_INIT --> */
id_r->set_initiator_spi(id_r, id_i->get_initiator_spi(id_i)); id_r->set_initiator_spi(id_r, id_i->get_initiator_spi(id_i));