Raise an alert if IKE proposals mismatch
This commit is contained in:
@@ -107,6 +107,8 @@ enum alert_t {
|
||||
ALERT_RETRANSMIT_SEND_TIMEOUT,
|
||||
/** received a retransmit for a message, argument is message_t */
|
||||
ALERT_RETRANSMIT_RECEIVE,
|
||||
/** IKE proposals do not match, argument is linked_list_t of proposal_t */
|
||||
ALERT_PROPOSAL_MISMATCH_IKE,
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -187,6 +187,11 @@ static void process_payloads(private_ike_init_t *this, message_t *message)
|
||||
EXT_STRONGSWAN);
|
||||
this->proposal = this->config->select_proposal(this->config,
|
||||
proposal_list, private);
|
||||
if (!this->proposal)
|
||||
{
|
||||
charon->bus->alert(charon->bus, ALERT_PROPOSAL_MISMATCH_IKE,
|
||||
proposal_list);
|
||||
}
|
||||
proposal_list->destroy_offset(proposal_list,
|
||||
offsetof(proposal_t, destroy));
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user