ike: Don't rekey IKE_SA while reauthenticating

If we are using make-before-break reauthentication, this could lead to
duplicates as the new IKE_SA wouldn't be able to delete the previous
one if it was replaced by a rekeying.
This commit is contained in:
Tobias Brunner
2021-08-24 14:31:55 +02:00
parent 48fbe1d2d5
commit 36161febd3
+2 -1
View File
@@ -1928,7 +1928,8 @@ METHOD(ike_sa_t, delete_, status_t,
METHOD(ike_sa_t, rekey, status_t,
private_ike_sa_t *this)
{
if (this->state == IKE_PASSIVE)
if (this->state == IKE_PASSIVE ||
has_condition(this, COND_REAUTHENTICATING))
{
return INVALID_STATE;
}