ikev2: close an established IKE_SA when receiving AUTHENTICATION_FAILED

RFC 5996 compatible implementations MAY send an INFORMATIONAL message
with an AUTHENTICATION_FAILED if the initiator failed to authenticate us.
Handle such a message like a DELETE for an IKE_SA.
This commit is contained in:
Martin Willi
2013-06-11 15:54:26 +02:00
parent eaafcec190
commit ca74bf7a06
+6
View File
@@ -849,6 +849,12 @@ static status_t process_request(private_task_manager_t *this,
task = (task_t*)ike_auth_lifetime_create(
this->ike_sa, FALSE);
break;
case AUTHENTICATION_FAILED:
/* initiator failed to authenticate us.
* We use ike_delete to handle this, which
* invokes all the required hooks. */
task = (task_t*)ike_delete_create(
this->ike_sa, FALSE);
default:
break;
}