ikev2: Add a new state to track rekeyed IKE_SAs
This makes handling such IKE_SAs more specifically compared to keeping them in state IKE_CONNECTING or IKE_ESTABLISHED (which we did when we lost a collision - even triggering the ike_updown event), or using IKE_REKEYING for them, which would also be ambiguous. For instance, we can now reject anything but DELETES for such SAs.
This commit is contained in:
@@ -71,6 +71,7 @@ ENUM(ike_sa_state_names, IKE_CREATED, IKE_DESTROYING,
|
||||
"ESTABLISHED",
|
||||
"PASSIVE",
|
||||
"REKEYING",
|
||||
"REKEYED",
|
||||
"DELETING",
|
||||
"DESTROYING",
|
||||
);
|
||||
@@ -2356,7 +2357,8 @@ METHOD(ike_sa_t, retransmit, status_t,
|
||||
reestablish(this);
|
||||
break;
|
||||
}
|
||||
if (this->state != IKE_CONNECTING)
|
||||
if (this->state != IKE_CONNECTING &&
|
||||
this->state != IKE_REKEYED)
|
||||
{
|
||||
charon->bus->ike_updown(charon->bus, &this->public, FALSE);
|
||||
}
|
||||
@@ -2508,6 +2510,7 @@ METHOD(ike_sa_t, roam, status_t,
|
||||
case IKE_DELETING:
|
||||
case IKE_DESTROYING:
|
||||
case IKE_PASSIVE:
|
||||
case IKE_REKEYED:
|
||||
return SUCCESS;
|
||||
default:
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user