]> git.ipfire.org Git - thirdparty/nftables.git/commit
parser_bison: compact and simplify list and reset syntax
authorFlorian Westphal <fw@strlen.de>
Thu, 16 Jan 2025 08:32:01 +0000 (09:32 +0100)
committerFlorian Westphal <fw@strlen.de>
Fri, 21 Feb 2025 21:54:10 +0000 (22:54 +0100)
commitb15854ef81b4c22e4660d3876384f375554887b2
tree14ce98952b23a71cc2ad5f67d81bd93c79a0992c
parentf9a48ce2f9c252bf74d98d10412b1f72585a45ec
parser_bison: compact and simplify list and reset syntax

Works:
list sets
list sets inet
list sets table inet foo

Doesn't work:
list sets inet foo

Same for "list counters", "list quotas", etc.

"reset" keyword however supports this:
reset counters inet foo

and aliased this to
reset counters table inet foo

This is inconsistent and not inuitive.

Moreover, unlike "list sets", "list maps" only supported "list maps" and
"list maps inet", without the ability to only list maps of a given table.

Compact this to unify the syntax so it becomes possible to omit the "table"
keyword for either reset or list mode.

flowtables, secmarks and synproxys keywords are updated too.  "flow table"
and "meters" are NOT changed since both of these are deprecated in favor
of standard nft sets.

Reported-by: Slavko <linux@slavino.sk>
Signed-off-by: Florian Westphal <fw@strlen.de>
Reviewed-by: Pablo Neira Ayuso <pablo@netfilter.org>
doc/nft.txt
src/parser_bison.y