From: Liping Zhang Date: Sun, 30 Oct 2016 12:36:14 +0000 (+0800) Subject: ct: fix "ct l3proto/protocol" syntax broken X-Git-Tag: v0.7~54 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cdaa874b5fe89da7b0b906a473240aee51abb41c;p=thirdparty%2Fnftables.git ct: fix "ct l3proto/protocol" syntax broken "l3proto" and "protocol" are still keywords in our grammer, they are not STRING, so if the user input the following rule, nft will complain that the syntax is error: # nft add t c ct l3proto ipv4 :1:12-18: Error: syntax error, unexpected l3proto, expecting string or mark or packets or bytes add t c ct l3proto ipv4 ^^^^^^^ Fixes: c992153402c7 ("ct: allow resolving ct keys at run time") Signed-off-by: Liping Zhang Signed-off-by: Florian Westphal --- diff --git a/src/parser_bison.y b/src/parser_bison.y index 106df271..fa5de0c2 100644 --- a/src/parser_bison.y +++ b/src/parser_bison.y @@ -2629,7 +2629,9 @@ ct_expr : CT ct_key } ; -ct_key : MARK { $$ = NFT_CT_MARK; } +ct_key : L3PROTOCOL { $$ = NFT_CT_L3PROTOCOL; } + | PROTOCOL { $$ = NFT_CT_PROTOCOL; } + | MARK { $$ = NFT_CT_MARK; } | ct_key_counters ; ct_key_dir : SADDR { $$ = NFT_CT_SRC; }