kernel-interface: Remove reqid parameter from get_spi/get_cpi() methods
The reqid is not strictly required, as we set the reqid with the update call when installing the negotiated SA. If we don't need a reqid at this stage, we can later allocate the reqid in the kernel backend once the SA parameters have been fully negotaited. This allows us to assign the same reqid for the same selectors to avoid conflicts on backends this is necessary.
This commit is contained in:
@@ -236,14 +236,14 @@ METHOD(kernel_ipsec_t, get_features, kernel_feature_t,
|
||||
|
||||
METHOD(kernel_ipsec_t, get_spi, status_t,
|
||||
private_kernel_libipsec_ipsec_t *this, host_t *src, host_t *dst,
|
||||
u_int8_t protocol, u_int32_t reqid, u_int32_t *spi)
|
||||
u_int8_t protocol, u_int32_t *spi)
|
||||
{
|
||||
return ipsec->sas->get_spi(ipsec->sas, src, dst, protocol, spi);
|
||||
}
|
||||
|
||||
METHOD(kernel_ipsec_t, get_cpi, status_t,
|
||||
private_kernel_libipsec_ipsec_t *this, host_t *src, host_t *dst,
|
||||
u_int32_t reqid, u_int16_t *cpi)
|
||||
u_int16_t *cpi)
|
||||
{
|
||||
return NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
@@ -1981,7 +1981,7 @@ static u_int permute(u_int x, u_int p)
|
||||
|
||||
METHOD(kernel_ipsec_t, get_spi, status_t,
|
||||
private_kernel_wfp_ipsec_t *this, host_t *src, host_t *dst,
|
||||
u_int8_t protocol, u_int32_t reqid, u_int32_t *spi)
|
||||
u_int8_t protocol, u_int32_t *spi)
|
||||
{
|
||||
/* To avoid sequencial SPIs, we use a one-to-one permuation function on
|
||||
* an incrementing counter, that is a full period PRNG for the range we
|
||||
@@ -1998,7 +1998,7 @@ METHOD(kernel_ipsec_t, get_spi, status_t,
|
||||
|
||||
METHOD(kernel_ipsec_t, get_cpi, status_t,
|
||||
private_kernel_wfp_ipsec_t *this, host_t *src, host_t *dst,
|
||||
u_int32_t reqid, u_int16_t *cpi)
|
||||
u_int16_t *cpi)
|
||||
{
|
||||
return NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ struct private_load_tester_ipsec_t {
|
||||
|
||||
METHOD(kernel_ipsec_t, get_spi, status_t,
|
||||
private_load_tester_ipsec_t *this, host_t *src, host_t *dst,
|
||||
u_int8_t protocol, u_int32_t reqid, u_int32_t *spi)
|
||||
u_int8_t protocol, u_int32_t *spi)
|
||||
{
|
||||
*spi = (uint32_t)ref_get(&this->spi);
|
||||
return SUCCESS;
|
||||
@@ -44,7 +44,7 @@ METHOD(kernel_ipsec_t, get_spi, status_t,
|
||||
|
||||
METHOD(kernel_ipsec_t, get_cpi, status_t,
|
||||
private_load_tester_ipsec_t *this, host_t *src, host_t *dst,
|
||||
u_int32_t reqid, u_int16_t *cpi)
|
||||
u_int16_t *cpi)
|
||||
{
|
||||
return FAILED;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user