If two peers rekey Quick Modes at the same time, the original Quick Mode is
in REKEYING state and hence the requid is not reused. This is required though,
as two identical policies won't work if they have different requids.
enumerator = this->ike_sa->create_child_sa_enumerator(this->ike_sa);
while (this->reqid == 0 && enumerator->enumerate(enumerator, &child_sa))
{
- if (child_sa->get_state(child_sa) == CHILD_INSTALLED &&
+ if ((child_sa->get_state(child_sa) == CHILD_INSTALLED ||
+ child_sa->get_state(child_sa) == CHILD_REKEYING) &&
streq(child_sa->get_name(child_sa),
this->config->get_name(this->config)))
{