This avoids having to explicitly sync if optimized rekeying can be used
for a CHILD_SA i.e. whether it was created with IKE_AUTH or with a
separate CREATE_CHILD_SA exchange (from scratch or rekeyed). If a key
exchange method was synced, we definitely know the latter is the case.
if (dh_grp)
{
proposal->add_algorithm(proposal, KEY_EXCHANGE_METHOD, dh_grp, 0);
+ /* enable this only for SAs that we definitely know were rekeyed or
+ * created with a CREATE_CHILD_SA exchange */
+ child_sa->set_optimized_rekey(child_sa, TRUE);
}
proposal->add_algorithm(proposal, EXTENDED_SEQUENCE_NUMBERS, esn, 0);
if (secret.len)