summaryrefslogtreecommitdiffstats
path: root/src/parser_bison.y
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2016-03-07 13:17:24 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2016-03-07 13:32:25 +0100
commitd70716406976a3e5c66c0fc439dfbee2357bd32d (patch)
tree52d18dbadcfb31e8f2153106f1acd9a2a1d2a731 /src/parser_bison.y
parent2b7b0f271293e996f1601c003e724923728df80f (diff)
parser: remove 'reset' as reserve keyword
The 'reset' keyword can be used as dccp type, so don't qualify it as reserve keyword to avoid a conflict with this. Closes: https://bugzilla.netfilter.org/show_bug.cgi?id=1055 Reported-by: Shivani Bhardwaj <shivanib134@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/parser_bison.y')
-rw-r--r--src/parser_bison.y11
1 files changed, 8 insertions, 3 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;
+ }
}
;