encoding: Accept all exchange types for non IKEv1/IKEv2 major versions
This commit is contained in:
@@ -210,8 +210,9 @@ METHOD(payload_t, verify, status_t,
|
||||
case TRANSACTION:
|
||||
case QUICK_MODE:
|
||||
case NEW_GROUP_MODE:
|
||||
if (this->maj_version != IKEV1_MAJOR_VERSION)
|
||||
if (this->maj_version == IKEV2_MAJOR_VERSION)
|
||||
{
|
||||
/* IKEv1 exchange type in IKEv2? */
|
||||
return FAILED;
|
||||
}
|
||||
break;
|
||||
@@ -223,14 +224,20 @@ METHOD(payload_t, verify, status_t,
|
||||
#ifdef ME
|
||||
case ME_CONNECT:
|
||||
#endif /* ME */
|
||||
if (this->maj_version != IKEV2_MAJOR_VERSION)
|
||||
if (this->maj_version == IKEV1_MAJOR_VERSION)
|
||||
{
|
||||
/* IKEv2 exchange type in IKEv1? */
|
||||
return FAILED;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
/* unsupported exchange type */
|
||||
return FAILED;
|
||||
if (this->maj_version == IKEV1_MAJOR_VERSION ||
|
||||
this->maj_version == IKEV2_MAJOR_VERSION)
|
||||
{
|
||||
/* unsupported exchange type for known version */
|
||||
return FAILED;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (this->initiator_spi == 0)
|
||||
{
|
||||
@@ -501,4 +508,3 @@ ike_header_t *ike_header_create_version(int major, int minor)
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user