aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcharon/sa/child_sa.c
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2015-06-01 10:10:19 +0200
committerTobias Brunner <tobias@strongswan.org>2015-06-05 13:44:42 +0200
commita49393954f31e104080f121ec6f27d3e9fdf6050 (patch)
tree67122577d2493693030c5a0b1da96022a27f7d12 /src/libcharon/sa/child_sa.c
parent523ea82ed50f5b5eac210d33fd17c82ec51e3f90 (diff)
downloadstrongswan-a49393954f31e104080f121ec6f27d3e9fdf6050.tar.bz2
strongswan-a49393954f31e104080f121ec6f27d3e9fdf6050.tar.xz
child-sa: Use any fixed reqid configured on the CHILD_SA config
Global reqid allocation (94eb09ac) broke fixed reqid allocation. Resupport them by bypassing allocation in the kernel if a fixed reqid has been configured. Fixes #976.
Diffstat (limited to 'src/libcharon/sa/child_sa.c')
-rw-r--r--src/libcharon/sa/child_sa.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcharon/sa/child_sa.c b/src/libcharon/sa/child_sa.c
index e0db2e655..94cf07c33 100644
--- a/src/libcharon/sa/child_sa.c
+++ b/src/libcharon/sa/child_sa.c
@@ -698,7 +698,7 @@ METHOD(child_sa_t, install, status_t,
this->proposal->get_algorithm(this->proposal, EXTENDED_SEQUENCE_NUMBERS,
&esn, NULL);
- if (!this->reqid_allocated)
+ if (!this->reqid_allocated && !this->reqid)
{
status = hydra->kernel_interface->alloc_reqid(hydra->kernel_interface,
my_ts, other_ts, this->mark_in, this->mark_out,
@@ -826,7 +826,7 @@ METHOD(child_sa_t, add_policies, status_t,
traffic_selector_t *my_ts, *other_ts;
status_t status = SUCCESS;
- if (!this->reqid_allocated)
+ if (!this->reqid_allocated && !this->reqid)
{
/* trap policy, get or confirm reqid */
status = hydra->kernel_interface->alloc_reqid(