ike: Allow creation of internally used payloads

Since 42e0a317c6 ("ike: Only parse payloads valid for the current IKE
version") payload types are checked before creating objects.  This check
failed for internally used payload types (e.g. proposal substructures),
which have a type >= 256, i.e. outside the IKE payload type range.
This commit is contained in:
Tobias Brunner
2014-12-12 13:10:26 +01:00
parent 3e654a13ee
commit 75dd984e9e
+1 -1
View File
@@ -268,7 +268,7 @@ payload_t *payload_create(payload_type_t type)
*/
bool payload_is_known(payload_type_t type, u_int8_t maj_ver)
{
if (type == PL_HEADER)
if (type >= PL_HEADER)
{
return TRUE;
}