summaryrefslogtreecommitdiff
path: root/src/libcharon/encoding/parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcharon/encoding/parser.c')
-rw-r--r--src/libcharon/encoding/parser.c34
1 files changed, 2 insertions, 32 deletions
diff --git a/src/libcharon/encoding/parser.c b/src/libcharon/encoding/parser.c
index 9aa34b1bc..32cefb9e7 100644
--- a/src/libcharon/encoding/parser.c
+++ b/src/libcharon/encoding/parser.c
@@ -387,12 +387,6 @@ static status_t parse_payload(private_parser_t *this,
DBG3(DBG_ENC, "parsing payload from %b",
this->byte_pos, this->input_roof - this->byte_pos);
- if (pld->get_type(pld) == UNKNOWN_PAYLOAD)
- {
- DBG1(DBG_ENC, " payload type %d is unknown, handling as %N",
- payload_type, payload_type_names, UNKNOWN_PAYLOAD);
- }
-
/* base pointer for output, avoids casting in every rule */
output = pld;
@@ -415,6 +409,7 @@ static status_t parse_payload(private_parser_t *this,
break;
}
case U_INT_8:
+ case RESERVED_BYTE:
{
if (!parse_uint8(this, rule_number, output + rule->offset))
{
@@ -433,6 +428,7 @@ static status_t parse_payload(private_parser_t *this,
break;
}
case U_INT_32:
+ case HEADER_LENGTH:
{
if (!parse_uint32(this, rule_number, output + rule->offset))
{
@@ -451,23 +447,6 @@ static status_t parse_payload(private_parser_t *this,
break;
}
case RESERVED_BIT:
- {
- if (!parse_bit(this, rule_number, NULL))
- {
- pld->destroy(pld);
- return PARSE_ERROR;
- }
- break;
- }
- case RESERVED_BYTE:
- {
- if (!parse_uint8(this, rule_number, NULL))
- {
- pld->destroy(pld);
- return PARSE_ERROR;
- }
- break;
- }
case FLAG:
{
if (!parse_bit(this, rule_number, output + rule->offset))
@@ -493,15 +472,6 @@ static status_t parse_payload(private_parser_t *this,
}
break;
}
- case HEADER_LENGTH:
- {
- if (!parse_uint32(this, rule_number, output + rule->offset))
- {
- pld->destroy(pld);
- return PARSE_ERROR;
- }
- break;
- }
case SPI_SIZE:
{
if (!parse_uint8(this, rule_number, output + rule->offset))