"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
<cmdline>: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 <zlpnobody@gmail.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
}
;
-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; }