diff options
author | Reto Buerki <buerki@swiss-it.ch> | 2010-04-22 17:03:30 +0200 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2010-05-04 14:38:34 +0200 |
commit | 71a66a623e72b6b7194a4e88f2bdabbea9962703 (patch) | |
tree | 1ab0a594df74452f8703004efccbe8f325eed8f6 /src/libcharon | |
parent | 277fcf9f86b03bcedca1e876fdd293f65f7f16a8 (diff) | |
download | strongswan-71a66a623e72b6b7194a4e88f2bdabbea9962703.tar.bz2 strongswan-71a66a623e72b6b7194a4e88f2bdabbea9962703.tar.xz |
Use reqid from connection config if present.
Diffstat (limited to 'src/libcharon')
-rw-r--r-- | src/libcharon/sa/child_sa.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/libcharon/sa/child_sa.c b/src/libcharon/sa/child_sa.c index 3fdfb51ad..8fd2a8c43 100644 --- a/src/libcharon/sa/child_sa.c +++ b/src/libcharon/sa/child_sa.c @@ -942,8 +942,6 @@ child_sa_t * child_sa_create(host_t *me, host_t* other, this->other_usetime = 0; this->my_usebytes = 0; this->other_usebytes = 0; - /* reuse old reqid if we are rekeying an existing CHILD_SA */ - this->reqid = rekey ? rekey : ++reqid; this->my_ts = linked_list_create(); this->other_ts = linked_list_create(); this->protocol = PROTO_NONE; @@ -953,6 +951,12 @@ child_sa_t * child_sa_create(host_t *me, host_t* other, this->expire_time = 0; this->config = config; config->get_ref(config); + this->reqid = config->get_reqid(config); + if (!this->reqid) + { + /* reuse old reqid if we are rekeying an existing CHILD_SA */ + this->reqid = rekey ? rekey : ++reqid; + } /* MIPv6 proxy transport mode sets SA endpoints to TS hosts */ if (config->get_mode(config) == MODE_TRANSPORT && |