Raise an ALERT_PROPOSAL_MISMATCH_CHILD also when receiving NO_PROPOSAL_CHOSEN
This commit is contained in:
@@ -1147,6 +1147,25 @@ METHOD(task_t, build_r, status_t,
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raise alerts for received notify errors
|
||||
*/
|
||||
static void raise_alerts(private_child_create_t *this, notify_type_t type)
|
||||
{
|
||||
linked_list_t *list;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case NO_PROPOSAL_CHOSEN:
|
||||
list = this->config->get_proposals(this->config, FALSE);
|
||||
charon->bus->alert(charon->bus, ALERT_PROPOSAL_MISMATCH_CHILD, list);
|
||||
list->destroy_offset(list, offsetof(proposal_t, destroy));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
METHOD(task_t, process_i, status_t,
|
||||
private_child_create_t *this, message_t *message)
|
||||
{
|
||||
@@ -1195,6 +1214,7 @@ METHOD(task_t, process_i, status_t,
|
||||
DBG1(DBG_IKE, "received %N notify, no CHILD_SA built",
|
||||
notify_type_names, type);
|
||||
enumerator->destroy(enumerator);
|
||||
raise_alerts(this, type);
|
||||
handle_child_sa_failure(this, message);
|
||||
/* an error in CHILD_SA creation is not critical */
|
||||
return SUCCESS;
|
||||
|
||||
Reference in New Issue
Block a user