diff options
-rw-r--r-- | src/parser_bison.y | 11 | ||||
-rw-r--r-- | src/scanner.l | 1 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/parser_bison.y b/src/parser_bison.y index d41fc0ab..3f226399 100644 --- a/src/parser_bison.y +++ b/src/parser_bison.y @@ -380,7 +380,6 @@ static void location_update(struct location *loc, struct location *rhs, int n) %token WEEK "week" %token _REJECT "reject" -%token RESET "reset" %token WITH "with" %token ICMPX "icmpx" @@ -1573,9 +1572,15 @@ reject_opts : /* empty */ $4); $<stmt>0->reject.expr->dtype = &icmpx_code_type; } - | WITH TCP RESET + | WITH TCP STRING { - $<stmt>0->reject.type = NFT_REJECT_TCP_RST; + if (strcmp($3, "reset") == 0) { + $<stmt>0->reject.type = NFT_REJECT_TCP_RST; + } else { + erec_queue(error(&@2, "unsupported reject type", $3), + state->msgs); + YYERROR; + } } ; diff --git a/src/scanner.l b/src/scanner.l index a0dee475..60b61a5a 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -326,7 +326,6 @@ addrstring ({macaddr}|{ip4addr}|{ip6addr}) "reject" { return _REJECT; } "with" { return WITH; } -"reset" { return RESET; } "icmpx" { return ICMPX; } "snat" { return SNAT; } |