Error reporting for invalid IKEv2 responses fixed.
This commit is contained in:
@@ -945,10 +945,8 @@ static void send_notify_response(private_task_manager_t *this,
|
|||||||
static status_t parse_message(private_task_manager_t *this, message_t *msg)
|
static status_t parse_message(private_task_manager_t *this, message_t *msg)
|
||||||
{
|
{
|
||||||
status_t status;
|
status_t status;
|
||||||
bool is_request;
|
|
||||||
u_int8_t type = 0;
|
u_int8_t type = 0;
|
||||||
|
|
||||||
is_request = msg->get_request(msg);
|
|
||||||
status = msg->parse_body(msg, this->ike_sa->get_keymat(this->ike_sa));
|
status = msg->parse_body(msg, this->ike_sa->get_keymat(this->ike_sa));
|
||||||
|
|
||||||
if (status == SUCCESS)
|
if (status == SUCCESS)
|
||||||
@@ -975,8 +973,8 @@ static status_t parse_message(private_task_manager_t *this, message_t *msg)
|
|||||||
|
|
||||||
if (status != SUCCESS)
|
if (status != SUCCESS)
|
||||||
{
|
{
|
||||||
if (is_request)
|
bool is_request = msg->get_request(msg);
|
||||||
{
|
|
||||||
switch (status)
|
switch (status)
|
||||||
{
|
{
|
||||||
case NOT_SUPPORTED:
|
case NOT_SUPPORTED:
|
||||||
@@ -1016,7 +1014,6 @@ static status_t parse_message(private_task_manager_t *this, message_t *msg)
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
DBG1(DBG_IKE, "%N %s with message ID %d processing failed",
|
DBG1(DBG_IKE, "%N %s with message ID %d processing failed",
|
||||||
exchange_type_names, msg->get_exchange_type(msg),
|
exchange_type_names, msg->get_exchange_type(msg),
|
||||||
is_request ? "request" : "response",
|
is_request ? "request" : "response",
|
||||||
|
|||||||
Reference in New Issue
Block a user