]> git.ipfire.org Git - thirdparty/nftables.git/commit
json: Dump flowtable hook spec only if present
authorPhil Sutter <phil@nwl.cc>
Wed, 11 Jun 2025 14:45:48 +0000 (16:45 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 13 Aug 2025 18:08:29 +0000 (20:08 +0200)
commit7f9a74f91121812a4fb8cf17e14e54eec5d4f6d5
tree0e41be52b5bcc058b5b70fc39367c0e8ae9ec307
parentf7942bcc0e9733286be32fcf9a76e6cdf431d68a
json: Dump flowtable hook spec only if present

commit 9fa3fbed73a36111e308c9856514a032f5444564 upstream.

If there is no priority.expr set, assume hook.num is bogus, too.

While this is fixing JSON output, it's hard to tell what commit this is
actually fixing: Before commit 627c451b23513 ("src: allow variables in
the chain priority specification"), there was no way to detect
flowtables missing hook specs (e.g. when printing flowtable delete
monitor event).

Signed-off-by: Phil Sutter <phil@nwl.cc>
Reviewed-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/json.c
tests/monitor/testcases/flowtable-simple.t