]> git.ipfire.org Git - thirdparty/nftables.git/commit
parser: fix scope closure of COUNTER token
authorFlorian Westphal <fw@strlen.de>
Thu, 25 Mar 2021 09:34:40 +0000 (10:34 +0100)
committerFlorian Westphal <fw@strlen.de>
Thu, 25 Mar 2021 11:40:30 +0000 (12:40 +0100)
commitead6345cb4ab23f3277155a611483edace536a46
tree90fa090361abf639b24470253a905725c93c40f3
parenta3e215d7f68f41556912c33b3dcf12781f6b9b59
parser: fix scope closure of COUNTER token

It is closed after allocation, which is too early: this
stopped 'packets' and 'bytes' from getting parsed correctly.

Also add a test case for this.

Signed-off-by: Florian Westphal <fw@strlen.de>
src/parser_bison.y
tests/py/any/counter.t [new file with mode: 0644]
tests/py/any/counter.t.json [new file with mode: 0644]
tests/py/any/counter.t.json.output [new file with mode: 0644]
tests/py/any/counter.t.payload [new file with mode: 0644]