aboutsummaryrefslogtreecommitdiffstats
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.c28
1 files changed, 2 insertions, 26 deletions
diff --git a/src/libcharon/encoding/parser.c b/src/libcharon/encoding/parser.c
index 0993134db..32cefb9e7 100644
--- a/src/libcharon/encoding/parser.c
+++ b/src/libcharon/encoding/parser.c
@@ -409,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))
{
@@ -427,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))
{
@@ -445,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))
@@ -487,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))