Handle unsupported IKEv1 exchange types more specifically.
This commit is contained in:
@@ -1896,7 +1896,7 @@ METHOD(message_t, parse_body, status_t,
|
|||||||
DBG1(DBG_ENC, "no message rules specified for a %N %s",
|
DBG1(DBG_ENC, "no message rules specified for a %N %s",
|
||||||
exchange_type_names, this->exchange_type,
|
exchange_type_names, this->exchange_type,
|
||||||
this->is_request ? "request" : "response");
|
this->is_request ? "request" : "response");
|
||||||
return PARSE_ERROR;
|
return NOT_SUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
status = parse_payloads(this);
|
status = parse_payloads(this);
|
||||||
|
|||||||
@@ -699,6 +699,11 @@ static status_t parse_message(private_task_manager_t *this, message_t *msg)
|
|||||||
{
|
{
|
||||||
switch (status)
|
switch (status)
|
||||||
{
|
{
|
||||||
|
case NOT_SUPPORTED:
|
||||||
|
DBG1(DBG_IKE, "unsupported exchange type");
|
||||||
|
send_notify_response(this, msg,
|
||||||
|
INVALID_EXCHANGE_TYPE, chunk_empty);
|
||||||
|
break;
|
||||||
case PARSE_ERROR:
|
case PARSE_ERROR:
|
||||||
DBG1(DBG_IKE, "message parsing failed");
|
DBG1(DBG_IKE, "message parsing failed");
|
||||||
send_notify_response(this, msg,
|
send_notify_response(this, msg,
|
||||||
|
|||||||
Reference in New Issue
Block a user