kernel-interface: Add a replay_window parameter to add_sa()
This commit is contained in:
@@ -252,8 +252,9 @@ METHOD(kernel_ipsec_t, add_sa, status_t,
|
||||
private_kernel_libipsec_ipsec_t *this, host_t *src, host_t *dst,
|
||||
u_int32_t spi, u_int8_t protocol, u_int32_t reqid, mark_t mark,
|
||||
u_int32_t tfc, lifetime_cfg_t *lifetime, u_int16_t enc_alg, chunk_t enc_key,
|
||||
u_int16_t int_alg, chunk_t int_key, ipsec_mode_t mode, u_int16_t ipcomp,
|
||||
u_int16_t cpi, bool initiator, bool encap, bool esn, bool inbound,
|
||||
u_int16_t int_alg, chunk_t int_key, ipsec_mode_t mode,
|
||||
u_int16_t ipcomp, u_int16_t cpi, u_int32_t replay_window,
|
||||
bool initiator, bool encap, bool esn, bool inbound,
|
||||
traffic_selector_t *src_ts, traffic_selector_t *dst_ts)
|
||||
{
|
||||
return ipsec->sas->add_sa(ipsec->sas, src, dst, spi, protocol, reqid, mark,
|
||||
|
||||
@@ -1947,8 +1947,9 @@ METHOD(kernel_ipsec_t, add_sa, status_t,
|
||||
private_kernel_wfp_ipsec_t *this, host_t *src, host_t *dst,
|
||||
u_int32_t spi, u_int8_t protocol, u_int32_t reqid, mark_t mark,
|
||||
u_int32_t tfc, lifetime_cfg_t *lifetime, u_int16_t enc_alg, chunk_t enc_key,
|
||||
u_int16_t int_alg, chunk_t int_key, ipsec_mode_t mode, u_int16_t ipcomp,
|
||||
u_int16_t cpi, bool initiator, bool encap, bool esn, bool inbound,
|
||||
u_int16_t int_alg, chunk_t int_key, ipsec_mode_t mode,
|
||||
u_int16_t ipcomp, u_int16_t cpi, u_int32_t replay_window,
|
||||
bool initiator, bool encap, bool esn, bool inbound,
|
||||
traffic_selector_t *src_ts, traffic_selector_t *dst_ts)
|
||||
{
|
||||
host_t *local, *remote;
|
||||
|
||||
@@ -53,8 +53,9 @@ METHOD(kernel_ipsec_t, add_sa, status_t,
|
||||
private_load_tester_ipsec_t *this, host_t *src, host_t *dst,
|
||||
u_int32_t spi, u_int8_t protocol, u_int32_t reqid, mark_t mark,
|
||||
u_int32_t tfc, lifetime_cfg_t *lifetime, u_int16_t enc_alg, chunk_t enc_key,
|
||||
u_int16_t int_alg, chunk_t int_key, ipsec_mode_t mode, u_int16_t ipcomp,
|
||||
u_int16_t cpi, bool initiator, bool encap, bool esn, bool inbound,
|
||||
u_int16_t int_alg, chunk_t int_key, ipsec_mode_t mode,
|
||||
u_int16_t ipcomp, u_int16_t cpi, u_int32_t replay_window,
|
||||
bool initiator, bool encap, bool esn, bool inbound,
|
||||
traffic_selector_t *src_ts, traffic_selector_t *dst_ts)
|
||||
{
|
||||
return SUCCESS;
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user