diff options
author | Martin Willi <martin@revosec.ch> | 2012-06-05 15:27:34 +0200 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2012-06-08 10:22:03 +0200 |
commit | d61f2906d4543de716d26634bc3a5d75ecf2aa34 (patch) | |
tree | 687c313011841eab50e98948997485cbd2f59cb4 /src | |
parent | 1e24fa4614d810d1b8763513335c54dd25aa03c6 (diff) | |
download | strongswan-d61f2906d4543de716d26634bc3a5d75ecf2aa34.tar.bz2 strongswan-d61f2906d4543de716d26634bc3a5d75ecf2aa34.tar.xz |
Use traffic selectors passed to quick mode constructor as initiator
Diffstat (limited to 'src')
-rw-r--r-- | src/libcharon/sa/ikev1/tasks/quick_mode.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/libcharon/sa/ikev1/tasks/quick_mode.c b/src/libcharon/sa/ikev1/tasks/quick_mode.c index 4eefe6f6e..663f2c063 100644 --- a/src/libcharon/sa/ikev1/tasks/quick_mode.c +++ b/src/libcharon/sa/ikev1/tasks/quick_mode.c @@ -717,8 +717,14 @@ METHOD(task_t, build_i, status_t, } add_ke(this, message); } - this->tsi = select_ts(this, TRUE, NULL); - this->tsr = select_ts(this, FALSE, NULL); + if (!this->tsi) + { + this->tsi = select_ts(this, TRUE, NULL); + } + if (!this->tsr) + { + this->tsr = select_ts(this, FALSE, NULL); + } tsi = linked_list_create(); tsr = linked_list_create(); tsi->insert_last(tsi, this->tsi); @@ -1186,6 +1192,8 @@ quick_mode_t *quick_mode_create(ike_sa_t *ike_sa, child_cfg_t *config, .config = config, .keymat = (keymat_v1_t*)ike_sa->get_keymat(ike_sa), .state = QM_INIT, + .tsi = tsi ? tsi->clone(tsi) : NULL, + .tsr = tsr ? tsr->clone(tsr) : NULL, ); if (config) |