aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcharon/sa/child_sa.c
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2014-06-16 17:31:43 +0200
committerMartin Willi <martin@revosec.ch>2014-06-17 16:41:30 +0200
commit30c009c2fea0a51d3e899ce64418ba4e3e7b3865 (patch)
tree02a161d0f05e90f1ea29fa9f426b5b712dca7ac4 /src/libcharon/sa/child_sa.c
parentbdcaa5e680b6b9f9637c7f513e3953dddfc0e7f7 (diff)
downloadstrongswan-30c009c2fea0a51d3e899ce64418ba4e3e7b3865.tar.bz2
strongswan-30c009c2fea0a51d3e899ce64418ba4e3e7b3865.tar.xz
kernel-interface: Add a replay_window parameter to add_sa()
Diffstat (limited to 'src/libcharon/sa/child_sa.c')
-rw-r--r--src/libcharon/sa/child_sa.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/libcharon/sa/child_sa.c b/src/libcharon/sa/child_sa.c
index a7d7b7305..bcb0ca20f 100644
--- a/src/libcharon/sa/child_sa.c
+++ b/src/libcharon/sa/child_sa.c
@@ -639,6 +639,7 @@ METHOD(child_sa_t, install, status_t,
host_t *src, *dst;
status_t status;
bool update = FALSE;
+ u_int32_t replay_window = 0;
/* now we have to decide which spi to use. Use self allocated, if "in",
* or the one in the proposal, if not "in" (others). Additionally,
@@ -653,6 +654,9 @@ METHOD(child_sa_t, install, status_t,
}
this->my_spi = spi;
this->my_cpi = cpi;
+
+ /* required on inbound SA only */
+ replay_window = this->config->get_replay_window(this->config);
}
else
{
@@ -722,8 +726,8 @@ METHOD(child_sa_t, install, status_t,
src, dst, spi, proto_ike2ip(this->protocol), this->reqid,
inbound ? this->mark_in : this->mark_out, tfc,
lifetime, enc_alg, encr, int_alg, integ, this->mode,
- this->ipcomp, cpi, initiator, this->encap, esn, update,
- src_ts, dst_ts);
+ this->ipcomp, cpi, replay_window, initiator, this->encap,
+ esn, update, src_ts, dst_ts);
free(lifetime);