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.
This commit is contained in:
committed by
Tobias Brunner
parent
523ea82ed5
commit
a49393954f
@@ -698,7 +698,7 @@ METHOD(child_sa_t, install, status_t,
|
|||||||
this->proposal->get_algorithm(this->proposal, EXTENDED_SEQUENCE_NUMBERS,
|
this->proposal->get_algorithm(this->proposal, EXTENDED_SEQUENCE_NUMBERS,
|
||||||
&esn, NULL);
|
&esn, NULL);
|
||||||
|
|
||||||
if (!this->reqid_allocated)
|
if (!this->reqid_allocated && !this->reqid)
|
||||||
{
|
{
|
||||||
status = hydra->kernel_interface->alloc_reqid(hydra->kernel_interface,
|
status = hydra->kernel_interface->alloc_reqid(hydra->kernel_interface,
|
||||||
my_ts, other_ts, this->mark_in, this->mark_out,
|
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;
|
traffic_selector_t *my_ts, *other_ts;
|
||||||
status_t status = SUCCESS;
|
status_t status = SUCCESS;
|
||||||
|
|
||||||
if (!this->reqid_allocated)
|
if (!this->reqid_allocated && !this->reqid)
|
||||||
{
|
{
|
||||||
/* trap policy, get or confirm reqid */
|
/* trap policy, get or confirm reqid */
|
||||||
status = hydra->kernel_interface->alloc_reqid(
|
status = hydra->kernel_interface->alloc_reqid(
|
||||||
|
|||||||
Reference in New Issue
Block a user