diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/parser_bison.y | 7 | ||||
-rw-r--r-- | src/proto.c | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/parser_bison.y b/src/parser_bison.y index be1c7403..d42bd2f8 100644 --- a/src/parser_bison.y +++ b/src/parser_bison.y @@ -2101,6 +2101,13 @@ primary_rhs_expr : symbol_expr { $$ = $1; } BYTEORDER_HOST_ENDIAN, sizeof(data) * BITS_PER_BYTE, &data); } + | REDIRECT + { + uint8_t data = ICMP_REDIRECT; + $$ = constant_expr_alloc(&@$, &icmp_type_type, + BYTEORDER_HOST_ENDIAN, + sizeof(data) * BITS_PER_BYTE, &data); + } ; relational_op : EQ { $$ = OP_EQ; } diff --git a/src/proto.c b/src/proto.c index 3282271f..65ee158f 100644 --- a/src/proto.c +++ b/src/proto.c @@ -303,7 +303,7 @@ static const struct symbol_table icmp_type_tbl = { }, }; -static const struct datatype icmp_type_type = { +const struct datatype icmp_type_type = { .type = TYPE_ICMP_TYPE, .name = "icmp_type", .desc = "ICMP type", |